~ubuntu-branches/ubuntu/trusty/irssi-plugin-xmpp/trusty

« back to all changes in this revision

Viewing changes to src/core/xmpp-nicklist.h

  • Committer: Bazaar Package Importer
  • Author(s): David Ammouial
  • Date: 2009-05-12 12:14:44 UTC
  • mfrom: (1.1.3 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090512121444-5jeho5h3zsy4oij7
Tags: 0.13+cvs20090406-1
* New CVS snapshot, built against irssi-dev 0.8.13:
  - New features and bugfixes.
  - Fix segfault when successfully identified (Closes: #521227).
  - Fix build error (Closes: #527697)
* Depend on irssi >=0.8.13, build-depend on irssi-dev >=0.8.13.
* Bump Standards-Version to 3.8.1 (no changes needed).
* Add INTERNAL to documentation files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: xmpp-nicklist.h,v 1.1 2007/10/15 11:57:09 errtu Exp $ */
2
 
 
3
 
#ifndef __XMPP_NICKLIST_H
4
 
#define __XMPP_NICKLIST_H
5
 
 
6
 
#include "nicklist.h"
7
 
 
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")
11
 
 
12
 
#define IS_XMPP_NICK(nick)                                      \
13
 
        (XMPP_NICK(nick) ? TRUE : FALSE)
14
 
 
15
 
#define xmpp_nicklist_find(channel, name)                       \
16
 
        XMPP_NICK(nicklist_find(CHANNEL(channel), name))
17
 
 
18
 
struct _XMPP_NICK_REC {
19
 
        #include "nick-rec.h"
20
 
 
21
 
        int      show;
22
 
        char    *status;
23
 
 
24
 
        int      affiliation;
25
 
        int      role;
26
 
};
27
 
 
28
 
enum {
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
34
 
};
35
 
extern const char *xmpp_nicklist_affiliation[];
36
 
 
37
 
enum {
38
 
        XMPP_NICKLIST_ROLE_NONE,
39
 
        XMPP_NICKLIST_ROLE_MODERATOR,
40
 
        XMPP_NICKLIST_ROLE_PARTICIPANT,
41
 
        XMPP_NICKLIST_ROLE_VISITOR
42
 
};
43
 
extern const char *xmpp_nicklist_role[];
44
 
 
45
 
__BEGIN_DECLS
46
 
XMPP_NICK_REC   *xmpp_nicklist_insert(XMPP_CHANNEL_REC *, const char *,
47
 
                     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,
55
 
                     const char *);
56
 
 
57
 
void xmpp_nicklist_init(void);
58
 
void xmpp_nicklist_deinit(void);
59
 
__END_DECLS
60
 
 
61
 
#endif