updates.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 10 Apr 2002 10:02:18 +0000 (10:02 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 10 Apr 2002 10:02:18 +0000 (10:02 +0000)
apps/irssi/src/silc/core/client_ops.c
apps/irssi/src/silc/core/client_ops.h
lib/silcclient/client_ops_example.c
lib/silcclient/silcclient.h

index 3865d702a33d6b24d40336427089fdcd900b721b..35c9a64e1e94d325e29d7c74c98312d82bdfd292 100644 (file)
@@ -1792,6 +1792,13 @@ int silc_key_agreement(SilcClient client, SilcClientConnection conn,
   return FALSE;
 }
 
+/* Notifies application that file transfer protocol session is being
+   requested by the remote client indicated by the `client_entry' from
+   the `hostname' and `port'. The `session_id' is the file transfer
+   session and it can be used to either accept or reject the file
+   transfer request, by calling the silc_client_file_receive or
+   silc_client_file_close, respectively. */
+
 void silc_ftp(SilcClient client, SilcClientConnection conn,
              SilcClientEntry client_entry, SilcUInt32 session_id,
              const char *hostname, SilcUInt16 port)
@@ -1823,6 +1830,31 @@ void silc_ftp(SilcClient client, SilcClientConnection conn,
                       client_entry->nickname, hostname, portstr);
 }
 
+/* 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. */
+
+void
+silc_detach(SilcClient client, SilcClientConnection conn,
+            const unsigned char *detach_data, SilcUInt32 detach_data_len)
+{
+
+}
+
+
 /* SILC client operations */
 SilcClientOperations ops = {
   silc_say,
@@ -1839,4 +1871,5 @@ SilcClientOperations ops = {
   silc_failure,
   silc_key_agreement,
   silc_ftp,
+  silc_detach,
 };
index f7031fdb106340b4065c4dd954d9fb1957eaa685..505b63437f9ad0f4feee353c6a8158f8b30775ba 100644 (file)
@@ -63,5 +63,8 @@ int silc_key_agreement(SilcClient client, SilcClientConnection conn,
 void silc_ftp(SilcClient client, SilcClientConnection conn,
              SilcClientEntry client_entry, SilcUInt32 session_id,
              const char *hostname, SilcUInt16 port);
+void
+silc_detach(SilcClient client, SilcClientConnection conn,
+            const unsigned char *detach_data, SilcUInt32 detach_data_len);
 
 #endif
index e35a56e6bd80fbdb265a57107ce0169700a23871..5b5c1e3ab958370ea5a29d6977db77e99b396239 100644 (file)
@@ -225,6 +225,31 @@ silc_ftp(SilcClient client, SilcClientConnection conn,
 }
 
 
+/* 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)
+{
+
+}
+
+
 /* The SilcClientOperation structure containing the operation functions.
    You will give this as an argument to silc_client_alloc function. */
 SilcClientOperations ops = {
@@ -241,5 +266,6 @@ SilcClientOperations ops = {
   silc_ask_passphrase,
   silc_failure,
   silc_key_agreement,
-  silc_ftp
+  silc_ftp,
+  silc_detach
 };
index 87c3b97c84ac77a4c1486b1d595ee64681c32d54..dd3e5cb1a46a30506b8bfc017ae520e92ca8989c 100644 (file)
@@ -409,6 +409,26 @@ typedef struct {
   void (*ftp)(SilcClient client, SilcClientConnection conn,
              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. */
+  void (*detach)(SilcClient client, SilcClientConnection conn,
+                const unsigned char *detach_data,
+                SilcUInt32 detach_data_len);
 } SilcClientOperations;
 /***/
 
@@ -640,7 +660,14 @@ typedef struct {
   /* The SILC session detachment data that was returned by `detach' client
      operation when the application detached from the network.  Application
      is responsible of saving the data and giving it as argument here
-     for resuming the session in the SILC network. */
+     for resuming the session in the SILC network.
+
+     If this is provided here 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. */
   unsigned char *detach_data;
   SilcUInt32 detach_data_len;