about summary refs log tree commit diff stats
path: root/src/xmpp/presence.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/presence.c')
-rw-r--r--src/xmpp/presence.c68
1 files changed, 30 insertions, 38 deletions
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index e475f599..1cfa9e4e 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -62,23 +62,15 @@
 
 static Autocomplete sub_requests_ac;
 
-#define HANDLE(ns, type, func) xmpp_handler_add(conn, func, ns, \
-                                                STANZA_NAME_PRESENCE, type, ctx)
-
-static int _unavailable_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
-static int _subscribe_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
-static int _subscribed_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
-static int _unsubscribed_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
-static int _available_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
-static int _muc_user_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
-static int _presence_error_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata);
+#define HANDLE(ns, type, func) xmpp_handler_add(conn, func, ns, STANZA_NAME_PRESENCE, type, ctx)
+
+static int _unavailable_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
+static int _subscribe_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
+static int _subscribed_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
+static int _unsubscribed_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
+static int _available_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
+static int _muc_user_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
+static int _presence_error_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
 
 void _send_caps_request(char *node, char *caps_key, char *id, char *from);
 static void _send_room_presence(xmpp_conn_t *conn, xmpp_stanza_t *presence);
@@ -105,7 +97,7 @@ presence_add_handlers(void)
 }
 
 void
-presence_subscription(const char * const jid, const jabber_subscr_t action)
+presence_subscription(const char *const jid, const jabber_subscr_t action)
 {
     assert(jid != NULL);
 
@@ -149,7 +141,7 @@ presence_subscription(const char * const jid, const jabber_subscr_t action)
     free(id);
 }
 
-GSList *
+GSList*
 presence_get_subscription_requests(void)
 {
     return autocomplete_create_list(sub_requests_ac);
@@ -167,14 +159,14 @@ presence_clear_sub_requests(void)
     autocomplete_clear(sub_requests_ac);
 }
 
-char *
-presence_sub_request_find(const char * const search_str)
+char*
+presence_sub_request_find(const char *const search_str)
 {
     return autocomplete_complete(sub_requests_ac, search_str, TRUE);
 }
 
 gboolean
-presence_sub_request_exists(const char * const bare_jid)
+presence_sub_request_exists(const char *const bare_jid)
 {
     gboolean result = FALSE;
     GSList *requests_p = autocomplete_create_list(sub_requests_ac);
@@ -202,7 +194,7 @@ presence_reset_sub_request_search(void)
 }
 
 void
-presence_send(const resource_presence_t presence_type, const char * const msg, const int idle, char *signed_status)
+presence_send(const resource_presence_t presence_type, const char *const msg, const int idle, char *signed_status)
 {
     if (jabber_get_connection_status() != JABBER_CONNECTED) {
         log_warning("Error setting presence, not connected.");
@@ -317,7 +309,7 @@ presence_join_room(char *room, char *nick, char * passwd)
 }
 
 void
-presence_change_room_nick(const char * const room, const char * const nick)
+presence_change_room_nick(const char *const room, const char *const nick)
 {
     assert(room != NULL);
     assert(nick != NULL);
@@ -347,7 +339,7 @@ presence_change_room_nick(const char * const room, const char * const nick)
 }
 
 void
-presence_leave_chat_room(const char * const room_jid)
+presence_leave_chat_room(const char *const room_jid)
 {
     assert(room_jid != NULL);
 
@@ -365,8 +357,8 @@ presence_leave_chat_room(const char * const room_jid)
 }
 
 static int
-_presence_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
-    void * const userdata)
+_presence_error_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza,
+    void *const userdata)
 {
     char *id = xmpp_stanza_get_id(stanza);
     char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
@@ -439,8 +431,8 @@ _presence_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
 
 
 static int
-_unsubscribed_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata)
+_unsubscribed_handler(xmpp_conn_t *const conn,
+    xmpp_stanza_t *const stanza, void *const userdata)
 {
     char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
     Jid *from_jid = jid_create(from);
@@ -455,8 +447,8 @@ _unsubscribed_handler(xmpp_conn_t * const conn,
 }
 
 static int
-_subscribed_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata)
+_subscribed_handler(xmpp_conn_t *const conn,
+    xmpp_stanza_t *const stanza, void *const userdata)
 {
     char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
     Jid *from_jid = jid_create(from);
@@ -471,8 +463,8 @@ _subscribed_handler(xmpp_conn_t * const conn,
 }
 
 static int
-_subscribe_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata)
+_subscribe_handler(xmpp_conn_t *const conn,
+    xmpp_stanza_t *const stanza, void *const userdata)
 {
     char *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
     log_debug("Subscribe presence handler fired for %s", from);
@@ -491,8 +483,8 @@ _subscribe_handler(xmpp_conn_t * const conn,
 }
 
 static int
-_unavailable_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata)
+_unavailable_handler(xmpp_conn_t *const conn,
+    xmpp_stanza_t *const stanza, void *const userdata)
 {
     ui_input_nonblocking(TRUE);
 
@@ -568,8 +560,8 @@ _handle_caps(char *jid, XMPPCaps *caps)
 }
 
 static int
