addition of silc.css
[crypto.git] / apps / irssi / src / core / channels.h
1 #ifndef __CHANNELS_H
2 #define __CHANNELS_H
3
4 #include "modules.h"
5
6 /* Returns CHANNEL_REC if it's channel, NULL if it isn't. */
7 #define CHANNEL(channel) \
8         MODULE_CHECK_CAST_MODULE(channel, CHANNEL_REC, type, \
9                               "WINDOW ITEM TYPE", "CHANNEL")
10
11 #define IS_CHANNEL(channel) \
12         (CHANNEL(channel) ? TRUE : FALSE)
13
14 #define STRUCT_SERVER_REC SERVER_REC
15 struct _CHANNEL_REC {
16 #include "channel-rec.h"
17 };
18
19 extern GSList *channels;
20
21 /* Create new channel record */
22 void channel_init(CHANNEL_REC *channel, int automatic);
23 void channel_destroy(CHANNEL_REC *channel);
24
25 /* find channel by name, if `server' is NULL, search from all servers */
26 CHANNEL_REC *channel_find(SERVER_REC *server, const char *name);
27
28 /* Send the auto send command to channel */
29 void channel_send_autocommands(CHANNEL_REC *channel);
30
31 void channels_init(void);
32 void channels_deinit(void);
33
34 #endif