annotate mcabber/src/roster.h @ 1292:382ec54b584e

Muc nick coloring functionality
author Michal 'vorner' Vaner <vorner@ucw.cz>
date Tue, 28 Aug 2007 10:11:39 +0200
parents 230dca34dbea
children 0dda8238af21
rev   line source
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
1 #ifndef __ROSTER_H__
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
2 #define __ROSTER_H__ 1
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
3
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
4 #include <glib.h>
625
028c01940490 Show presence timestamps in "/info" and "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 610
diff changeset
5 #include <time.h>
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
6
1043
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
7 #include "pgp.h"
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
8
889
ae93e69aaaaf Fix up pending message flag for the status special buffer
Mikael Berthe <mikael@lilotux.net>
parents: 885
diff changeset
9 #define SPECIAL_BUFFER_STATUS_ID "[status]"
ae93e69aaaaf Fix up pending message flag for the status special buffer
Mikael Berthe <mikael@lilotux.net>
parents: 885
diff changeset
10
572
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
11 enum imstatus {
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
12 offline,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
13 available,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
14 invisible,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
15 freeforchat,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
16 dontdisturb,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
17 notavail,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
18 away,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
19 imstatus_size
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
20 };
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
21
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
22 enum imrole {
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
23 role_none,
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
24 role_moderator,
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
25 role_participant,
585
7eff2c1481fa Add "/room affil" and "/room role"
Mikael Berthe <mikael@lilotux.net>
parents: 584
diff changeset
26 role_visitor,
7eff2c1481fa Add "/room affil" and "/room role"
Mikael Berthe <mikael@lilotux.net>
parents: 584
diff changeset
27 imrole_size
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
28 };
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
29
584
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
30 extern char *strrole[]; // Should match enum above
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
31
572
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
32 enum imaffiliation {
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
33 affil_none,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
34 affil_owner,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
35 affil_admin,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
36 affil_member,
585
7eff2c1481fa Add "/room affil" and "/room role"
Mikael Berthe <mikael@lilotux.net>
parents: 584
diff changeset
37 affil_outcast,
7eff2c1481fa Add "/room affil" and "/room role"
Mikael Berthe <mikael@lilotux.net>
parents: 584
diff changeset
38 imaffiliation_size
572
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
39 };
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
40
584
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
41 extern char *straffil[]; // Should match enum above
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
42
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
43 enum subscr {
603
9516db839e08 Store subscription data
Mikael Berthe <mikael@lilotux.net>
parents: 585
diff changeset
44 sub_none = 0,
9516db839e08 Store subscription data
Mikael Berthe <mikael@lilotux.net>
parents: 585
diff changeset
45 sub_pending = 1,
965
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
46 sub_to = 1 << 1,
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
47 sub_from = 1 << 2,
603
9516db839e08 Store subscription data
Mikael Berthe <mikael@lilotux.net>
parents: 585
diff changeset
48 sub_both = sub_to|sub_from,
965
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
49 sub_remove = 1 << 3
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
50 };
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
51
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
52 enum findwhat {
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
53 jidsearch,
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
54 namesearch
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
55 };
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
56
584
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
57 struct role_affil {
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
58 enum { type_role, type_affil } type;
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
59 union {
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
60 enum imrole role;
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
61 enum imaffiliation affil;
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
62 } val;
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
63 };
414fbf558f1e jb_room_setattrib()
Mikael Berthe <mikael@lilotux.net>
parents: 580
diff changeset
64
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
65 // Roster_type is a set of flags, so values should be 2^n
965
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
66 #define ROSTER_TYPE_USER 1U
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
67 #define ROSTER_TYPE_GROUP (1U<<1)
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
68 #define ROSTER_TYPE_AGENT (1U<<2)
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
69 #define ROSTER_TYPE_ROOM (1U<<3)
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
70 #define ROSTER_TYPE_SPECIAL (1U<<4)
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
71
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
72 // Flags:
965
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
73 #define ROSTER_FLAG_MSG 1U // Message not read
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
74 #define ROSTER_FLAG_HIDE (1U<<1) // Group hidden (or buddy window closed)
1bdf0f1b16c0 Use U suffix for unsigned defines
Mikael Berthe <mikael@lilotux.net>
parents: 952
diff changeset
75 #define ROSTER_FLAG_LOCK (1U<<2) // Node should not be removed from buddylist
974
36f7753dfb59 Add /roster item_{lock,unlock}
Mikael Berthe <mikael@lilotux.net>
parents: 965
diff changeset
76 #define ROSTER_FLAG_USRLOCK (1U<<3) // Node should not be removed from buddylist
36f7753dfb59 Add /roster item_{lock,unlock}
Mikael Berthe <mikael@lilotux.net>
parents: 965
diff changeset
77 // ROSTER_FLAG_LOCAL (1U<<4) // Buddy not on server's roster (??)
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
78
987
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
79 #define JEP0022
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
80 #define JEP0085
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
81
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
82 struct jep0022 {
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
83 guint support;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
84 guint last_state_sent;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
85 gchar *last_msgid_sent;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
86 guint last_state_rcvd;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
87 gchar *last_msgid_rcvd;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
88 };
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
89 struct jep0085 {
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
90 guint support;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
91 guint last_state_sent;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
92 guint last_state_rcvd;
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
93 };
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
94
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
95 enum chatstate_support {
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
96 CHATSTATES_SUPPORT_UNKNOWN = 0,
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
97 CHATSTATES_SUPPORT_PROBED,
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
98 CHATSTATES_SUPPORT_NONE,
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
99 CHATSTATES_SUPPORT_OK
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
100 };
986
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
101
1043
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
102 struct pgp_data {
1065
230dca34dbea Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents: 1043
diff changeset
103 gchar *sign_keyid; // KeyId used by the contact to sign their presence/msg
1043
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
104 #ifdef HAVE_GPGME
1065
230dca34dbea Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents: 1043
diff changeset
105 gpgme_sigsum_t last_sigsum; // Last signature summary
1043
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
106 #endif
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
107 };
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
108
986
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
109 /* Message event and chat state flags */
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
110 #define ROSTER_EVENT_NONE 0U
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
111 /* JEP-22 Message Events */
987
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
112 #define ROSTER_EVENT_OFFLINE (1U<<0)
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
113 #define ROSTER_EVENT_DELIVERED (1U<<1)
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
114 #define ROSTER_EVENT_DISPLAYED (1U<<2)
986
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
115 /* JEP-22 & JEP-85 */
987
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
116 #define ROSTER_EVENT_COMPOSING (1U<<3)
986
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
117 /* JEP-85 Chat State Notifications */
987
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
118 #define ROSTER_EVENT_ACTIVE (1U<<4)
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
119 #define ROSTER_EVENT_PAUSED (1U<<5)
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
120 #define ROSTER_EVENT_INACTIVE (1U<<6)
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
121 #define ROSTER_EVENT_GONE (1U<<7)
986
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
122
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
123 extern GList *buddylist;
78
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
124 extern GList *current_buddy;
330
a9013124ede6 Add "/roster alternate"
Mikael Berthe <mikael@lilotux.net>
parents: 318
diff changeset
125 extern GList *alternate_buddy;
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
126
78
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
127 // Macros...
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
128
79
ff8046b6de02 [/trunk] Changeset 93 by mikael
mikael
parents: 78
diff changeset
129 #define BUDDATA(glist_node) ((glist_node)->data)
ff8046b6de02 [/trunk] Changeset 93 by mikael
mikael
parents: 78
diff changeset
130 #define CURRENT_JID buddy_getjid(BUDDATA(current_buddy))
78
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
131
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
132 // Prototypes...
848
a9161d2dc414 Introduce special buffer stuff
Mikael Berthe <mikael@lilotux.net>
parents: 819
diff changeset
133 void roster_init(void);
78
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
134 GSList *roster_add_group(const char *name);
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
135 GSList *roster_add_user(const char *jid, const char *name, const char *group,
603
9516db839e08 Store subscription data
Mikael Berthe <mikael@lilotux.net>
parents: 585
diff changeset
136 guint type, enum subscr esub);
447
03bb57383cea Initial Multi-User Chat support
Mikael Berthe <mikael@lilotux.net>
parents: 439
diff changeset
137 GSList *roster_find(const char *jidname, enum findwhat type, guint roster_type);
78
d001d8fb876d [/trunk] Changeset 92 by mikael
mikael
parents: 72
diff changeset
138 void roster_del_user(const char *jid);
164
faf534be8ff0 [/trunk] Changeset 176 by mikael
mikael
parents: 148
diff changeset
139 void roster_free(void);
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
140 void roster_setstatus(const char *jid, const char *resname, gchar prio,
468
644b8bf9ca4d Improve MUC presence messages handling
Mikael Berthe <mikael@lilotux.net>
parents: 447
diff changeset
141 enum imstatus bstat, const char *status_msg,
625
028c01940490 Show presence timestamps in "/info" and "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 610
diff changeset
142 time_t timestamp,
572
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
143 enum imrole role, enum imaffiliation affil,
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
144 const char *realjid);
80
7fb661f19a77 [/trunk] Changeset 94 by mikael
mikael
parents: 79
diff changeset
145 void roster_setflags(const char *jid, guint flags, guint value);
889
ae93e69aaaaf Fix up pending message flag for the status special buffer
Mikael Berthe <mikael@lilotux.net>
parents: 885
diff changeset
146 void roster_msg_setflag(const char *jid, guint special, guint value);
510
6c3cd3aa4a91 New 'buddy_format' option
Mikael Berthe <mikael@lilotux.net>
parents: 489
diff changeset
147 const char *roster_getname(const char *jid);
863
4f1a93faffea Add roster_getnickname()
Mikael Berthe <mikael@lilotux.net>
parents: 848
diff changeset
148 const char *roster_getnickname(const char *jid);
89
d39f15683c34 [/trunk] Changeset 103 by mikael
mikael
parents: 80
diff changeset
149 void roster_settype(const char *jid, guint type);
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
150 enum imstatus roster_getstatus(const char *jid, const char *resname);
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
151 const char *roster_getstatusmsg(const char *jid, const char *resname);
89
d39f15683c34 [/trunk] Changeset 103 by mikael
mikael
parents: 80
diff changeset
152 guint roster_gettype(const char *jid);
819
c2d7d9dd4193 New option 'block_unsubscribed'
Mikael Berthe <mikael@lilotux.net>
parents: 792
diff changeset
153 guint roster_getsubscription(const char *jid);
610
0e8247cf2bd1 Consider buddies as offline when they have cancelled our subscription
Mikael Berthe <mikael@lilotux.net>
parents: 603
diff changeset
154 void roster_unsubscribed(const char *jid);
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
155
166
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
156 void buddylist_build(void);
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
157 void buddy_hide_group(gpointer rosterdata, int hide);
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
158 void buddylist_set_hide_offline_buddies(int hide);
120
cfd3df636d5f [/trunk] Changeset 133 by mikael
mikael
parents: 119
diff changeset
159 inline int buddylist_get_hide_offline_buddies(void);
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
160 const char *buddy_getjid(gpointer rosterdata);
207
41fafa0ecfd8 [/trunk] Changeset 219 by mikael
mikael
parents: 166
diff changeset
161 void buddy_setname(gpointer rosterdata, char *newname);
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
162 const char *buddy_getname(gpointer rosterdata);
469
a926523d2392 Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents: 468
diff changeset
163 void buddy_setnickname(gpointer rosterdata, const char *newname);
447
03bb57383cea Initial Multi-User Chat support
Mikael Berthe <mikael@lilotux.net>
parents: 439
diff changeset
164 const char *buddy_getnickname(gpointer rosterdata);
952
527d6f234924 Small code cleanup
Mikael Berthe <mikael@lilotux.net>
parents: 889
diff changeset
165 void buddy_setinsideroom(gpointer rosterdata, guint inside);
527d6f234924 Small code cleanup
Mikael Berthe <mikael@lilotux.net>
parents: 889
diff changeset
166 guint buddy_getinsideroom(gpointer rosterdata);
548
265c50238a48 Add buddy_{get,set}topic()
Mikael Berthe <mikael@lilotux.net>
parents: 539
diff changeset
167 void buddy_settopic(gpointer rosterdata, const char *newtopic);
265c50238a48 Add buddy_{get,set}topic()
Mikael Berthe <mikael@lilotux.net>
parents: 539
diff changeset
168 const char *buddy_gettopic(gpointer rosterdata);
489
21ab22a60bcb Auto-convert a roster item to "room" type when receiving a groupchat message
Mikael Berthe <mikael@lilotux.net>
parents: 480
diff changeset
169 void buddy_settype(gpointer rosterdata, guint type);
166
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
170 guint buddy_gettype(gpointer rosterdata);
603
9516db839e08 Store subscription data
Mikael Berthe <mikael@lilotux.net>
parents: 585
diff changeset
171 guint buddy_getsubscription(gpointer rosterdata);
210
f64818ba3503 [/trunk] Changeset 222 by mikael
mikael
parents: 207
diff changeset
172 void buddy_setgroup(gpointer rosterdata, char *newgroupname);
207
41fafa0ecfd8 [/trunk] Changeset 219 by mikael
mikael
parents: 166
diff changeset
173 const char *buddy_getgroupname(gpointer rosterdata);
166
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
174 gpointer buddy_getgroup(gpointer rosterdata);
438
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
175 enum imstatus buddy_getstatus(gpointer rosterdata, const char *resname);
b44be19d6229 Handle multiple resources for the same buddy
Mikael Berthe <mikael@lilotux.net>
parents: 364
diff changeset
176 const char *buddy_getstatusmsg(gpointer rosterdata, const char *resname);
625
028c01940490 Show presence timestamps in "/info" and "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 610
diff changeset
177 time_t buddy_getstatustime(gpointer rosterdata, const char *resname);
439
63562fd409a1 /info can show multiple resources
Mikael Berthe <mikael@lilotux.net>
parents: 438
diff changeset
178 gchar buddy_getresourceprio(gpointer rosterdata, const char *resname);
652
b243d3b3ff1b We do not need buddy_isresource() anymore
Mikael Berthe <mikael@lilotux.net>
parents: 644
diff changeset
179 //int buddy_isresource(gpointer rosterdata);
439
63562fd409a1 /info can show multiple resources
Mikael Berthe <mikael@lilotux.net>
parents: 438
diff changeset
180 GSList *buddy_getresources(gpointer rosterdata);
792
89ad7b530b3c MUC: Fix completion for UTF-8 nicknames
Mikael Berthe <mikael@lilotux.net>
parents: 652
diff changeset
181 GSList *buddy_getresources_locale(gpointer rosterdata);
468
644b8bf9ca4d Improve MUC presence messages handling
Mikael Berthe <mikael@lilotux.net>
parents: 447
diff changeset
182 void buddy_resource_setname(gpointer rosterdata, const char *resname,
644b8bf9ca4d Improve MUC presence messages handling
Mikael Berthe <mikael@lilotux.net>
parents: 447
diff changeset
183 const char *newname);
986
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
184 void buddy_resource_setevents(gpointer rosterdata, const char *resname,
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
185 guint event);
ed697234bd39 Chat states receival (Alexis Hildebrandt)
Mikael Berthe <mikael@lilotux.net>
parents: 974
diff changeset
186 guint buddy_resource_getevents(gpointer rosterdata, const char *resname);
987
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
187 struct jep0022 *buddy_resource_jep22(gpointer rosterdata, const char *resname);
f47e312560af Improve JEP22 + JEP85 support
Mikael Berthe <mikael@lilotux.net>
parents: 986
diff changeset
188 struct jep0085 *buddy_resource_jep85(gpointer rosterdata, const char *resname);
1043
ebbde723614b Store contacts PGP keys
Mikael Berthe <mikael@lilotux.net>
parents: 987
diff changeset
189 struct pgp_data *buddy_resource_pgp(gpointer rosterdata, const char *resname);
572
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
190 enum imrole buddy_getrole(gpointer rosterdata, const char *resname);
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
191 enum imaffiliation buddy_getaffil(gpointer rosterdata, const char *resname);
afc2bd38b15c Implement affiliations handling, add "/room whois"
Mikael Berthe <mikael@lilotux.net>
parents: 548
diff changeset
192 const char *buddy_getrjid(gpointer rosterdata, const char *resname);
447
03bb57383cea Initial Multi-User Chat support
Mikael Berthe <mikael@lilotux.net>
parents: 439
diff changeset
193 void buddy_del_all_resources(gpointer rosterdata);
166
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
194 void buddy_setflags(gpointer rosterdata, guint flags, guint value);
aa5b635520ef [/trunk] Changeset 178 by mikael
mikael
parents: 164
diff changeset
195 guint buddy_getflags(gpointer rosterdata);
1292
382ec54b584e Muc nick coloring functionality
Michal 'vorner' Vaner <vorner@ucw.cz>
parents: 1065
diff changeset
196 GList *buddy_search_jid(const char *jid);
265
49e9e02dd6d0 Add "/roster search" command
mikael@frmp8452
parents: 236
diff changeset
197 GList *buddy_search(char *string);
532
2ac8d8e49e81 Send status changes to chatrooms
Mikael Berthe <mikael@lilotux.net>
parents: 510
diff changeset
198 void foreach_buddy(guint roster_type,
2ac8d8e49e81 Send status changes to chatrooms
Mikael Berthe <mikael@lilotux.net>
parents: 510
diff changeset
199 void (*pfunc)(gpointer rosterdata, void *param),
2ac8d8e49e81 Send status changes to chatrooms
Mikael Berthe <mikael@lilotux.net>
parents: 510
diff changeset
200 void *param);
885
afdd81c2c44d Allow /rename for groups
Mikael Berthe <mikael@lilotux.net>
parents: 863
diff changeset
201 void foreach_group_member(gpointer groupdata,
afdd81c2c44d Allow /rename for groups
Mikael Berthe <mikael@lilotux.net>
parents: 863
diff changeset
202 void (*pfunc)(gpointer rosterdata, void *param),
afdd81c2c44d Allow /rename for groups
Mikael Berthe <mikael@lilotux.net>
parents: 863
diff changeset
203 void *param);
236
72fd1273f2b7 [/trunk] Changeset 249 by mikael
mikael
parents: 225
diff changeset
204 gpointer unread_msg(gpointer rosterdata);
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
205
225
d5ae42cbe1fa [/trunk] Changeset 237 by mikael
mikael
parents: 221
diff changeset
206 GSList *compl_list(guint type);
d5ae42cbe1fa [/trunk] Changeset 237 by mikael
mikael
parents: 221
diff changeset
207
72
9b7f0d313e33 [/trunk] Changeset 86 by mikael
mikael
parents:
diff changeset
208 #endif /* __ROSTER_H__ */
576
8b3db0b555a1 Add Vim modelines
Mikael Berthe <mikael@lilotux.net>
parents: 572
diff changeset
209
580
fed6d1e4d7a9 Fix modelines
Mikael Berthe <mikael@lilotux.net>
parents: 576
diff changeset
210 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */