-#define SILC_CLIENT_CMD_REPLY_FUNC(func) \
-void silc_client_command_reply_##func(void *context)
-
-/* Macro used to execute command replies */
-#define SILC_CLIENT_COMMAND_REPLY_EXEC(ctx) \
-do { \
- SilcClientCommandReply *cmd; \
- \
- for (cmd = silc_command_reply_list; cmd->cb; cmd++) \
- if (cmd->cmd == silc_command_get(ctx->payload)) { \
- cmd->cb(ctx); \
- break; \
- } \
- \
- if (cmd == NULL) { \
- silc_free(ctx); \
- return; \
- } \
-} while(0)
+#define SILC_CLIENT_CMD_REPLY_FUNC(func) \
+void silc_client_command_reply_##func(void *context, void *context2)
+
+/* Status message structure. Messages are defined below. */
+typedef struct {
+ SilcCommandStatus status;
+ char *message;
+} SilcCommandStatusMessage;
+
+/* Status messages returned by the server */
+#define STAT(x) SILC_STATUS_ERR_##x
+DLLAPI extern const SilcCommandStatusMessage silc_command_status_messages[];