Merged silc_1_0_branch to trunk.
[silc.git] / apps / irssi / src / silc / core / silc-chatnets.h
1 #ifndef __SILC_CHATNETS_H
2 #define __SILC_CHATNETS_H
3
4 #include "chat-protocols.h"
5 #include "chatnets.h"
6
7 /* returns SILC_CHATNET_REC if it's SILC network, NULL if it isn't */
8 #define SILC_CHATNET(chatnet) \
9         PROTO_CHECK_CAST(CHATNET(chatnet), SILC_CHATNET_REC, chat_type, "SILC")
10
11 #define IS_SILC_CHATNET(chatnet) \
12         (SILC_CHATNET(chatnet) ? TRUE : FALSE)
13
14 #define IS_SILCNET(silcnet) IS_SILC_CHATNET(silcnet)
15 #define SILCNET(silcnet) SILC_CHATNET(silcnet)
16
17 struct _SILC_CHATNET_REC {
18 #include "chatnet-rec.h"
19 };
20
21 typedef struct _SILC_CHATNET_REC SILC_CHATNET_REC;
22
23 void silcnet_create(SILC_CHATNET_REC *rec);
24
25 #define silc_chatnet_find(name) \
26         SILC_CHATNET(chatnet_find(name))
27 #define silcnet_find(name) silc_chatnet_find(name)
28
29 void silc_chatnets_init(void);
30 void silc_chatnets_deinit(void);
31
32 #endif