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
137 void *context; /* Application specific context */
138 SilcChannelEntryInternal internal;
142 /****s* silcclient/SilcClientAPI/SilcServerEntry
146 * typedef struct SilcServerEntryStruct { ... } *SilcServerEntry;
150 * This structure represents a server in the SILC network. All servers
151 * that the client is aware of and have for example resolved with
152 * SILC_COMMAND_INFO command have their on SilcServerEntry structure.
153 * Server's public key is present only if it has been retrieved using
154 * SILC_COMMAND_GETKEY command. All strings in the structure are UTF-8
157 * Application may store its own pointer into the context pointer in
162 * If application stores the SilcServerEntry it must always take
163 * a reference of it by calling silc_client_ref_server function. The
164 * reference must be released after it is not needed anymore by calling
165 * silc_client_unref_server function.
169 struct SilcServerEntryStruct {
170 /* General information */
171 char *server_name; /* Server name */
172 char *server_info; /* Server info */
173 SilcServerID id; /* Server ID */
174 SilcPublicKey public_key; /* Server public key, may be NULL */
176 void *context; /* Application specific context */
177 SilcServerEntryInternal internal;
181 /* SilcClientEntry routines */
183 /****f* silcclient/SilcClientAPI/SilcGetClientCallback
187 * typedef void (*SilcGetClientCallback)(SilcClient client,
188 * SilcClientConnection conn,
195 * Callback function given to various client search functions. The
196 * found entries are allocated into the `clients' list. The list must
197 * not be freed by the receiver, the library will free it later. If the
198 * `clients' is NULL, no such clients exist in the SILC network, and
199 * the `status' will include the error. Each entry in the `clients'
200 * is SilcClientEntry.
204 * If the application stores any of the SilcClientEntry pointers from
205 * the `clients' list it must reference it with silc_client_ref_client
208 * Application must not free the returned `clients' list.
211 typedef void (*SilcGetClientCallback)(SilcClient client,
212 SilcClientConnection conn,
217 /****f* silcclient/SilcClientAPI/silc_client_lock_client
221 * void silc_client_lock_client(SilcClientEntry client_entry);
225 * Acquires lock for the client entry indicate by `client_entry'. When
226 * application wants to access `client_entry' it must lock the entry
227 * before reading any data from the `client_entry'. The lock must be
228 * unlocked with silc_client_unlock_client.
232 * The entry must be unlocked before calling any Client Library API
233 * functions where the entry is given as argument, unless otherwise stated.
235 * The entry should not be locked for long periods of time. For example,
236 * it is not appropriate to hold the lock while waiting user interface to
237 * be drawn. The appropriate way is to read the data and duplicate it if
238 * necessary, unlock the entry, then draw on the user interface.
240 * This function is not needed if application is not multithreaded.
243 void silc_client_lock_client(SilcClientEntry client_entry);
245 /****f* silcclient/SilcClientAPI/silc_client_unlock_client
249 * void silc_client_unlock_client(SilcClientEntry client_entry);
253 * Releases the lock acquired with silc_client_lock_client.
256 void silc_client_unlock_client(SilcClientEntry client_entry);
258 /****f* silcclient/SilcClientAPI/silc_client_ref_client
263 * silc_client_ref_client(SilcClient client,
264 * SilcClientConnection conn,
265 * SilcClientEntry client_entry);
269 * Takes a reference of the client entry indicated by `client_entry'
270 * The reference must be released by calling silc_client_unref_client
271 * after it is not needed anymore. Returns `client_entry'.
274 SilcClientEntry silc_client_ref_client(SilcClient client,
275 SilcClientConnection conn,
276 SilcClientEntry client_entry);
278 /****f* silcclient/SilcClientAPI/silc_client_unref_client
282 * void silc_client_unref_client(SilcClient client,
283 * SilcClientConnection conn,
284 * SilcClientEntry client_entry);
288 * Releases the client entry reference indicated by `client_entry'.
291 void silc_client_unref_client(SilcClient client, SilcClientConnection conn,
292 SilcClientEntry client_entry);
294 /****f* silcclient/SilcClientAPI/silc_client_list_free
298 * void silc_client_list_free(SilcClient client,
299 * SilcClientConnection conn,
300 * SilcDList client_list);
304 * Free's client entry list that has been returned by various library
308 void silc_client_list_free(SilcClient client, SilcClientConnection conn,
309 SilcDList client_list);
311 /****f* silcclient/SilcClientAPI/silc_client_get_clients
315 * SilcUInt16 silc_client_get_clients(SilcClient client,
316 * SilcClientConnection conn,
317 * const char *nickname,
318 * const char *server,
319 * SilcGetClientCallback completion,
324 * Finds client entry or entries by the `nickname' and `server'. The
325 * completion callback will be called when the client entries has been
326 * found. After the server returns the client information it is cached
327 * and can be accesses locally at a later time. The resolving is done
328 * with IDENTIFY command. The `server' may be NULL. Returns 0 on
329 * error and the command identifier used with the command otherwise.
333 * This function is always asynchronous and resolves the client
334 * information from the server. Thus, if you already know the client
335 * information then use the silc_client_get_client_by_id function to
336 * get the client entry since this function may be very slow and should
337 * be used only to initially get the client entries.
339 * This function resolves only the relevant information (user's nickname
340 * and username). It does not resolve for example user's real name,
341 * joined channel list or other information. To resolve all the details
342 * use silc_client_get_clients_whois instead.
345 SilcUInt16 silc_client_get_clients(SilcClient client,
346 SilcClientConnection conn,
347 const char *nickname,
349 SilcGetClientCallback completion,
352 /****f* silcclient/SilcClientAPI/silc_client_get_clients_whois
357 * silc_client_get_clients_whois(SilcClient client,
358 * SilcClientConnection conn,
359 * const char *nickname,
360 * const char *server,
361 * SilcBuffer attributes,
362 * SilcGetClientCallback completion,
367 * Finds client entry or entries by the `nickname' and `server'. The
368 * completion callback will be called when the client entries has been
369 * found. After the server returns the client information it is cached
370 * and can be accesses locally at a later time. The resolving is done
371 * with WHOIS command. The `server' may be NULL. Returns 0 on error,
372 * and the command identifier used with the command otherwise.
374 * If the `attributes' is non-NULL then the buffer includes Requested
375 * Attributes which can be used to fetch very detailed information
376 * about the user. If it is NULL then only normal WHOIS query is
377 * made (for more information about attributes see SilcAttribute).
378 * Caller may create the `attributes' with silc_client_attributes_request
383 * The resolving is done with WHOIS command. For this reason this
384 * command may take a long time because it resolves detailed user
388 SilcUInt16 silc_client_get_clients_whois(SilcClient client,
389 SilcClientConnection conn,
390 const char *nickname,
392 SilcBuffer attributes,
393 SilcGetClientCallback completion,
396 /****f* silcclient/SilcClientAPI/silc_client_get_clients_local
400 * SilcDList silc_client_get_clients_local(SilcClient client,
401 * SilcClientConnection conn,
402 * const char *nickname,
403 * const char *format);
407 * Same as silc_client_get_clients function but does not resolve anything
408 * from the server. This checks local cache and returns all matching
409 * clients from the local cache. If none was found this returns NULL.
410 * The `nickname' is the real nickname of the client, and the `format'
411 * is the formatted nickname to find exact match from multiple found
412 * entries. The format must be same as given in the SilcClientParams
413 * structure to the client library. If the `format' is NULL all found
414 * clients by `nickname' are returned. The caller must free the
415 * returned list by silc_client_list_free function.
419 * If the application stores any of the SilcClientEntry pointers from
420 * the returned list it must reference it with silc_client_ref_client
423 * Application must free the returned list with silc_client_list_free
427 SilcDList silc_client_get_clients_local(SilcClient client,
428 SilcClientConnection conn,
429 const char *nickname,
432 /****f* silcclient/SilcClientAPI/silc_client_get_clients_by_channel
436 * void silc_client_get_clients_by_channel(SilcClient client,
437 * SilcClientConnection conn,
438 * SilcChannelEntry channel,
439 * SilcGetClientCallback completion,
444 * Gets client entries by the channel indicated by `channel'. Thus,
445 * it resovles the users currently on that channel. If all users are
446 * already resolved this returns the users from the channel. If the
447 * users are resolved only partially this resolves the complete user
448 * information. If no users are resolved on this channel at all, this
449 * calls USERS command to resolve all users on the channel. The `completion'
450 * will be called after the entries are available. When server returns
451 * the client information it will be cached and can be accessed locally
454 * This function can be used for example in SILC_COMMAND_JOIN command
455 * reply handling in application to resolve users on that channel. It
456 * also can be used after calling silc_client_get_channel_resolve to
457 * resolve users on that channel.
461 * The resolving is done with WHOIS command. For this reason this
462 * command may take a long time because it resolves detailed user
466 void silc_client_get_clients_by_channel(SilcClient client,
467 SilcClientConnection conn,
468 SilcChannelEntry channel,
469 SilcGetClientCallback completion,
472 /****f* silcclient/SilcClientAPI/silc_client_get_client_by_id
476 * SilcClientEntry silc_client_get_client_by_id(SilcClient client,
477 * SilcClientConnection conn,
478 * SilcClientID *client_id);
482 * Find client entry by the client's ID. Returns the entry or NULL
483 * if the entry was not found. This checks the local cache and does
484 * not resolve anything from server.
488 * The returned SilcClientEntry has been referenced by the library and
489 * the caller must call silc_client_unref_client after the entry is not
493 SilcClientEntry silc_client_get_client_by_id(SilcClient client,
494 SilcClientConnection conn,
495 SilcClientID *client_id);
497 /****f* silcclient/SilcClientAPI/silc_client_get_client_by_id_resolve
502 * silc_client_get_client_by_id_resolve(SilcClient client,
503 * SilcClientConnection conn,
504 * SilcClientID *client_id,
505 * SilcBuffer attributes,
506 * SilcGetClientCallback completion,
511 * Same as silc_client_get_client_by_id but will always resolve the
512 * information from the server. Use this only if you know that you
513 * do not have the entry and the only thing you know about the client
514 * is its ID. When server returns the client information it will be
515 * cache and can be accessed locally at a later time. The resolving
516 * is done by sending WHOIS command.
518 * Returns command identifier for the resolving. It can be used to attach
519 * a pending command to it, if needed. Returns 0 on error.
521 * If the `attributes' is non-NULL then the buffer includes Requested
522 * Attributes which can be used to fetch very detailed information
523 * about the user. If it is NULL then only normal WHOIS query is
524 * made (for more information about attributes see SilcAttribute).
525 * Caller may create the `attributes' with silc_client_attributes_request
530 silc_client_get_client_by_id_resolve(SilcClient client,
531 SilcClientConnection conn,
532 SilcClientID *client_id,
533 SilcBuffer attributes,
534 SilcGetClientCallback completion,
537 /* SilcChannelEntry routines */
539 /****f* silcclient/SilcClientAPI/SilcGetChannelCallback
543 * typedef void (*SilcGetChannelCallback)(SilcClient client,
544 * SilcClientConnection conn,
546 * SilcDList channels,
551 * Callback function given to various channel resolving functions.
552 * The found entries are included in the `channels' list and each entry
553 * in the list is SilcChannelEntry. If `channels' is NULL then no such
554 * channel exist in the network and the `status' will indicate the error.
558 * If the application stores any of the SilcChannelEntry pointers from
559 * the `channels' list it must reference it with silc_client_ref_channel
562 * Application must not free the returned `channels' list.
565 typedef void (*SilcGetChannelCallback)(SilcClient client,
566 SilcClientConnection conn,
571 /****f* silcclient/SilcClientAPI/silc_client_lock_channel
575 * void silc_client_lock_channel(SilcChannelEntry channel_entry);
579 * Acquires lock for the channel entry indicate by `channel_entry'. When
580 * application wants to access `channel_entry' it must lock the entry
581 * before reading any data from the `channel_entry'. The lock must be
582 * unlocked with silc_client_unlock_channel.
586 * The entry must be unlocked before calling any Client Library API
587 * functions where the entry is given as argument, unless otherwise stated.
589 * The entry should not be locked for long periods of time. For example,
590 * it is not appropriate to hold the lock while waiting user interface to
591 * be drawn. The appropriate way is to read the data and duplicate it if
592 * necessary, unlock the entry, then draw on the user interface.
594 * This function is not needed if application is not multithreaded.
597 void silc_client_lock_channel(SilcChannelEntry channel_entry);
599 /****f* silcclient/SilcClientAPI/silc_client_unlock_channel
603 * void silc_client_unlock_channel(SilcChannelEntry channel_entry);
607 * Releases the lock acquired with silc_client_lock_channel.
610 void silc_client_unlock_channel(SilcChannelEntry channel_entry);
612 /****f* silcclient/SilcClientAPI/silc_client_ref_channel
617 * silc_client_ref_channel(SilcClient client,
618 * SilcClientConnection conn,
619 * SilcChannelEntry channel_entry);
623 * Takes a reference of the channel entry indicated by `channel_entry'
624 * The reference must be released by calling silc_client_unref_channel
625 * after it is not needed anymore. Returns `channel_entry'.
628 SilcChannelEntry silc_client_ref_channel(SilcClient client,
629 SilcClientConnection conn,
630 SilcChannelEntry channel_entry);
632 /****f* silcclient/SilcClientAPI/silc_client_unref_channel
636 * void silc_client_unref_channel(SilcClient client,
637 * SilcClientConnection conn,
638 * SilcChannelEntry channel_entry);
642 * Releases the channel entry reference indicated by `channel_entry'.
645 void silc_client_unref_channel(SilcClient client, SilcClientConnection conn,
646 SilcChannelEntry channel_entry);
648 /****f* silcclient/SilcClientAPI/silc_client_list_free_channel
652 * void silc_client_list_free_channel(SilcClient client,
653 * SilcClientConnection conn,
654 * SilcDList channel_list);
658 * Free's channel entry list that has been returned by various library
662 void silc_client_list_free_channels(SilcClient client,
663 SilcClientConnection conn,
664 SilcDList channel_list);
666 /****f* silcclient/SilcClientAPI/silc_client_get_channel
670 * SilcChannelEntry silc_client_get_channel(SilcClient client,
671 * SilcClientConnection conn,
672 * char *channel_name);
676 * Finds entry for channel by the channel name. Returns the entry or NULL
677 * if the entry was not found. It is found only if the client is joined
678 * to the channel. Use silc_client_get_channel_resolve or
679 * silc_client_get_channel_by_id_resolve to resolve channel that client
684 * The returned SilcChannelEntry has been referenced by the library and
685 * the caller must call silc_client_unref_channel after the entry is not
689 SilcChannelEntry silc_client_get_channel(SilcClient client,
690 SilcClientConnection conn,
693 /****f* silcclient/SilcClientAPI/silc_client_get_channel_resolve
697 * void silc_client_get_channel_resolve(SilcClient client,
698 * SilcClientConnection conn,
699 * char *channel_name,
700 * SilcGetChannelCallback completion,
705 * Resolves entry for channel by the channel name from the server.
706 * The resolving is done with IDENTIFY command. Note that users on
707 * the channel are not resolved at the same time. Use for example
708 * silc_client_get_clients_by_channel to resolve all users on a channel.
711 void silc_client_get_channel_resolve(SilcClient client,
712 SilcClientConnection conn,
714 SilcGetChannelCallback completion,
717 /****f* silcclient/SilcClientAPI/silc_client_get_channel_by_id
722 * silc_client_get_channel_by_id(SilcClient client,
723 * SilcClientConnection conn,
724 * SilcChannelID *channel_id);
728 * Finds channel entry by the channel ID. Returns the entry or NULL
729 * if the entry was not found. This checks the local cache and does
730 * not resolve anything from server.
734 * The returned SilcChannelEntry has been referenced by the library and
735 * the caller must call silc_client_unref_channel after the entry is not
739 SilcChannelEntry silc_client_get_channel_by_id(SilcClient client,
740 SilcClientConnection conn,
741 SilcChannelID *channel_id);
743 /****f* silcclient/SilcClientAPI/silc_client_get_channel_by_id_resolve
748 * silc_client_get_channel_by_id_resolve(SilcClient client,
749 * SilcClientConnection conn,
750 * SilcChannelID *channel_id,
751 * SilcGetClientCallback completion,
756 * Resolves the channel information (its name mainly) from the server
757 * by the `channel_id'. Use this only if you know that you do not have
758 * the entry cached locally. The resolving is done with IDENTIFY command.
760 * Returns command identifier for the resolving. It can be used to attach
761 * a pending command to it, if needed. Returns 0 on error.
763 * Note that users on the channel are not resolved at the same time.
764 * Use for example silc_client_get_clients_by_channel to resolve all
765 * users on a channel.
769 silc_client_get_channel_by_id_resolve(SilcClient client,
770 SilcClientConnection conn,
771 SilcChannelID *channel_id,
772 SilcGetChannelCallback completion,
775 /* SilcServerEntry routines */
777 /****f* silcclient/SilcClientAPI/SilcGetServerCallback
781 * typedef void (*SilcGetServerCallback)(SilcClient client,
782 * SilcClientConnection conn,
789 * Callback function given to various server resolving functions.
790 * The found entries are included in the `servers' list and each entry
791 * in the list is SilcServerEntry. If `server' is NULL then no such
792 * server exist in the network and the `status' will indicate the error.
796 * If the application stores any of the SilcServerEntry pointers from
797 * the `server' list it must reference it with silc_client_ref_server
800 * Application must not free the returned `server' list.
803 typedef void (*SilcGetServerCallback)(SilcClient client,
804 SilcClientConnection conn,
809 /****f* silcclient/SilcClientAPI/silc_client_lock_server
813 * void silc_client_lock_server(SilcServerEntry server_entry);
817 * Acquires lock for the server entry indicate by `server_entry'. When
818 * application wants to access `server_entry' it must lock the entry
819 * before reading any data from the `server_entry'. The lock must be
820 * unlocked with silc_client_unlock_server.
824 * The entry must be unlocked before calling any Client Library API
825 * functions where the entry is given as argument, unless otherwise stated.
827 * The entry should not be locked for long periods of time. For example,
828 * it is not appropriate to hold the lock while waiting user interface to
829 * be drawn. The appropriate way is to read the data and duplicate it if
830 * necessary, unlock the entry, then draw on the user interface.
832 * This function is not needed if application is not multithreaded.
835 void silc_client_lock_server(SilcServerEntry server_entry);
837 /****f* silcclient/SilcClientAPI/silc_client_unlock_server
841 * void silc_client_unlock_server(SilcServerEntry server_entry);
845 * Releases the lock acquired with silc_client_lock_server.
848 void silc_client_unlock_server(SilcServerEntry server_entry);
850 /****f* silcclient/SilcClientAPI/silc_client_ref_server
855 * silc_client_ref_server(SilcClient client,
856 * SilcClientConnection conn,
857 * SilcServerEntry server_entry);
861 * Takes a reference of the server entry indicated by `server_entry'
862 * The reference must be released by calling silc_client_unref_server
863 * after it is not needed anymore. Returns `server_entry'.
866 SilcServerEntry silc_client_ref_server(SilcClient client,
867 SilcClientConnection conn,
868 SilcServerEntry server_entry);
870 /****f* silcclient/SilcClientAPI/silc_client_unref_server
874 * void silc_client_unref_server(SilcClient client,
875 * SilcClientConnection conn,
876 * SilcServerEntry server_entry);
880 * Releases the server entry reference indicated by `server_entry'.
883 void silc_client_unref_server(SilcClient client, SilcClientConnection conn,
884 SilcServerEntry server_entry);
886 /****f* silcclient/SilcClientAPI/silc_client_list_free_server
890 * void silc_client_list_free_server(SilcClient client,
891 * SilcClientConnection conn,
892 * SilcDList server_list);
896 * Free's server entry list that has been returned by various library
900 void silc_client_list_free_servers(SilcClient client,
901 SilcClientConnection conn,
902 SilcDList server_list);
904 /****f* silcclient/SilcClientAPI/silc_client_get_server
908 * SilcServerEntry silc_client_get_server(SilcClient client,
909 * SilcClientConnection conn,
914 * Finds entry for server by the server name. Returns the entry or NULL
915 * if the entry was not found.
918 SilcServerEntry silc_client_get_server(SilcClient client,
919 SilcClientConnection conn,
922 /****f* silcclient/SilcClientAPI/silc_client_get_server_by_id
926 * SilcServerEntry silc_client_get_server_by_id(SilcClient client,
927 * SilcClientConnection conn,
928 * SilcServerID *server_id);
932 * Finds entry for server by the server ID. Returns the entry or NULL
933 * if the entry was not found.
936 SilcServerEntry silc_client_get_server_by_id(SilcClient client,
937 SilcClientConnection conn,
938 SilcServerID *server_id);
940 /****f* silcclient/SilcClientAPI/silc_client_get_server_by_id_resolve
945 * silc_client_get_server_by_id_resolve(SilcClient client,
946 * SilcClientConnection conn,
947 * SilcServerID *server_id,
948 * SilcGetServerCallback completion,
953 * Resolves the server information by the `server_id'. The resolved
954 * server is returned into the `completion' callback.
956 * Returns command identifier for the resolving. It can be used to attach
957 * a pending command to it, if needed. Returns 0 on error.
961 silc_client_get_server_by_id_resolve(SilcClient client,
962 SilcClientConnection conn,
963 SilcServerID *server_id,
964 SilcGetServerCallback completion,
967 #endif /* SILCCLIENT_ENTRY_H */