updates.
[silc.git] / lib / silccore / silcnotify.h
1 /*
2
3   silcnotify.h
4
5   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6
7   Copyright (C) 1997 - 2000 Pekka Riikonen
8
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.
13   
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.
18
19 */
20
21 #ifndef SILCNOTIFY_H
22 #define SILCNOTIFY_H
23
24 /* Forward declarations */
25 typedef struct SilcNotifyPayloadStruct *SilcNotifyPayload;
26
27 /* Type definition of notify type */
28 typedef unsigned short SilcNotifyType;
29
30 /* SILC notify types. Server may send these notify types to client to
31    notify of some action. Server also sends human readable notify message
32    to the client which client may ignore. */
33 #define SILC_NOTIFY_TYPE_NONE            0 /* no specific type */
34 #define SILC_NOTIFY_TYPE_INVITE          1 /* "invites you to channel" */
35 #define SILC_NOTIFY_TYPE_JOIN            2 /* "has joined channel" */
36 #define SILC_NOTIFY_TYPE_LEAVE           3 /* "has left channel" */
37 #define SILC_NOTIFY_TYPE_SIGNOFF         4 /* "signoff" */
38 #define SILC_NOTIFY_TYPE_TOPIC_SET       5 /* "topic has been changed" */
39 #define SILC_NOTIFY_TYPE_NICK_CHANGE     6 /* "has changed nickname" */
40 #define SILC_NOTIFY_TYPE_CMODE_CHANGE    7 /* "has changed channel mode" */
41 #define SILC_NOTIFY_TYPE_CUMODE_CHANGE   8 /* "has change mode" */
42 #define SILC_NOTIFY_TYPE_MOTD            9 /* message of the day */
43 #define SILC_NOTIFY_TYPE_CHANNEL_CHANGE  10 /* Channel's ID has changed */
44 #define SILC_NOTIFY_TYPE_SERVER_SIGNOFF  11 /* Server quitting SILC */
45 #define SILC_NOTIFY_TYPE_KICKED          12 /* Kicked from channel */
46 #define SILC_NOTIFY_TYPE_KILLED          13 /* Killed from the network */
47
48 /* Prototypes */
49 SilcNotifyPayload silc_notify_payload_parse(SilcBuffer buffer);
50 SilcBuffer silc_notify_payload_encode(SilcNotifyType type, unsigned int argc, 
51                                       va_list ap);
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);
56
57 #endif