5 Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
7 Copyright (C) 1997 - 2000 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; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
24 /* Forward declarations */
25 typedef struct SilcNotifyPayloadStruct *SilcNotifyPayload;
27 /* Type definition of notify type */
28 typedef unsigned short SilcNotifyType;
30 /* SILC notify types. Server may send these notify types to client to
31 notify of some action. */
32 #define SILC_NOTIFY_TYPE_NONE 0 /* no specific type */
33 #define SILC_NOTIFY_TYPE_INVITE 1 /* "invites you to channel" */
34 #define SILC_NOTIFY_TYPE_JOIN 2 /* "has joined channel" */
35 #define SILC_NOTIFY_TYPE_LEAVE 3 /* "has left channel" */
36 #define SILC_NOTIFY_TYPE_SIGNOFF 4 /* "signoff" */
37 #define SILC_NOTIFY_TYPE_TOPIC_SET 5 /* "topic has been changed" */
38 #define SILC_NOTIFY_TYPE_NICK_CHANGE 6 /* "has changed nickname" */
39 #define SILC_NOTIFY_TYPE_CMODE_CHANGE 7 /* "has changed channel mode" */
40 #define SILC_NOTIFY_TYPE_CUMODE_CHANGE 8 /* "has change mode" */
41 #define SILC_NOTIFY_TYPE_MOTD 9 /* message of the day */
42 #define SILC_NOTIFY_TYPE_CHANNEL_CHANGE 10 /* Channel's ID has changed */
43 #define SILC_NOTIFY_TYPE_SERVER_SIGNOFF 11 /* Server quitting SILC */
44 #define SILC_NOTIFY_TYPE_KICKED 12 /* Kicked from channel */
45 #define SILC_NOTIFY_TYPE_KILLED 13 /* Killed from the network */
46 #define SILC_NOTIFY_TYPE_UMODE_CHANGE 14 /* user mode was changed */
49 SilcNotifyPayload silc_notify_payload_parse(SilcBuffer buffer);
50 SilcBuffer silc_notify_payload_encode(SilcNotifyType type, unsigned int argc,
52 void silc_notify_payload_free(SilcNotifyPayload payload);
53 SilcNotifyType silc_notify_get_type(SilcNotifyPayload payload);
54 unsigned int silc_notify_get_arg_num(SilcNotifyPayload payload);
55 SilcArgumentPayload silc_notify_get_args(SilcNotifyPayload payload);