X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient_ops_example.c;h=5b5c1e3ab958370ea5a29d6977db77e99b396239;hb=2ee2102bc017e6e713c9c4e8260a46424d30b977;hp=e35a56e6bd80fbdb265a57107ce0169700a23871;hpb=0bec4ad52aee68c17d256ab266ff0bfda338dd52;p=silc.git diff --git a/lib/silcclient/client_ops_example.c b/lib/silcclient/client_ops_example.c index e35a56e6..5b5c1e3a 100644 --- a/lib/silcclient/client_ops_example.c +++ b/lib/silcclient/client_ops_example.c @@ -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 };