At the end of this file SilcClientOperation structure is defined, and
it is the one the you will give as an argument to the silc_client_alloc
- function. See also lib/silcclient/README file, and silcapi.h. */
+ function. See also lib/silcclient/README file, and silcclient.h. */
/* Message sent to the application by library. `conn' associates the
static void
silc_channel_message(SilcClient client, SilcClientConnection conn,
SilcClientEntry sender, SilcChannelEntry channel,
- SilcMessageFlags flags, char *msg)
+ SilcMessageFlags flags, const unsigned char *message,
+ SilcUInt32 message_len);
{
}
static void
silc_private_message(SilcClient client, SilcClientConnection conn,
- SilcClientEntry sender, SilcMessageFlags flags, char *msg)
+ SilcClientEntry sender, SilcMessageFlags flags,
+ const unsigned char *message,
+ SilcUInt32 message_len);
{
}
silc_client_close_connection. */
static void
-silc_connect(SilcClient client, SilcClientConnection conn, int success)
+silc_connect(SilcClient client, SilcClientConnection conn,
+ SilcClientConnectionStatus status);
{
}
static void
silc_get_auth_method(SilcClient client, SilcClientConnection conn,
- char *hostname, uint16 port, SilcGetAuthMeth completion,
+ char *hostname, SilcUInt16 port, SilcGetAuthMeth completion,
void *context)
{
static void
silc_verify_public_key(SilcClient client, SilcClientConnection conn,
SilcSocketType conn_type, unsigned char *pk,
- uint32 pk_len, SilcSKEPKType pk_type,
+ SilcUInt32 pk_len, SilcSKEPKType pk_type,
SilcVerifyPublicKey completion, void *context)
{
/* Ask (interact, that is) a passphrase from user. The passphrase is
returned to the library by calling the `completion' callback with
- the `context'. */
+ the `context'. The returned passphrase SHOULD be in UTF-8 encoded,
+ if not then the library will attempt to encode. */
static void
silc_ask_passphrase(SilcClient client, SilcClientConnection conn,
static int
silc_key_agreement(SilcClient client, SilcClientConnection conn,
SilcClientEntry client_entry, const char *hostname,
- uint16 port, SilcKeyAgreementCallback *completion,
+ SilcUInt16 port, SilcKeyAgreementCallback *completion,
void **context)
{
static void
silc_ftp(SilcClient client, SilcClientConnection conn,
- SilcClientEntry client_entry, uint32 session_id,
- const char *hostname, uint16 port)
+ SilcClientEntry client_entry, SilcUInt32 session_id,
+ const char *hostname, SilcUInt16 port)
+{
+
+}
+
+
+/* Delivers SILC session detachment data indicated by `detach_data' to the
+ application. If application has issued SILC_COMMAND_DETACH command
+ the client session in the SILC network is not quit. The client remains
+ in the network but is detached. The detachment data may be used later
+ to resume the session in the SILC Network. The appliation is
+ responsible of saving the `detach_data', to for example in a file.
+
+ The detachment data can be given as argument to the functions
+ silc_client_connect_to_server, or silc_client_add_connection when
+ creating connection to remote server, inside SilcClientConnectionParams
+ structure. If it is provided the client library will attempt to resume
+ the session in the network. After the connection is created
+ successfully, the application is responsible of setting the user
+ interface for user into the same state it was before detaching (showing
+ same channels, channel modes, etc). It can do this by fetching the
+ information (like joined channels) from the client library. */
+
+static void
+silc_detach(SilcClient client, SilcClientConnection conn,
+ const unsigned char *detach_data, SilcUInt32 detach_data_len)
{
}
silc_ask_passphrase,
silc_failure,
silc_key_agreement,
- silc_ftp
+ silc_ftp,
+ silc_detach
};