X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fdoc%2Fcommand_reply_args.html;h=fa9019b08ed3c8be09d54d3c956d99d70ef239cc;hp=5a964271658f52abaac40a08af5e8579ef4e0b0a;hb=413da0f8686910f5e627393157566ae729ca99c4;hpb=050bd9d9e5d843220f3f393a18ab5011622237b9 diff --git a/lib/doc/command_reply_args.html b/lib/doc/command_reply_args.html index 5a964271..fa9019b0 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:
 
@@ -126,9 +139,12 @@ this command reply. The 'name' and 'info' may be NULL. - @@ -171,9 +187,10 @@ parsed with silc_argument_payload_parse function. - @@ -235,12 +252,16 @@ silc_client_get_clients_by_list function and pass the 'client_id_list' as argument to it. The 'client_mode_list' includes 32-bit integers one after the other and they are in same order as clients in 'client_mode_list'. If application resolves the information with silc_client_get_clients_by_list -parsing the 'client_mode_list' is not necessary. +parsing the 'client_mode_list' is not necessary. The 'founder_key' is the +channel founder's key and may be NULL. The 'channel_pubkeys' is Argument +List Payload containing Public Key Payloads of all added channel public +keys, it may be NULL. @@ -265,9 +286,15 @@ Returns the user mode after changing it. - @@ -284,9 +311,10 @@ SilcClientEntry target_client - @@ -334,7 +362,8 @@ arguments to this reply. @@ -357,7 +386,7 @@ SilcBuffer client_id_list, SilcBuffer client_mode_list
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
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
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
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 SILC_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 +397,6 @@ SilcPublicKey public_key

 
-SILC protocol defines some additional commands but command replies to +SILC protocol defines some additional commands but command replies to those commands are not delivered to the application. Only the command replies listed above are delivered to application.