-/* Execute destructor for pending command */
-#define SILC_CLIENT_PENDING_DESTRUCTOR(ctx, cmd) \
-do { \
- silc_client_command_pending_del((ctx)->sock->user_data, (cmd), \
- (ctx)->ident); \
- if (ctx->destructor) \
- (*ctx->destructor)(ctx->context); \
-} while(0)
-
-/* Prototypes (some prototypes are in the silcapi.h file) */
+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,
+ SilcCommandCb command_function,
+ SilcCommandCb command_reply_function,
+ SilcUInt8 max_args,
+ SilcUInt16 ident);
+bool silc_client_command_unregister(SilcClient client,
+ SilcCommand command,
+ SilcCommandCb command_function,
+ SilcCommandCb command_reply_function,
+ SilcUInt16 ident);
+void silc_client_commands_register(SilcClient client);
+void silc_client_commands_unregister(SilcClient client);