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")
11 #define IS_CHANNEL(channel) \
12 (CHANNEL(channel) ? TRUE : FALSE)
14 #define STRUCT_SERVER_REC SERVER_REC
16 #include "channel-rec.h"
19 extern GSList *channels;
21 /* Create new channel record */
22 void channel_init(CHANNEL_REC *channel, SERVER_REC *server, const char *name,
23 const char *visible_name, int automatic);
24 void channel_destroy(CHANNEL_REC *channel);
26 /* find channel by name, if `server' is NULL, search from all servers */
27 CHANNEL_REC *channel_find(SERVER_REC *server, const char *name);
29 void channel_change_name(CHANNEL_REC *channel, const char *name);
30 void channel_change_visible_name(CHANNEL_REC *channel, const char *name);
32 /* Send the auto send command to channel */
33 void channel_send_autocommands(CHANNEL_REC *channel);
35 void channels_init(void);
36 void channels_deinit(void);