1
/* $Id: xmpp-nicklist.h,v 1.1 2007/10/15 11:57:09 errtu Exp $ */
3
#ifndef __XMPP_NICKLIST_H
4
#define __XMPP_NICKLIST_H
8
/* Returns XMPP_NICK_REC if it's XMPP channel, NULL if it isn't. */
9
#define XMPP_NICK(nick) \
10
PROTO_CHECK_CAST(NICK(nick), XMPP_NICK_REC, chat_type, "XMPP")
12
#define IS_XMPP_NICK(nick) \
13
(XMPP_NICK(nick) ? TRUE : FALSE)
15
#define xmpp_nicklist_find(channel, name) \
16
XMPP_NICK(nicklist_find(CHANNEL(channel), name))
18
struct _XMPP_NICK_REC {
29
XMPP_NICKLIST_AFFILIATION_NONE,
30
XMPP_NICKLIST_AFFILIATION_OWNER,
31
XMPP_NICKLIST_AFFILIATION_ADMIN,
32
XMPP_NICKLIST_AFFILIATION_MEMBER,
33
XMPP_NICKLIST_AFFILIATION_OUTCAST
35
extern const char *xmpp_nicklist_affiliation[];
38
XMPP_NICKLIST_ROLE_NONE,
39
XMPP_NICKLIST_ROLE_MODERATOR,
40
XMPP_NICKLIST_ROLE_PARTICIPANT,
41
XMPP_NICKLIST_ROLE_VISITOR
43
extern const char *xmpp_nicklist_role[];
46
XMPP_NICK_REC *xmpp_nicklist_insert(XMPP_CHANNEL_REC *, const char *,
48
void xmpp_nicklist_rename(XMPP_CHANNEL_REC *, XMPP_NICK_REC *,
49
const char *, const char *);
50
int xmpp_nicklist_get_affiliation(const char *);
51
int xmpp_nicklist_get_role(const char *);
52
gboolean xmpp_nicklist_modes_changed(XMPP_NICK_REC *, int, int);
53
void xmpp_nicklist_set_modes(XMPP_NICK_REC *, int, int);
54
void xmpp_nicklist_set_presence(XMPP_NICK_REC *, int,
57
void xmpp_nicklist_init(void);
58
void xmpp_nicklist_deinit(void);