updates.
[silc.git] / lib / silcclient / client_internal.h
index 6471d8c01fe2da0bab0fdd9df84cee10746c39c7..7cc004991d1efd33bb89f16031f52654a6ef8669 100644 (file)
@@ -61,14 +61,14 @@ struct SilcClientInternalStruct {
 
   /* Table of connections in client. All the connection data is saved here. */
   SilcClientConnection *conns;
-  uint32 conns_count;
+  SilcUInt32 conns_count;
 
   /* Table of listenning sockets in client.  Client can have listeners
      (like key agreement protocol server) and those sockets are saved here.
      This table is checked always if the connection object cannot be found
      from the `conns' table. */
   SilcSocketConnection *sockets;
-  uint32 sockets_count;
+  SilcUInt32 sockets_count;
 
   /* Registered commands */
   SilcList commands;
@@ -84,6 +84,12 @@ struct SilcClientInternalStruct {
   char *silc_client_version;
 };
 
+/* Session resuming callback */
+typedef void (*SilcClientResumeSessionCallback)(SilcClient client,
+                                               SilcClientConnection conn,
+                                               bool success,
+                                               void *context);
+
 /* Macros */
 
 /* Registers generic task for file descriptor for reading from network and
@@ -109,7 +115,7 @@ do {                                                                \
                                          SILC_TASK_WRITE));    \
 } while(0)
 
-/* Finds socket connection object by file descriptor */                \
+/* Finds socket connection object by file descriptor */
 #define SILC_CLIENT_GET_SOCK(__x, __fd, __sock)                        \
 do {                                                           \
   int __i;                                                     \
@@ -153,11 +159,14 @@ void silc_client_packet_send(SilcClient client,
                             SilcCipher cipher,
                             SilcHmac hmac,
                             unsigned char *data, 
-                            uint32 data_len, 
+                            SilcUInt32 data_len, 
                             int force_send);
+void silc_client_close_connection_real(SilcClient client,
+                                      SilcSocketConnection sock,
+                                      SilcClientConnection conn);
 void silc_client_disconnected_by_server(SilcClient client,
                                        SilcSocketConnection sock,
-                                       SilcBuffer message);
+                                       SilcBuffer packet);
 void silc_client_error_by_server(SilcClient client,
                                 SilcSocketConnection sock,
                                 SilcBuffer message);
@@ -199,5 +208,15 @@ void silc_client_connection_auth_request(SilcClient client,
 void silc_client_ftp(SilcClient client,
                     SilcSocketConnection sock,
                     SilcPacketContext *packet);
+SilcBuffer silc_client_get_detach_data(SilcClient client,
+                                      SilcClientConnection conn);
+bool silc_client_process_detach_data(SilcClient client,
+                                    SilcClientConnection conn,
+                                    unsigned char **old_id,
+                                    SilcUInt16 *old_id_len);
+void silc_client_resume_session(SilcClient client,
+                               SilcClientConnection conn,
+                               SilcClientResumeSessionCallback callback,
+                               void *context);
 
 #endif