72
|
1 #ifndef __ROSTER_H__ |
|
2 #define __ROSTER_H__ 1 |
|
3 |
|
4 #include <glib.h> |
|
5 |
|
6 #ifdef MCABBER_TESTUNIT |
|
7 # include "test_roster_main.h" |
|
8 #else |
|
9 # include "jabglue.h" |
|
10 #endif |
|
11 |
|
12 enum findwhat { |
|
13 jidsearch, |
|
14 namesearch |
|
15 }; |
|
16 |
|
17 // Roster_type is a set of flags, so values should be 2^n |
|
18 #define ROSTER_TYPE_USER 1 |
|
19 #define ROSTER_TYPE_GROUP 2 |
|
20 #define ROSTER_TYPE_AGENT 4 |
|
21 |
|
22 // Flags: |
|
23 #define ROSTER_FLAG_MSG 1 // Message not read |
|
24 #define ROSTER_FLAG_HIDE 2 // Group hidden (or buddy window closed) |
|
25 #define ROSTER_FLAG_LOCK 4 // Node should not be removed from buddylist |
|
26 // ROSTER_FLAG_LOCAL 8 // Buddy not on server's roster (??) |
|
27 |
|
28 extern GList *buddylist; |
78
|
29 extern GList *current_buddy; |
72
|
30 |
78
|
31 // Macros... |
|
32 |
79
|
33 #define BUDDATA(glist_node) ((glist_node)->data) |
|
34 #define CURRENT_JID buddy_getjid(BUDDATA(current_buddy)) |
78
|
35 |
|
36 // Prototypes... |
|
37 GSList *roster_add_group(const char *name); |
|
38 GSList *roster_add_user(const char *jid, const char *name, const char *group, |
|
39 guint type); |
|
40 void roster_del_user(const char *jid); |
|
41 void roster_setstatus(const char *jid, enum imstatus bstat); |
80
|
42 void roster_setflags(const char *jid, guint flags, guint value); |
89
|
43 void roster_settype(const char *jid, guint type); |
90
|
44 enum imstatus roster_getstatus(const char *jid); |
89
|
45 guint roster_gettype(const char *jid); |
72
|
46 |
|
47 void buddylist_hide_offline_buddies(int hide); |
|
48 void buddy_hide_group(gpointer rosterdata, int hide); |
|
49 void buddylist_build(void); |
|
50 const char *buddy_getjid(gpointer rosterdata); |
|
51 const char *buddy_getname(gpointer rosterdata); |
|
52 guint buddy_gettype(gpointer rosterdata); |
|
53 enum imstatus buddy_getstatus(gpointer rosterdata); |
|
54 guint buddy_getflags(gpointer rosterdata); |
|
55 |
|
56 #endif /* __ROSTER_H__ */ |