Added SILC Thread Queue API
[crypto.git] / apps / irssi / src / core / channels-setup.h
1 #ifndef __CHANNELS_SETUP_H
2 #define __CHANNELS_SETUP_H
3
4 #include "modules.h"
5
6 #define CHANNEL_SETUP(server) \
7         MODULE_CHECK_CAST(server, CHANNEL_SETUP_REC, type, "CHANNEL SETUP")
8
9 #define IS_CHANNEL_SETUP(server) \
10         (CHANNEL_SETUP(server) ? TRUE : FALSE)
11
12 struct _CHANNEL_SETUP_REC {
13 #include "channel-setup-rec.h"
14 };
15
16 extern GSList *setupchannels;
17
18 void channels_setup_init(void);
19 void channels_setup_deinit(void);
20
21 void channel_setup_create(CHANNEL_SETUP_REC *channel);
22 void channel_setup_remove(CHANNEL_SETUP_REC *channel);
23
24 CHANNEL_SETUP_REC *channel_setup_find(const char *channel,
25                                       const char *chatnet);
26
27 #define channel_chatnet_match(rec, chatnet) \
28         ((rec) == NULL || (rec)[0] == '\0' || \
29          ((chatnet) != NULL && g_strcasecmp(rec, chatnet) == 0))
30
31 #endif