Structure SilcClientEntry
NAME
typedef struct SilcClientEntryStruct { ... } *SilcClientEntry;
DESCRIPTION
This structure represents a client or a user in the SILC network.
The local user has this structure also and it can be accessed from
SilcClientConnection structure. All other users in the SILC network
that are accessed using the Client Library routines will have their
own SilcClientEntry structure. For example, when finding users by
their nickname the Client Library returns this structure back to
the application. All strings in the structure are UTF-8 encoded.
Application may store its own pointer into the context pointer in
this structure.
NOTES
If application wants to store nickname or any of the other strings
it should always duplicated them.
None of the string arrays are set if the first character is '\0'.
All string arrays are always zero ('\0') terminated.
If application stores the SilcClientEntry it must always take
a reference of it by calling silc_client_ref_client function. The
reference must be released after it is not needed anymore by calling
silc_client_unref_client function.
SOURCE
struct SilcClientEntryStruct {
char nickname[256 + 1]; /* Nickname */
char username[128 + 1]; /* Username */
char hostname[256 + 1]; /* Hostname */
char server [256 + 1]; /* SILC server name */
char *realname; /* Realname (userinfo) */
char *nickname_normalized; /* Normalized nickname */
SilcClientID id; /* The Client ID */
SilcUInt32 mode; /* User mode in SILC, see SilcUserMode */
SilcPublicKey public_key; /* User's public key, may be NULL */
SilcHashTable channels; /* Channels client has joined */
SilcDList attrs; /* Requested Attributes (maybe NULL) */
unsigned char fingerprint[20]; /* SHA-1 fingerprint of the public key */
void *context; /* Application specific context */
SilcClientEntryInternal internal;
};
|