*
* Ask passphrase callback. This is called by the application when the
* library calls `ask_passphrase' client operation. The callback delivers
- * the passphrase to the library.
+ * the passphrase to the library. The passphrases in SILC protocol
+ * MUST be in UTF-8 encoding, therefore the `passphrase' SHOULD be UTF-8
+ * encoded, and if it is not then library will attempt to encode it.
*
***/
typedef void (*SilcAskPassphrase)(unsigned char *passphrase,
`msg' maybe NULL. */
void (*channel_message)(SilcClient client, SilcClientConnection conn,
SilcClientEntry sender, SilcChannelEntry channel,
- SilcMessageFlags flags, char *msg);
+ SilcMessageFlags flags,
+ const unsigned char *message,
+ SilcUInt32 message_len);
/* Private message to the client. The `sender' is the sender of the
message. */
void (*private_message)(SilcClient client, SilcClientConnection conn,
SilcClientEntry sender, SilcMessageFlags flags,
- char *msg);
+ const unsigned char *message,
+ SilcUInt32 message_len);
/* Notify message to the client. The notify arguments are sent in the
same order as servers sends them. The arguments are same as received
/* Ask (interact, that is) a passphrase from user. The passphrase is
returned to the library by calling the `completion' callback with
- the `context'. */
+ the `context'. The returned passphrase SHOULD be in UTF-8 encoded,
+ if not then the library will attempt to encode. */
void (*ask_passphrase)(SilcClient client, SilcClientConnection conn,
SilcAskPassphrase completion, void *context);