Merged silc_1_0_branch to trunk.
[silc.git] / lib / silcclient / command.h
index b85d2e05a18399c4bb3fdf6ede4ed556c32e0f94..c6c597de1cb49f038bb03bc0ca96935819c0fb00 100644 (file)
@@ -1,6 +1,6 @@
 /*
 
-  command.h 
+  command.h
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
@@ -36,7 +36,7 @@ struct SilcClientCommandStruct {
   SilcCommandCb reply;            /* Command reply callback */
   char *name;                     /* Name of the command (optional) */
   SilcUInt8 max_args;             /* Maximum arguments (optional)  */
-  SilcUInt16 ident;                       /* Identifier for command (optional)  */
+  SilcUInt16 ident;               /* Identifier for command (optional)  */
   struct SilcClientCommandStruct *next;
 };
 
@@ -97,6 +97,11 @@ do {                                                                   \
   silc_client_command_pending_del(ctx->sock->user_data, cmd, ctx->ident); \
 } while(0)
 
+SilcClientCommandContext silc_client_command_alloc(void);
+void silc_client_command_free(SilcClientCommandContext ctx);
+SilcClientCommandContext silc_client_command_dup(SilcClientCommandContext ctx);
+SilcClientCommand silc_client_command_find(SilcClient client,
+                                          const char *name);
 bool silc_client_command_register(SilcClient client,
                                  SilcCommand command,
                                  const char *name,
@@ -117,9 +122,12 @@ void silc_client_command_pending_del(SilcClientConnection conn,
 SilcClientCommandPendingCallbacks
 silc_client_command_pending_check(SilcClientConnection conn,
                                  SilcClientCommandReplyContext ctx,
-                                 SilcCommand command, 
+                                 SilcCommand command,
                                  SilcUInt16 ident,
                                  SilcUInt32 *callbacks_count);
+void silc_client_command_process(SilcClient client,
+                                SilcSocketConnection sock,
+                                SilcPacketContext *packet);
 SILC_CLIENT_CMD_FUNC(whois);
 SILC_CLIENT_CMD_FUNC(whowas);
 SILC_CLIENT_CMD_FUNC(identify);