Fixed some bugs in Requested Attributes support.
[silc.git] / lib / silcclient / client_internal.h
index 32e7fdfb8db844d91bf1729eb2d3867ca557cf4d..540795d524723cad25699e1c69f9fc3f6af30b84 100644 (file)
@@ -61,22 +61,20 @@ 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;
 
   /* Generic cipher and hash objects. */
   SilcCipher none_cipher;
-  SilcHash md5hash;
-  SilcHash sha1hash;
   SilcHmac md5hmac;
   SilcHmac sha1hmac;
 
@@ -84,6 +82,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
@@ -153,11 +157,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 +206,18 @@ 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);
+SilcBuffer silc_client_attributes_process(SilcClient client,
+                                         SilcSocketConnection sock,
+                                         SilcDList attrs);
 
 #endif