updates.
[silc.git] / lib / silcclient / client.h
index a9dce2aa13e0f5766bf426af9847024180197630..0cf57a4964d0ae46e8a4f9d2fcdd3952c43b76eb 100644 (file)
@@ -110,6 +110,12 @@ struct SilcClientConnectionObject {
      referencing (sock->user_data). */
   SilcSocketConnection sock;
 
+  /* Pending command queue for this connection */
+  SilcDList pending_commands;
+
+  /* Current command identifier, 0 not used */
+  unsigned short cmd_ident;
+
   /* Requested pings. */
   SilcClientPing *ping;
   unsigned int ping_count;
@@ -118,7 +124,7 @@ struct SilcClientConnectionObject {
   SilcClientAway *away;
 
   /* Pointer back to the SilcClient. This object is passed to the application
-     and the actual client object is accesible thourh this pointer. */
+     and the actual client object is accesible through this pointer. */
   SilcClient client;
 
   /* User data context. Library does not touch this. */
@@ -132,8 +138,9 @@ struct SilcClientObject {
    * of this structure.
    */
 
-  /* Users's username and realname. */
+  /* Users's username, hostname and realname. */
   char *username;
+  char *hostname;
   char *realname;
 
   /* Private and public key of the user. */
@@ -223,6 +230,8 @@ int silc_client_init(SilcClient client);
 void silc_client_stop(SilcClient client);
 void silc_client_run(SilcClient client);
 SilcClientConnection silc_client_add_connection(SilcClient client,
+                                               char *hostname,
+                                               int port,
                                                void *context);
 int silc_client_connect_to_server(SilcClient client, int port,
                                  char *host, void *context);
@@ -261,15 +270,17 @@ void silc_client_error_by_server(SilcClient client,
                                 SilcBuffer message);
 void silc_client_notify_by_server(SilcClient client,
                                  SilcSocketConnection sock,
-                                 SilcBuffer message);
+                                 SilcPacketContext *packet);
 void silc_client_receive_new_id(SilcClient client,
                                SilcSocketConnection sock,
-                               unsigned char *id_string);
+                               SilcIDPayload idp);
 void silc_client_new_channel_id(SilcClient client,
                                SilcSocketConnection sock,
                                char *channel_name,
-                               unsigned int mode,
-                               unsigned char *id_string);
+                               unsigned int mode, SilcIDPayload idp);
+void silc_client_save_channel_key(SilcClientConnection conn,
+                                 SilcBuffer key_payload, 
+                                 SilcChannelEntry channel);
 void silc_client_receive_channel_key(SilcClient client,
                                     SilcSocketConnection sock,
                                     SilcBuffer packet);
@@ -279,4 +290,15 @@ void silc_client_channel_message(SilcClient client,
 void silc_client_private_message(SilcClient client, 
                                 SilcSocketConnection sock, 
                                 SilcPacketContext *packet);
+void silc_client_remove_from_channels(SilcClient client,
+                                     SilcClientConnection conn,
+                                     SilcClientEntry client_entry);
+void silc_client_replace_from_channels(SilcClient client, 
+                                      SilcClientConnection conn,
+                                      SilcClientEntry old,
+                                      SilcClientEntry new);
+char *silc_client_chmode(unsigned int mode);
+char *silc_client_chumode(unsigned int mode);
+char *silc_client_chumode_char(unsigned int mode);
+
 #endif