*
* SOURCE
*/
-typedef struct {
+typedef struct SilcClientStatsStruct {
SilcUInt32 starttime; /* SILC server start time */
SilcUInt32 uptime; /* SILC server uptime*/
SilcUInt32 my_clients; /* Number of clients in the server */
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcPrivateMessageKeysStruct {
SilcClientEntry client_entry; /* The remote client entry */
char *cipher; /* The cipher name */
unsigned char *key; /* The original key, If the appliation
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcClientOperationsStruct {
/* Message sent to the application by library. `conn' associates the
message to a specific connection. `conn', however, may be NULL.
The `type' indicates the type of the message sent by the library.
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcClientParamsStruct {
/* If this boolean is set to TRUE then the client library will use
threads. Any of the callback functions in the SilcClientOperations
and other callbacks may be called at any time in a thread. The
* operating system, `hostname' is the client's host name and the
* `realname' is the user's real name.
*
- * The `running' callback is called after the client is running after
- * silc_client_run or silc_client_run_one has been called. Application
- * may start using the Client library API after that. Setting the
- * callback is optional, but recommended.
+ * The `running' callback with `context' is called after the client is
+ * running after silc_client_run or silc_client_run_one has been called.
+ * Application may start using the Client library API after that. Setting
+ * the callback is optional, but highly recommended.
*
***/
SilcBool silc_client_init(SilcClient client, const char *username,
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcClientConnectionParamsStruct {
/* If this is provided the user's nickname in the network will be the
string given here. If it is given, it must be UTF-8 encoded. If this
string is not given, the user's username by default is used as nickname.
* session. The `callback' with `context' will be called after the session
* has been set up. It will also be called later when remote host
* disconnects. The `conn_type' is the type of session this is going to
- * be.
+ * be. If the remote is SILC server it is SILC_CONN_SERVER or if it is
+ * SILC client it is SILC_CONN_CLIENT.
*
* Returns SilcAsyncOperation which can be used to cancel the connecting,
* or NULL on error. Note that the returned pointer becomes invalid
*
* SilcBool
* silc_client_private_message_wait_init(SilcClient client,
- * SilcClientConnection conn);
+ * SilcClientConnection conn,
+ * SilcClientEntry client_entry);
*
* DESCRIPTION
*
- * Initializes private message waiting functionality for the connection
- * indicated by `conn'. Once this is called private message from remote
- * connection indicated by `conn' for any client entry beloning to that
- * connection may be waited for, for example in a thread. The function
+ * Initializes private message waiting functionality for the client
+ * indicated by `client_entry'. Once this is called private message
+ * from remote connection indicated by `conn' for `client_entry' may
+ * be waiter for, for example in a thread. The function
* silc_client_private_message_wait is used to block the current thread
* until a private message is received from a specified client entry.
* Return FALSE in case an internal error occurred.
*
***/
SilcBool silc_client_private_message_wait_init(SilcClient client,
- SilcClientConnection conn);
+ SilcClientConnection conn,
+ SilcClientEntry client_entry);
/****f* silcclient/SilcClientAPI/silc_client_private_message_wait_uninit
*
*
* void
* silc_client_private_message_wait_uninit(SilcClient client,
- * SilcClientConnection conn);
+ * SilcClientConnection conn,
+ * SilcClientEntry client_entry);
*
* DESCRIPTION
*
- * Unintializes private message waiting for connection indicated by
- * `conn'. After this call private message cannot be waited anymore.
- * This call may be called from any thread. This call will signal all
- * private message waiting threads to stop waiting.
+ * Unintializes private message waiting for client indicated by
+ * `client_entry'. After this call private message cannot be waited
+ * anymore and silc_client_private_message_wait will return with FALSE
+ * value.
*
***/
void silc_client_private_message_wait_uninit(SilcClient client,
- SilcClientConnection conn);
+ SilcClientConnection conn,
+ SilcClientEntry client_entry);
/****f* silcclient/SilcClientAPI/silc_client_private_message_wait
*
void silc_client_free_private_message_keys(SilcPrivateMessageKeys keys,
SilcUInt32 key_count);
+/****f* silcclient/SilcClientAPI/silc_client_private_message_key_is_set
+ *
+ * SYNOPSIS
+ *
+ * SilcBool
+ * silc_client_private_message_key_is_set(SilcClient client,
+ * SilcClientConnection conn,
+ * SilcClientEntry client_entry);
+ *
+ * DESCRIPTION
+ *
+ * Returns TRUE if the private message key has been set for the client
+ * entry indicated by `client_entry'.
+ *
+ ***/
+SilcBool
+silc_client_private_message_key_is_set(SilcClient client,
+ SilcClientConnection conn,
+ SilcClientEntry client_entry);
+
/* Channel private key management */