annotate mcabber/src/roster.h @ 1311:0dda8238af21

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