X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fdoc%2Fcommand_reply_args.html;h=a38209e9df6b57aa618222c32ed85b97a7acfb17;hb=c257b555225193e54d85daf541d29578b3c93882;hp=5a964271658f52abaac40a08af5e8579ef4e0b0a;hpb=ecb19b3983b3e74bc4aaa82277abd125c53c3623;p=silc.git
diff --git a/lib/doc/command_reply_args.html b/lib/doc/command_reply_args.html
index 5a964271..a38209e9 100644
--- a/lib/doc/command_reply_args.html
+++ b/lib/doc/command_reply_args.html
@@ -11,6 +11,15 @@ specific arguments to the application. This document describes these
arguments for all command replies to help SILC client software developers
to process them.
+
+NOTE: The following list of command reply arguments are sent when
+the command was executed successfully. If an error occurred, the
+`command_reply' client operation's 'success' argument is FALSE, and the
+'status' argument includes the error status. In this case the arguments
+returned are dependent of the 'status' argument. See all
+SilcStatus error arguments for these
+arguments.
+
command_reply Client Library operation
@@ -28,18 +37,19 @@ SilcStatus status, ...);
-The first argument 'client' is the SILC Client Library context, the 'conn'
+The first argument 'client' is the SILC Client Library context, the 'conn'
is the context for the connection to the remote server, the 'cmd_payload'
is the raw SilcCommandPayload and application usually ignores it, the
'success' boolean value indicates whether the earlier command was a success
or not, the 'command' is the command reply enumeration, and the 'status'
indicates the status of the command reply. If 'success' is FALSE then
-'status' includes error status.
+'status' includes error status (see SilcStatus
+error arguments).
Rest of the arguments are 'command' specific and implementation should
handle them by the SilcCommand for example in a switch statement.
-The commands are defined in lib/silccore/silccomand.h header file. A short
+The commands are defined in lib/silccore/silccomand.h header file. A short
example:
@@ -64,12 +74,15 @@ example:
The following table describes all commands and arguments that the client
-library sends in the 'command_reply' client operation to the application.
-By default all arguments that the library sends to application are valid
-pointers. However, it is possible that some pointers may be NULL. If
-this is the case it is separately mentioned that the argument may be NULL.
-In this case application must ignore that argument. The 'command_reply'
-arguments per SilcCommand is as follows:
+library sends in the 'command_reply' client operation to the application.
+By default all arguments that the library sends to application are valid
+pointers. However, it is possible that some pointers may be NULL. If
+this is the case it is separately mentioned that the argument may be NULL.
+In this case application must ignore that argument.
+
+
+The 'command_reply' arguments for successful SilcCommand replies are as
+follows:
SILC_COMMAND_NICK | -Returns the new Client ID after user has changed nickname. +Returns the new Client ID and new nickname inside the SilcClientEntry. +The `old_client_id' is the odl Client ID used by the client before the +nickname was changed. | -SilcClientEntry local_entry, char *nickname
+SilcClientEntry local_entry, char *nickname,
+const SilcClientID *old_client_id
|
| Returns the list of channel in the SILC network. Each call of command reply returns one channel. This means that the command reply is called multiple -times to return list of channels. The 'channel_topic' may be NULL. +times to return list of channels. The 'channel', 'channel_name' and +'channel_topic' may be NULL. However, the 'channel' and 'channel_name' +are NULL only if there are no channels in the network. In this case +this reply is called once with all arguments set to NULL. Application +must be able to handle this situation correctly. | SilcChannelEntry channel, char *channel_name,
char *channel_topic, SilcUInt32 user_count
@@ -171,9 +191,10 @@ parsed with silc_argument_payload_parse function.
SILC_COMMAND_KILL |
-Called after killing a client. There is no arguments to this reply.
+Called after killing a client. Returns the client that was killed.
+The `client_entry' may be NULL.
|
-none
+ | SilcClientEntry client_entry
|
|
char *channel_name, SilcChannelEntry channel, SilcUInt32 channel_mode, int ignored, SilcBuffer key_payload, NULL, NULL, char *topic, char *hmac_name, SilcUInt32 list_count, SilcBuffer client_id_list, -SilcBuffer client_mode_list +SilcBuffer client_mode_list, SilcPublicKey founder_key, +SilcBuffer channel_pubkeys, SilcUint32 user_limit | @@ -265,9 +290,16 @@ Returns the user mode after changing it.
SILC_COMMAND_CMODE | -Returns channel's mode after changing it. +Returns channel's mode after changing it. Optionally may also return +founder's public key when it was set. It may also return the channel +public key list when the list was altered. The 'founder_key' and +'channel_pubkeys' arguments may be NULL. The 'channel_pubkeys' is an +Argument List Payload where each argument includes one Public Key +Payload. | -SilcChannelEntry channel, SilcUInt32 mode
+SilcChannelEntry channel, SilcUInt32 mode,
+SilcPublicKey founder_key, SilcBuffer channel_pubkeys,
+SilcUint32 user_limit
|
| ||
SILC_COMMAND_KICK | -Called after kicking a client. There is no arguments to this reply. +Called after kicking a client. Returns the client that was kicked from +the 'channel'. The `client_entry' and 'channel' may be NULL. | -none
+SilcChannelEntry channel, SilcClientEntry client_entry
|
| ||
SILC_COMMAND_LEAVE | -Called after leaving the channel. +Called after leaving the channel. Note that the `channel' will become +invalid after command_reply client operation returns. | SilcChannelEntry channel | @@ -357,7 +391,7 @@ SilcBuffer client_id_list, SilcBuffer client_mode_listSILC_COMMAND_GETKEY | Returns public key of client or server. The 'public_key' may be NULL. -The 'entry_type' is used to check what type of pointer the entry' is. For +The 'entry_type' is used to check what type of pointer the entry' is. For SILC_ID_CLIENT SilcClientEntry and for SILC_ID_SERVER SilcServerEntry. | SilcIdType entry_type, void *entry, @@ -368,6 +402,6 @@ SilcPublicKey public_key |