SILC_KEY_AGREEMENT_FAILURE, /* The protocol failed */
SILC_KEY_AGREEMENT_TIMEOUT, /* The protocol timeout */
SILC_KEY_AGREEMENT_ABORTED, /* The protocol aborted */
+ SILC_KEY_AGREEMENT_ALREADY_STARTED, /* Already started */
+ SILC_KEY_AGREEMENT_SELF_DENIED, /* Negotiationg with itself denied */
} SilcKeyAgreementStatus;
/***/
after application has called the command. Just to tell application
that the command really was processed. */
void (*command)(SilcClient client, SilcClientConnection conn,
- SilcClientCommandContext cmd_context, int success,
- SilcCommand command);
+ SilcClientCommandContext cmd_context, bool success,
+ SilcCommand command, SilcStatus status);
/* Command reply handler. This function is called always in the command reply
function. If error occurs it will be called as well. Normal scenario
ID. For example, if Client ID is receives application receives
SilcClientEntry. */
void (*command_reply)(SilcClient client, SilcClientConnection conn,
- SilcCommandPayload cmd_payload, int success,
+ SilcCommandPayload cmd_payload, bool success,
SilcCommand command, SilcStatus status, ...);
/* Called to indicate that connection was either successfully established
void (*connect)(SilcClient client, SilcClientConnection conn,
SilcClientConnectionStatus status);
- /* Called to indicate that connection was disconnected to the server. */
- void (*disconnect)(SilcClient client, SilcClientConnection conn);
+ /* Called to indicate that connection was disconnected to the server.
+ The `status' may tell the reason of the disconnection, and if the
+ `message' is non-NULL it may include the disconnection message
+ received from server. */
+ void (*disconnect)(SilcClient client, SilcClientConnection conn,
+ SilcStatus status, const char *message);
/* Find authentication method and authentication data by hostname and
port. The hostname may be IP address as well. When the authentication
SilcClientConnection conn,
char *channel);
-/****f* silcclient/SilcClientAPI/silc_client_get_channel_id_resolve
+/****f* silcclient/SilcClientAPI/silc_client_get_channel_by_id
*
* SYNOPSIS
*
- * void
- * silc_client_get_channel_by_id_resolve(SilcClient client,
- * SilcClientConnection conn,
- * SilcChannelID *channel_id,
- * SilcGetClientCallback completion,
- * void *context);
+ * SilcChannelEntry
+ * silc_client_get_channel_by_id(SilcClient client,
+ * SilcClientConnection conn,
+ * SilcChannelID *channel_id);
*
* DESCRIPTION
*
* SilcClientConnection conn,
* SilcClientFileMonitor monitor,
* void *monitor_context,
+ * const char *path,
* SilcUInt32 session_id);
*
* DESCRIPTION
* received in the `ftp' client operation function. This will actually
* perform the key agreement protocol with the remote client before
* actually starting the file transmission. The `monitor' callback
- * will be called to monitor the transmission.
+ * will be called to monitor the transmission. If `path' is non NULL
+ * the file will be saved into that directory. If NULL the file is
+ * saved in the current working directory.
*
* If error will occur during the file transfer process the error
* status will be returned in the monitor callback. In this case
SilcClientConnection conn,
SilcClientFileMonitor monitor,
void *monitor_context,
+ const char *path,
SilcUInt32 session_id);
/****f* silcclient/SilcClientAPI/silc_client_file_close