Changed the version string variables to #defines.
[silc.git] / lib / silcclient / silcclient.h
index bf46038cd1cd1862ecf4bcedcc784a1ad3c77867..8b9ad8f6c2151cb4c1c8175f4f5c1122a52c2a86 100644 (file)
@@ -378,15 +378,15 @@ typedef struct {
      The `status' indicated whether the connection were successful.  If it
      is error value the application must always call the function
      silc_client_close_connection. */
-  void (*connect)(SilcClient client, SilcClientConnection conn,
-                 SilcClientConnectionStatus status);
+  void (*connected)(SilcClient client, SilcClientConnection conn,
+                   SilcClientConnectionStatus status);
 
   /* 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);
+  void (*disconnected)(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
@@ -605,7 +605,7 @@ typedef struct {
 SilcClient silc_client_alloc(SilcClientOperations *ops, 
                             SilcClientParams *params,
                             void *application,
-                            const char *silc_version);
+                            const char *version_string);
 
 /****f* silcclient/SilcClientAPI/silc_client_free
  *
@@ -1405,6 +1405,14 @@ void silc_client_command_call(SilcClientCommand command,
  *    directly to the server using this function.  If application is using
  *    the silc_client_command_call, this function is usually not used.
  *
+ *    The variable arguments are a pair of { type, data, data_length },
+ *    and the `argc' is the number of these pairs.
+ *
+ * EXAMPLE
+ *
+ *    silc_client_command_send(client, conn, SILC_COMMAND_WHOIS, 0, 1,
+ *                             1, nickname, strlen(nickname));
+ *
  ***/
 void silc_client_command_send(SilcClient client, SilcClientConnection conn,
                              SilcCommand command, SilcUInt16 ident,
@@ -2281,6 +2289,45 @@ const SilcHashTable silc_client_attributes_get(SilcClient client,
  ***/
 SilcBuffer silc_client_attributes_request(SilcAttribute attribute, ...);
 
+/* Low level packet sending functions */
+
+/****f* silcclient/SilcClientAPI/silc_client_packet_send
+ *
+ * SYNOPSIS
+ *
+ *    void silc_client_packet_send(SilcClient client, 
+ *                                 SilcSocketConnection sock,
+ *                                 SilcPacketType type, 
+ *                                 void *dst_id,
+ *                                 SilcIdType dst_id_type,
+ *                                 SilcCipher cipher,
+ *                                 SilcHmac hmac,
+ *                                 unsigned char *data, 
+ *                                 SilcUInt32 data_len, 
+ *                                 bool force_send);
+ *
+ * DESCRIPTION
+ *
+ *    Constructs a Requested Attributes buffer. If the `attribute' is zero (0)
+ *    then all attributes are requested.  Alternatively, `attribute' and
+ *    all variable arguments can each be requested attribute.  In this case
+ *    the last must be set to zero (0) to complete the variable list of
+ *    requested attributes.  See SilcAttribute for all attributes.
+ *    You can give the returned buffer as argument to for example
+ *    silc_client_get_client_by_id_resolve function.
+ *
+ ***/
+void silc_client_packet_send(SilcClient client, 
+                            SilcSocketConnection sock,
+                            SilcPacketType type, 
+                            void *dst_id,
+                            SilcIdType dst_id_type,
+                            SilcCipher cipher,
+                            SilcHmac hmac,
+                            unsigned char *data, 
+                            SilcUInt32 data_len, 
+                            bool force_send);
+
 #include "client.h"
 #include "command.h"
 #include "command_reply.h"