5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2006 - 2007 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 /****h* silcclient/Client Library Interface
24 * This header file includes the SilcClientEntry, SilcChannelEntry and
25 * SilcServer entry structures and various routines to search, resolve and
26 * handle these structures.
28 * All entries (SilcClientEntry, SilcChannelEntry and SilcServerEntry) are
29 * reference counted. If application wishes to save an entry pointer it must
30 * always first acquire a reference. The reference must be released once the
31 * entry is not needed anymore. If application wants to read any data from
32 * the entry structure it must first lock the entry. This protects access to
33 * the entries in multithreaded environment. If threads are not used, locking
34 * the entries is not needed. They however still must be referenced even
35 * when threads are not used.
39 #ifndef SILCCLIENT_ENTRY_H
40 #define SILCCLIENT_ENTRY_H
43 #error "Do not include this header directly, include silcclient.h instead"
46 /****s* silcclient/SilcClientAPI/SilcClientEntry
50 * typedef struct SilcClientEntryStruct { ... } *SilcClientEntry;
54 * This structure represents a client or a user in the SILC network.
55 * The local user has this structure also and it can be accessed from
56 * SilcClientConnection structure. All other users in the SILC network
57 * that are accessed using the Client Library routines will have their
58 * own SilcClientEntry structure. For example, when finding users by
59 * their nickname the Client Library returns this structure back to
60 * the application. All strings in the structure are UTF-8 encoded.
62 * Application may store its own pointer into the context pointer in
67 * If application wants to store nickname or any of the other strings
68 * it should always duplicated them.
70 * None of the string arrays are set if the first character is '\0'.
71 * All string arrays are always zero ('\0') terminated.
73 * If application stores the SilcClientEntry it must always take
74 * a reference of it by calling silc_client_ref_client function. The
75 * reference must be released after it is not needed anymore by calling
76 * silc_client_unref_client function.
80 struct SilcClientEntryStruct {
81 char nickname[128 + 1]; /* Nickname */
82 char username[128 + 1]; /* Username */
83 char hostname[256 + 1]; /* Hostname */
84 char server [256 + 1]; /* SILC server name */
85 char *realname; /* Realname (userinfo) */
86 char *nickname_normalized; /* Normalized nickname */
88 SilcClientID id; /* The Client ID */
89 SilcUInt32 mode; /* User mode in SILC, see SilcUserMode */
90 SilcPublicKey public_key; /* User's public key, may be NULL */
91 SilcHashTable channels; /* Channels client has joined */
92 SilcDList attrs; /* Requested Attributes (maybe NULL) */
93 unsigned char fingerprint[20]; /* SHA-1 fingerprint of the public key */
95 void *context; /* Application specific context */
96 SilcClientEntryInternal internal;
100 /****s* silcclient/SilcClientAPI/SilcChannelEntry
104 * typedef struct SilcChannelEntryStruct { ... } *SilcChannelEntry;
108 * This structure represents a channel in the SILC network. All
109 * channels that the client are aware of or have joined in will be
110 * represented as SilcChannelEntry. The structure includes information
111 * about the channel. All strings in the structure are UTF-8 encoded.
113 * Application may store its own pointer into the context pointer in
118 * If application stores the SilcChannelEntry it must always take
119 * a reference of it by calling silc_client_ref_channel function. The
120 * reference must be released after it is not needed anymore by calling
121 * silc_client_unref_channel function.
125 struct SilcChannelEntryStruct {
126 char *channel_name; /* Channel name */
127 char *topic; /* Current topic, may be NULL */
128 SilcPublicKey founder_key; /* Founder key, may be NULL */
129 SilcDList channel_pubkeys; /* Channel public keys, may be NULL */
130 SilcChannelID id; /* Channel ID */
131 SilcUInt32 mode; /* Channel mode, ChannelModes. */
132 SilcUInt32 user_limit; /* User limit on channel */
133 SilcHashTable user_list; /* Joined users. Key to hash table is
134 SilcClientEntry, context is
136 const char *cipher; /* Current channel cipher algorithm*/
137 const char *hmac; /* Current channel HMAC algorithm */
139 void *context; /* Application specific context */
140 SilcChannelEntryInternal internal;
144 /****s* silcclient/SilcClientAPI/SilcServerEntry
148 * typedef struct SilcServerEntryStruct { ... } *SilcServerEntry;
152 * This structure represents a server in the SILC network. All servers
153 * that the client is aware of and have for example resolved with
154 * SILC_COMMAND_INFO command have their on SilcServerEntry structure.
155 * Server's public key is present only if it has been retrieved using
156 * SILC_COMMAND_GETKEY command. All strings in the structure are UTF-8
159 * Application may store its own pointer into the context pointer in
164 * If application stores the SilcServerEntry it must always take
165 * a reference of it by calling silc_client_ref_server function. The
166 * reference must be released after it is not needed anymore by calling
167 * silc_client_unref_server function.
171 struct SilcServerEntryStruct {
172 /* General information */
173 char *server_name; /* Server name */
174 char *server_info; /* Server info */
175 SilcServerID id; /* Server ID */
176 SilcPublicKey public_key; /* Server public key, may be NULL */
178 void *context; /* Application specific context */
179 SilcServerEntryInternal internal;
183 /* SilcClientEntry routines */
185 /****f* silcclient/SilcClientAPI/SilcGetClientCallback
189 * typedef void (*SilcGetClientCallback)(SilcClient client,
190 * SilcClientConnection conn,
197 * Callback function given to various client search functions. The
198 * found entries are allocated into the `clients' list. The list must
199 * not be freed by the receiver, the library will free it later. If the
200 * `clients' is NULL, no such clients exist in the SILC network, and
201 * the `status' will include the error. Each entry in the `clients'
202 * is SilcClientEntry.
206 * If the application stores any of the SilcClientEntry pointers from
207 * the `clients' list it must reference it with silc_client_ref_client
210 * Application must not free the returned `clients' list.
213 typedef void (*SilcGetClientCallback)(SilcClient client,
214 SilcClientConnection conn,
219 /****f* silcclient/SilcClientAPI/silc_client_lock_client
223 * void silc_client_lock_client(SilcClientEntry client_entry);
227 * Acquires lock for the client entry indicate by `client_entry'. When
228 * application wants to access `client_entry' it must lock the entry
229 * before reading any data from the `client_entry'. The lock must be
230 * unlocked with silc_client_unlock_client.
234 * The entry must be unlocked before calling any Client Library API
235 * functions where the entry is given as argument, unless otherwise stated.
237 * The entry should not be locked for long periods of time. For example,
238 * it is not appropriate to hold the lock while waiting user interface to
239 * be drawn. The appropriate way is to read the data and duplicate it if
240 * necessary, unlock the entry, then draw on the user interface.
242 * This function is not needed if application is not multithreaded.
245 void silc_client_lock_client(SilcClientEntry client_entry);
247 /****f* silcclient/SilcClientAPI/silc_client_unlock_client
251 * void silc_client_unlock_client(SilcClientEntry client_entry);
255 * Releases the lock acquired with silc_client_lock_client.
258 void silc_client_unlock_client(SilcClientEntry client_entry);
260 /****f* silcclient/SilcClientAPI/silc_client_ref_client
265 * silc_client_ref_client(SilcClient client,
266 * SilcClientConnection conn,
267 * SilcClientEntry client_entry);
271 * Takes a reference of the client entry indicated by `client_entry'
272 * The reference must be released by calling silc_client_unref_client
273 * after it is not needed anymore. Returns `client_entry'.
276 SilcClientEntry silc_client_ref_client(SilcClient client,
277 SilcClientConnection conn,
278 SilcClientEntry client_entry);
280 /****f* silcclient/SilcClientAPI/silc_client_unref_client
284 * void silc_client_unref_client(SilcClient client,
285 * SilcClientConnection conn,
286 * SilcClientEntry client_entry);
290 * Releases the client entry reference indicated by `client_entry'.
293 void silc_client_unref_client(SilcClient client, SilcClientConnection conn,
294 SilcClientEntry client_entry);
296 /****f* silcclient/SilcClientAPI/silc_client_list_free
300 * void silc_client_list_free(SilcClient client,
301 * SilcClientConnection conn,
302 * SilcDList client_list);
306 * Free's client entry list that has been returned by various library
310 void silc_client_list_free(SilcClient client, SilcClientConnection conn,
311 SilcDList client_list);
313 /****f* silcclient/SilcClientAPI/silc_client_get_clients
317 * SilcUInt16 silc_client_get_clients(SilcClient client,
318 * SilcClientConnection conn,
319 * const char *nickname,
320 * const char *server,
321 * SilcGetClientCallback completion,
326 * Finds client entry or entries by the `nickname' and `server'. The
327 * completion callback will be called when the client entries has been
328 * found. After the server returns the client information it is cached
329 * and can be accesses locally at a later time. The resolving is done
330 * with IDENTIFY command. The `server' may be NULL. The server
331 * associated with the nickname may be in the `nickname' (nick@server).
332 * The `nickname' may also be a formatted nickname in which case the
333 * formatting is ignored and the base nickname is used. If the nickname
334 * is formatted it must be formatted as defined in SilcClientParams.
335 * Returns 0 on error and the command identifier used with the command
340 * This function is always asynchronous and resolves the client
341 * information from the server. Thus, if you already know the client
342 * information then use the silc_client_get_client_by_id function to
343 * get the client entry since this function may be very slow and should
344 * be used only to initially get the client entries.
346 * This function resolves only the relevant information (user's nickname
347 * and username). It does not resolve for example user's real name,
348 * joined channel list or other information. To resolve all the details
349 * use silc_client_get_clients_whois instead.
352 SilcUInt16 silc_client_get_clients(SilcClient client,
353 SilcClientConnection conn,
354 const char *nickname,
356 SilcGetClientCallback completion,
359 /****f* silcclient/SilcClientAPI/silc_client_get_clients_whois
364 * silc_client_get_clients_whois(SilcClient client,
365 * SilcClientConnection conn,
366 * const char *nickname,
367 * const char *server,
368 * SilcBuffer attributes,
369 * SilcGetClientCallback completion,
374 * Finds client entry or entries by the `nickname' and `server'. The
375 * completion callback will be called when the client entries has been
376 * found. After the server returns the client information it is cached
377 * and can be accesses locally at a later time. The resolving is done
378 * with WHOIS command. The `server' may be NULL. The server
379 * associated with the nickname may be in the `nickname' (nick@server).
380 * The `nickname' may also be a formatted nickname in which case the
381 * formatting is ignored and the base nickname is used. If the nickname
382 * is formatted it must be formatted as defined in SilcClientParams.
383 * Returns 0 on error and the command identifier used with the command
386 * If the `attributes' is non-NULL then the buffer includes Requested
387 * Attributes which can be used to fetch very detailed information
388 * about the user. If it is NULL then only normal WHOIS query is
389 * made (for more information about attributes see SilcAttribute).
390 * Caller may create the `attributes' with silc_client_attributes_request
395 * The resolving is done with WHOIS command. For this reason this
396 * command may take a long time because it resolves detailed user
400 SilcUInt16 silc_client_get_clients_whois(SilcClient client,
401 SilcClientConnection conn,
402 const char *nickname,
404 SilcBuffer attributes,
405 SilcGetClientCallback completion,
408 /****f* silcclient/SilcClientAPI/silc_client_get_clients_local
412 * SilcDList silc_client_get_clients_local(SilcClient client,
413 * SilcClientConnection conn,
414 * const char *nickname,
415 * SilcBool return_all);
419 * Same as silc_client_get_clients function but does not resolve anything
420 * from the server. This checks local cache and returns matching clients
421 * from the local cache. If none was found this returns NULL. The
422 * `nickname' is the nickname to find and it may be a formatted nickname
423 * or a base nickname. If the `return_all' is TRUE this call will return
424 * all clients matching the `nickname' base. If it is FALSE this will
425 * return the exact match if `nickname' is a formatted nickname or the
426 * first matching nickname if it is not formatted. The formatted nickname
427 * must of the format specified in SilcClientParams. The caller must free
428 * the returned list by calling silc_client_list_free function.
432 * If the application stores any of the SilcClientEntry pointers from
433 * the returned list it must reference it with silc_client_ref_client
436 * Application must free the returned list with silc_client_list_free
440 SilcDList silc_client_get_clients_local(SilcClient client,
441 SilcClientConnection conn,
442 const char *nickname,
443 SilcBool return_all);
445 /****f* silcclient/SilcClientAPI/silc_client_get_client_by_id
449 * SilcClientEntry silc_client_get_client_by_id(SilcClient client,
450 * SilcClientConnection conn,
451 * SilcClientID *client_id);
455 * Find client entry by the client's ID. Returns the entry or NULL
456 * if the entry was not found. This checks the local cache and does
457 * not resolve anything from server.
461 * The returned SilcClientEntry has been referenced by the library and
462 * the caller must call silc_client_unref_client after the entry is not
466 SilcClientEntry silc_client_get_client_by_id(SilcClient client,
467 SilcClientConnection conn,
468 SilcClientID *client_id);
470 /****f* silcclient/SilcClientAPI/silc_client_get_client_by_id_resolve
475 * silc_client_get_client_by_id_resolve(SilcClient client,
476 * SilcClientConnection conn,
477 * SilcClientID *client_id,
478 * SilcBuffer attributes,
479 * SilcGetClientCallback completion,
484 * Same as silc_client_get_client_by_id but will always resolve the
485 * information from the server. Use this only if you know that you
486 * do not have the entry and the only thing you know about the client
487 * is its ID. When server returns the client information it will be
488 * cache and can be accessed locally at a later time. The resolving
489 * is done by sending WHOIS command.
491 * Returns command identifier for the resolving. It can be used to attach
492 * a pending command to it, if needed. Returns 0 on error.
494 * If the `attributes' is non-NULL then the buffer includes Requested
495 * Attributes which can be used to fetch very detailed information
496 * about the user. If it is NULL then only normal WHOIS query is
497 * made (for more information about attributes see SilcAttribute).
498 * Caller may create the `attributes' with silc_client_attributes_request
503 silc_client_get_client_by_id_resolve(SilcClient client,
504 SilcClientConnection conn,
505 SilcClientID *client_id,
506 SilcBuffer attributes,
507 SilcGetClientCallback completion,
510 /* SilcChannelEntry routines */
512 /****f* silcclient/SilcClientAPI/SilcGetChannelCallback
516 * typedef void (*SilcGetChannelCallback)(SilcClient client,
517 * SilcClientConnection conn,
519 * SilcDList channels,
524 * Callback function given to various channel resolving functions.
525 * The found entries are included in the `channels' list and each entry
526 * in the list is SilcChannelEntry. If `channels' is NULL then no such
527 * channel exist in the network and the `status' will indicate the error.
531 * If the application stores any of the SilcChannelEntry pointers from
532 * the `channels' list it must reference it with silc_client_ref_channel
535 * Application must not free the returned `channels' list.
538 typedef void (*SilcGetChannelCallback)(SilcClient client,
539 SilcClientConnection conn,
544 /****f* silcclient/SilcClientAPI/silc_client_lock_channel
548 * void silc_client_lock_channel(SilcChannelEntry channel_entry);
552 * Acquires lock for the channel entry indicate by `channel_entry'. When
553 * application wants to access `channel_entry' it must lock the entry
554 * before reading any data from the `channel_entry'. The lock must be
555 * unlocked with silc_client_unlock_channel.
559 * The entry must be unlocked before calling any Client Library API
560 * functions where the entry is given as argument, unless otherwise stated.
562 * The entry should not be locked for long periods of time. For example,
563 * it is not appropriate to hold the lock while waiting user interface to
564 * be drawn. The appropriate way is to read the data and duplicate it if
565 * necessary, unlock the entry, then draw on the user interface.
567 * This function is not needed if application is not multithreaded.
570 void silc_client_lock_channel(SilcChannelEntry channel_entry);
572 /****f* silcclient/SilcClientAPI/silc_client_unlock_channel
576 * void silc_client_unlock_channel(SilcChannelEntry channel_entry);
580 * Releases the lock acquired with silc_client_lock_channel.
583 void silc_client_unlock_channel(SilcChannelEntry channel_entry);
585 /****f* silcclient/SilcClientAPI/silc_client_ref_channel
590 * silc_client_ref_channel(SilcClient client,
591 * SilcClientConnection conn,
592 * SilcChannelEntry channel_entry);
596 * Takes a reference of the channel entry indicated by `channel_entry'
597 * The reference must be released by calling silc_client_unref_channel
598 * after it is not needed anymore. Returns `channel_entry'.
601 SilcChannelEntry silc_client_ref_channel(SilcClient client,
602 SilcClientConnection conn,
603 SilcChannelEntry channel_entry);
605 /****f* silcclient/SilcClientAPI/silc_client_unref_channel
609 * void silc_client_unref_channel(SilcClient client,
610 * SilcClientConnection conn,
611 * SilcChannelEntry channel_entry);
615 * Releases the channel entry reference indicated by `channel_entry'.
618 void silc_client_unref_channel(SilcClient client, SilcClientConnection conn,
619 SilcChannelEntry channel_entry);
621 /****f* silcclient/SilcClientAPI/silc_client_list_free_channel
625 * void silc_client_list_free_channel(SilcClient client,
626 * SilcClientConnection conn,
627 * SilcDList channel_list);
631 * Free's channel entry list that has been returned by various library
635 void silc_client_list_free_channels(SilcClient client,
636 SilcClientConnection conn,
637 SilcDList channel_list);
639 /****f* silcclient/SilcClientAPI/silc_client_get_channel
643 * SilcChannelEntry silc_client_get_channel(SilcClient client,
644 * SilcClientConnection conn,
645 * char *channel_name);
649 * Finds entry for channel by the channel name. Returns the entry or NULL
650 * if the entry was not found. It is found only if the client is joined
651 * to the channel. Use silc_client_get_channel_resolve or
652 * silc_client_get_channel_by_id_resolve to resolve channel that client
657 * The returned SilcChannelEntry has been referenced by the library and
658 * the caller must call silc_client_unref_channel after the entry is not
662 SilcChannelEntry silc_client_get_channel(SilcClient client,
663 SilcClientConnection conn,
666 /****f* silcclient/SilcClientAPI/silc_client_get_channel_resolve
670 * void silc_client_get_channel_resolve(SilcClient client,
671 * SilcClientConnection conn,
672 * char *channel_name,
673 * SilcGetChannelCallback completion,
678 * Resolves entry for channel by the channel name from the server.
679 * The resolving is done with IDENTIFY command. Note that users on
680 * the channel are not resolved at the same time. Use for example
681 * USERS command to resolve all users on a channel.
684 void silc_client_get_channel_resolve(SilcClient client,
685 SilcClientConnection conn,
687 SilcGetChannelCallback completion,
690 /****f* silcclient/SilcClientAPI/silc_client_get_channel_by_id
695 * silc_client_get_channel_by_id(SilcClient client,
696 * SilcClientConnection conn,
697 * SilcChannelID *channel_id);
701 * Finds channel entry by the channel ID. Returns the entry or NULL
702 * if the entry was not found. This checks the local cache and does
703 * not resolve anything from server.
707 * The returned SilcChannelEntry has been referenced by the library and
708 * the caller must call silc_client_unref_channel after the entry is not
712 SilcChannelEntry silc_client_get_channel_by_id(SilcClient client,
713 SilcClientConnection conn,
714 SilcChannelID *channel_id);
716 /****f* silcclient/SilcClientAPI/silc_client_get_channel_by_id_resolve
721 * silc_client_get_channel_by_id_resolve(SilcClient client,
722 * SilcClientConnection conn,
723 * SilcChannelID *channel_id,
724 * SilcGetClientCallback completion,
729 * Resolves the channel information (its name mainly) from the server
730 * by the `channel_id'. Use this only if you know that you do not have
731 * the entry cached locally. The resolving is done with IDENTIFY command.
733 * Returns command identifier for the resolving. It can be used to attach
734 * a pending command to it, if needed. Returns 0 on error.
736 * Note that users on the channel are not resolved at the same time.
737 * Use for example USERS command to resolve all users on a channel.
741 silc_client_get_channel_by_id_resolve(SilcClient client,
742 SilcClientConnection conn,
743 SilcChannelID *channel_id,
744 SilcGetChannelCallback completion,
747 /* SilcServerEntry routines */
749 /****f* silcclient/SilcClientAPI/SilcGetServerCallback
753 * typedef void (*SilcGetServerCallback)(SilcClient client,
754 * SilcClientConnection conn,
761 * Callback function given to various server resolving functions.
762 * The found entries are included in the `servers' list and each entry
763 * in the list is SilcServerEntry. If `server' is NULL then no such
764 * server exist in the network and the `status' will indicate the error.
768 * If the application stores any of the SilcServerEntry pointers from
769 * the `server' list it must reference it with silc_client_ref_server
772 * Application must not free the returned `server' list.
775 typedef void (*SilcGetServerCallback)(SilcClient client,
776 SilcClientConnection conn,
781 /****f* silcclient/SilcClientAPI/silc_client_lock_server
785 * void silc_client_lock_server(SilcServerEntry server_entry);
789 * Acquires lock for the server entry indicate by `server_entry'. When
790 * application wants to access `server_entry' it must lock the entry
791 * before reading any data from the `server_entry'. The lock must be
792 * unlocked with silc_client_unlock_server.
796 * The entry must be unlocked before calling any Client Library API
797 * functions where the entry is given as argument, unless otherwise stated.
799 * The entry should not be locked for long periods of time. For example,
800 * it is not appropriate to hold the lock while waiting user interface to
801 * be drawn. The appropriate way is to read the data and duplicate it if
802 * necessary, unlock the entry, then draw on the user interface.
804 * This function is not needed if application is not multithreaded.
807 void silc_client_lock_server(SilcServerEntry server_entry);
809 /****f* silcclient/SilcClientAPI/silc_client_unlock_server
813 * void silc_client_unlock_server(SilcServerEntry server_entry);
817 * Releases the lock acquired with silc_client_lock_server.
820 void silc_client_unlock_server(SilcServerEntry server_entry);
822 /****f* silcclient/SilcClientAPI/silc_client_ref_server
827 * silc_client_ref_server(SilcClient client,
828 * SilcClientConnection conn,
829 * SilcServerEntry server_entry);
833 * Takes a reference of the server entry indicated by `server_entry'
834 * The reference must be released by calling silc_client_unref_server
835 * after it is not needed anymore. Returns `server_entry'.
838 SilcServerEntry silc_client_ref_server(SilcClient client,
839 SilcClientConnection conn,
840 SilcServerEntry server_entry);
842 /****f* silcclient/SilcClientAPI/silc_client_unref_server
846 * void silc_client_unref_server(SilcClient client,
847 * SilcClientConnection conn,
848 * SilcServerEntry server_entry);
852 * Releases the server entry reference indicated by `server_entry'.
855 void silc_client_unref_server(SilcClient client, SilcClientConnection conn,
856 SilcServerEntry server_entry);
858 /****f* silcclient/SilcClientAPI/silc_client_list_free_server
862 * void silc_client_list_free_server(SilcClient client,
863 * SilcClientConnection conn,
864 * SilcDList server_list);
868 * Free's server entry list that has been returned by various library
872 void silc_client_list_free_servers(SilcClient client,
873 SilcClientConnection conn,
874 SilcDList server_list);
876 /****f* silcclient/SilcClientAPI/silc_client_get_server
880 * SilcServerEntry silc_client_get_server(SilcClient client,
881 * SilcClientConnection conn,
886 * Finds entry for server by the server name. Returns the entry or NULL
887 * if the entry was not found.
890 SilcServerEntry silc_client_get_server(SilcClient client,
891 SilcClientConnection conn,
894 /****f* silcclient/SilcClientAPI/silc_client_get_server_by_id
898 * SilcServerEntry silc_client_get_server_by_id(SilcClient client,
899 * SilcClientConnection conn,
900 * SilcServerID *server_id);
904 * Finds entry for server by the server ID. Returns the entry or NULL
905 * if the entry was not found.
908 SilcServerEntry silc_client_get_server_by_id(SilcClient client,
909 SilcClientConnection conn,
910 SilcServerID *server_id);
912 /****f* silcclient/SilcClientAPI/silc_client_get_server_by_id_resolve
917 * silc_client_get_server_by_id_resolve(SilcClient client,
918 * SilcClientConnection conn,
919 * SilcServerID *server_id,
920 * SilcGetServerCallback completion,
925 * Resolves the server information by the `server_id'. The resolved
926 * server is returned into the `completion' callback.
928 * Returns command identifier for the resolving. It can be used to attach
929 * a pending command to it, if needed. Returns 0 on error.
933 silc_client_get_server_by_id_resolve(SilcClient client,
934 SilcClientConnection conn,
935 SilcServerID *server_id,
936 SilcGetServerCallback completion,
939 #endif /* SILCCLIENT_ENTRY_H */