COmment updates.
[silc.git] / lib / silcclient / silcclient.h
index f491e37e75bc5d0a8712f902d1a48546a404221f..f0e7fc8ae4ea4691bd391285adc5ae65f0ee9726 100644 (file)
@@ -277,7 +277,7 @@ struct SilcChannelUserStruct {
  *
  * 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 */
@@ -365,7 +365,7 @@ typedef void (*SilcKeyAgreementCallback)(SilcClient client,
  *
  * 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
@@ -401,7 +401,7 @@ struct SilcChannelPrivateKeyStruct {
  *
  * SYNOPSIS
  *
- *    typedef void (*SilcAskPassphrase)(unsigned char *passphrase,
+ *    typedef void (*SilcAskPassphrase)(const unsigned char *passphrase,
  *                                     SilcUInt32 passphrase_len,
  *                                     void *context);
  *
@@ -414,7 +414,7 @@ struct SilcChannelPrivateKeyStruct {
  *    encoded, and if it is not then library will attempt to encode it.
  *
  ***/
-typedef void (*SilcAskPassphrase)(unsigned char *passphrase,
+typedef void (*SilcAskPassphrase)(const unsigned char *passphrase,
                                  SilcUInt32 passphrase_len,
                                  void *context);
 
@@ -437,9 +437,8 @@ typedef void (*SilcVerifyPublicKey)(SilcBool success, void *context);
  *
  * SYNOPSIS
  *
- *    typedef void (*SilcGetAuthMeth)(SilcBool success,
- *                                    SilcAuthMethod auth_meth,
- *                                    void *auth, SilcUInt32 auth_len,
+ *    typedef void (*SilcGetAuthMeth)(SilcAuthMethod auth_meth,
+ *                                    const void *auth, SilcUInt32 auth_len,
  *                                    void *context);
  *
  * DESCRIPTION
@@ -461,7 +460,7 @@ typedef void (*SilcVerifyPublicKey)(SilcBool success, void *context);
  *
  ***/
 typedef void (*SilcGetAuthMeth)(SilcAuthMethod auth_meth,
-                               void *auth, SilcUInt32 auth_len,
+                               const void *auth, SilcUInt32 auth_len,
                                void *context);
 
 /****d* silcclient/SilcClientAPI/SilcClientMessageType
@@ -501,7 +500,7 @@ typedef enum {
  *
  * 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.
@@ -641,7 +640,7 @@ typedef struct {
  *
  * 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
@@ -757,7 +756,7 @@ void silc_client_free(SilcClient client);
  *    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 recommended.
+ *    the callback is optional, but highly recommended.
  *
  ***/
 SilcBool silc_client_init(SilcClient client, const char *username,
@@ -839,7 +838,7 @@ void silc_client_stop(SilcClient client, SilcClientStopped stopped,
  *
  * 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.
@@ -1195,21 +1194,23 @@ SilcBool silc_client_send_private_message(SilcClient client,
  *
  *    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
  *
@@ -1217,18 +1218,20 @@ SilcBool silc_client_private_message_wait_init(SilcClient client,
  *
  *    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
  *