-_available_handler(xmpp_conn_t * const conn,
-    xmpp_stanza_t * const stanza, void * const userdata)
+_available_handler(xmpp_conn_t *const conn,
+    xmpp_stanza_t *const stanza, void *const userdata)
 {
     ui_input_nonblocking(TRUE);
 
@@ -668,7 +660,7 @@ _send_caps_request(char *node, char *caps_key, char *id, char *from)
 }
 
 static int
-_muc_user_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * const userdata)
+_muc_user_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata)
 {
     ui_input_nonblocking(TRUE);
 
ik/mu/commit/html/subx/066write-buffered.subx.html?h=hlt&id=ce2c1efc41470764126e9a1a7f4e0cfec4213587'>ce2c1efc ^
9a777801 ^
ce2c1efc ^
9a777801 ^
ce2c1efc ^







33352536 ^


9a777801 ^
33352536 ^

e99038ea ^
b1635a5c ^
33352536 ^

ce2c1efc ^
33352536 ^







2104d1a7 ^
33352536 ^
9a777801 ^
33352536 ^



9a777801 ^
33352536 ^


ce2c1efc ^

33352536 ^
6070c23e ^
9a777801 ^
33352536 ^
6070c23e ^
ce2c1efc ^
33352536 ^
ce2c1efc ^

33352536 ^
ce2c1efc ^
ec73ed12 ^
ce2c1efc ^
33352536 ^
ce2c1efc ^

33352536 ^

e99038ea ^
ec73ed12 ^
e99038ea ^
33352536 ^


ce2c1efc ^



33352536 ^

ce2c1efc ^
33352536 ^
ce2c1efc ^
33352536 ^
ce2c1efc ^
33352536 ^
4a4a392d ^
ce2c1efc ^

33352536 ^
ce2c1efc ^

33352536 ^





b1635a5c ^
33352536 ^

ce2c1efc ^






3d1c4216 ^
ce2c1efc ^
ec73ed12 ^
ce2c1efc ^
33352536 ^
8aeb85f0 ^
ce2c1efc ^
8aeb85f0 ^
999c529c ^
ec73ed12 ^
999c529c ^




68df24fa ^
999c529c ^
ec73ed12 ^
999c529c ^



68df24fa ^
999c529c ^
ec73ed12 ^
999c529c ^





3d1c4216 ^
999c529c ^
ec73ed12 ^
999c529c ^









3d1c4216 ^
999c529c ^
ec73ed12 ^
999c529c ^

8aeb85f0 ^
999c529c ^
8aeb85f0 ^
999c529c ^
ec73ed12 ^
999c529c ^






68df24fa ^
999c529c ^
ec73ed12 ^
999c529c ^





ec73ed12 ^
999c529c ^

3d1c4216 ^
999c529c ^

ec73ed12 ^
999c529c ^




ec73ed12 ^
999c529c ^

68df24fa ^
999c529c ^

ec73ed12 ^
999c529c ^







fa786ea7 ^
7e7a8a6e ^
999c529c ^
8aeb85f0 ^
999c529c ^



695f9bf8 ^
9a777801 ^
999c529c ^







a94b60b5 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291