projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Integer type name change.
[silc.git]
/
lib
/
silcclient
/
command.h
diff --git
a/lib/silcclient/command.h
b/lib/silcclient/command.h
index 6b8bd6266eefacb18e5a1ca54688dcee5c57b431..0b8949e15132da54cb230e7e20face8ce73f0354 100644
(file)
--- a/
lib/silcclient/command.h
+++ b/
lib/silcclient/command.h
@@
-20,11
+20,6
@@
#ifndef COMMAND_H
#define COMMAND_H
#ifndef COMMAND_H
#define COMMAND_H
-/* Forward declarations */
-typedef struct SilcClientCommandStruct *SilcClientCommand;
-typedef struct SilcClientCommandContextStruct *SilcClientCommandContext;
-
-#include "silcapi.h"
#include "command_reply.h"
/* Structure holding one command and pointer to its function. This
#include "command_reply.h"
/* Structure holding one command and pointer to its function. This
@@
-40,8
+35,8
@@
struct SilcClientCommandStruct {
SilcCommandCb command; /* Command function */
SilcCommandCb reply; /* Command reply callback */
char *name; /* Name of the command (optional) */
SilcCommandCb command; /* Command function */
SilcCommandCb reply; /* Command reply callback */
char *name; /* Name of the command (optional) */
-
uint8 max_args;
/* Maximum arguments (optional) */
-
uint16 ident;
/* Identifier for command (optional) */
+
SilcUInt8 max_args;
/* Maximum arguments (optional) */
+
SilcUInt16 ident;
/* Identifier for command (optional) */
struct SilcClientCommandStruct *next;
};
struct SilcClientCommandStruct *next;
};
@@
-53,10
+48,10
@@
struct SilcClientCommandContextStruct {
SilcClient client;
SilcClientConnection conn;
SilcClientCommand command;
SilcClient client;
SilcClientConnection conn;
SilcClientCommand command;
-
ui
nt32 argc;
+
SilcUI
nt32 argc;
unsigned char **argv;
unsigned char **argv;
-
ui
nt32 *argv_lens;
-
ui
nt32 *argv_types;
+
SilcUI
nt32 *argv_lens;
+
SilcUI
nt32 *argv_types;
int pending; /* Command is being re-processed when TRUE */
int users; /* Reference counter */
};
int pending; /* Command is being re-processed when TRUE */
int users; /* Reference counter */
};
@@
-66,9
+61,8
@@
struct SilcClientCommandContextStruct {
typedef struct SilcClientCommandPendingStruct {
SilcCommand reply_cmd;
SilcCommandCb callback;
typedef struct SilcClientCommandPendingStruct {
SilcCommand reply_cmd;
SilcCommandCb callback;
- SilcClientPendingDestructor destructor;
void *context;
void *context;
-
ui
nt16 ident;
+
SilcUI
nt16 ident;
struct SilcClientCommandPendingStruct *next;
} SilcClientCommandPending;
struct SilcClientCommandPendingStruct *next;
} SilcClientCommandPending;
@@
-93,19
+87,12
@@
silc_client_command_unregister(client, SILC_COMMAND_##cmd, \
void silc_client_command_##func(void *context, void *context2)
/* Executed pending command callback */
void silc_client_command_##func(void *context, void *context2)
/* Executed pending command callback */
-#define SILC_CLIENT_PENDING_EXEC(ctx, cmd) \
-do { \
- if ((ctx)->callback) \
- (*ctx->callback)(ctx->context, ctx); \
-} while(0)
-
-/* Execute destructor for pending command */
-#define SILC_CLIENT_PENDING_DESTRUCTOR(ctx, cmd) \
+#define SILC_CLIENT_PENDING_EXEC(ctx, cmd) \
do { \
do { \
+ if ((ctx)->callback) \
+ (*ctx->callback)(ctx->context, ctx); \
silc_client_command_pending_del((ctx)->sock->user_data, (cmd), \
(ctx)->ident); \
silc_client_command_pending_del((ctx)->sock->user_data, (cmd), \
(ctx)->ident); \
- if (ctx->destructor) \
- (*ctx->destructor)(ctx->context); \
} while(0)
bool silc_client_command_register(SilcClient client,
} while(0)
bool silc_client_command_register(SilcClient client,
@@
-113,22
+100,22
@@
bool silc_client_command_register(SilcClient client,
const char *name,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
const char *name,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
-
ui
nt8 max_args,
-
ui
nt16 ident);
+
SilcUI
nt8 max_args,
+
SilcUI
nt16 ident);
bool silc_client_command_unregister(SilcClient client,
SilcCommand command,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
bool silc_client_command_unregister(SilcClient client,
SilcCommand command,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
-
ui
nt16 ident);
+
SilcUI
nt16 ident);
void silc_client_commands_register(SilcClient client);
void silc_client_commands_unregister(SilcClient client);
void silc_client_command_pending_del(SilcClientConnection conn,
SilcCommand reply_cmd,
void silc_client_commands_register(SilcClient client);
void silc_client_commands_unregister(SilcClient client);
void silc_client_command_pending_del(SilcClientConnection conn,
SilcCommand reply_cmd,
-
ui
nt16 ident);
+
SilcUI
nt16 ident);
int silc_client_command_pending_check(SilcClientConnection conn,
SilcClientCommandReplyContext ctx,
SilcCommand command,
int silc_client_command_pending_check(SilcClientConnection conn,
SilcClientCommandReplyContext ctx,
SilcCommand command,
-
ui
nt16 ident);
+
SilcUI
nt16 ident);
SILC_CLIENT_CMD_FUNC(whois);
SILC_CLIENT_CMD_FUNC(whowas);
SILC_CLIENT_CMD_FUNC(whois);
SILC_CLIENT_CMD_FUNC(whowas);