Added SILC Thread Queue API
[crypto.git] / apps / irssi / src / core / chatnets.h
1 #ifndef __CHATNETS_H
2 #define __CHATNETS_H
3
4 #include "modules.h"
5
6 /* Returns CHATNET_REC if it's chatnet, NULL if it isn't. */
7 #define CHATNET(chatnet) \
8         MODULE_CHECK_CAST(chatnet, CHATNET_REC, type, "CHATNET")
9
10 #define IS_CHATNET(chatnet) \
11         (CHATNET(chatnet) ? TRUE : FALSE)
12
13 struct _CHATNET_REC {
14 #include "chatnet-rec.h"
15 };
16
17 extern GSList *chatnets; /* list of available chat networks */
18
19 /* add the chatnet to chat networks list */
20 void chatnet_create(CHATNET_REC *chatnet);
21 /* remove the chatnet from chat networks list */
22 void chatnet_remove(CHATNET_REC *chatnet);
23 /* destroy the chatnet structure. doesn't remove from config file */
24 void chatnet_destroy(CHATNET_REC *chatnet);
25
26 /* Find the chat network by name */
27 CHATNET_REC *chatnet_find(const char *name);
28
29 void chatnets_init(void);
30 void chatnets_deinit(void);
31
32 #endif