Watcher list support added.
[crypto.git] / apps / silcd / command_reply.h
index 23c1fe6b0a7c350b5ca13147ea76ae5b91df1ac3..7a06fd6e590ee8f2f2952af203dcc1b42911214b 100644 (file)
@@ -2,9 +2,9 @@
 
   command_reply.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2001 Pekka Riikonen
+  Copyright (C) 1997 - 2002 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -32,6 +32,12 @@ typedef struct {
 /* All server command replys */
 extern SilcServerCommandReply silc_command_reply_list[];
 
+/* Context holding pending command callbacks. */
+typedef struct {
+  SilcCommandCb callback;
+  void *context;
+} *SilcServerCommandPendingCallbacks;
+
 /* Context sent as argument to all command reply functions */
 typedef struct {
   SilcServer server;
@@ -40,10 +46,9 @@ typedef struct {
   SilcArgumentPayload args;
 
   /* If defined this executes the pending command. */
-  SilcServerPendingDestructor destructor;
-  SilcCommandCb callback;
-  void *context;
-  unsigned short ident;
+  SilcServerCommandPendingCallbacks callbacks;
+  SilcUInt32 callbacks_count;
+  SilcUInt16 ident;
 } *SilcServerCommandReplyContext;
 
 /* Macros */
@@ -54,16 +59,23 @@ typedef struct {
 
 /* Macro used to declare command reply functions */
 #define SILC_SERVER_CMD_REPLY_FUNC(func) \
-void silc_server_command_reply_##func(void *context)
+void silc_server_command_reply_##func(void *context, void *context2)
 
 /* Prototypes */
 void silc_server_command_reply_free(SilcServerCommandReplyContext cmd);
 void silc_server_command_reply_process(SilcServer server,
                                       SilcSocketConnection sock,
                                       SilcBuffer buffer);
-SILC_SERVER_CMD_REPLY_FUNC(join);
 SILC_SERVER_CMD_REPLY_FUNC(whois);
+SILC_SERVER_CMD_REPLY_FUNC(whowas);
 SILC_SERVER_CMD_REPLY_FUNC(identify);
+SILC_SERVER_CMD_REPLY_FUNC(info);
+SILC_SERVER_CMD_REPLY_FUNC(motd);
+SILC_SERVER_CMD_REPLY_FUNC(join);
+SILC_SERVER_CMD_REPLY_FUNC(stats);
 SILC_SERVER_CMD_REPLY_FUNC(users);
+SILC_SERVER_CMD_REPLY_FUNC(getkey);
+SILC_SERVER_CMD_REPLY_FUNC(list);
+SILC_SERVER_CMD_REPLY_FUNC(watch);
 
 #endif