11118
|
1
|
|
2 #include "module.h"
|
|
3
|
|
4 /* TODO
|
|
5
|
|
6
|
|
7 void
|
|
8 gaim_status_type_add_attrs(status_type, id, name, value, gaim_status_type_add_attrs)
|
|
9 Gaim::StatusType status_type
|
|
10 const char *id
|
|
11 const char *name
|
|
12 Gaim::Value value
|
|
13 ...
|
|
14
|
|
15
|
|
16 Gaim::StatusType
|
|
17 gaim_status_type_new_with_attrs(primitive, id, name, saveable, user_settable, independent, attr_id, attr_name, attr_value, gaim_status_type_new_with_attrs)
|
|
18 Gaim::StatusPrimitive primitive
|
|
19 const char *id
|
|
20 const char *name
|
|
21 gboolean saveable
|
|
22 gboolean user_settable
|
|
23 gboolean independent
|
|
24 const char *attr_id
|
|
25 const char *attr_name
|
|
26 Gaim::Value attr_value
|
|
27 ...
|
|
28
|
|
29 void
|
|
30 gaim_presence_add_list(presence, source_list)
|
|
31 Gaim::Presence presence
|
|
32 SV *source_list
|
|
33 PREINIT:
|
|
34 GList *t_GL;
|
|
35 int i, t_len;
|
|
36 PPCODE:
|
|
37 t_GL = NULL;
|
|
38 t_len = av_len((AV *)SvRV(source_list));
|
|
39
|
|
40 for (i = 0; i < t_len; i++) {
|
|
41 STRLEN t_sl;
|
|
42 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(source_list), i, 0), t_sl));
|
|
43 }
|
|
44 gaim_presence_add_list(presence, t_GL);
|
|
45
|
|
46 */
|
|
47
|
11170
|
48 /***************************XS Code Status.xs**************************/
|
11118
|
49 MODULE = Gaim::Status PACKAGE = Gaim::Presence PREFIX = gaim_presence_
|
|
50 PROTOTYPES: ENABLE
|
|
51
|
|
52 void
|
|
53 gaim_presence_add_status(presence, status)
|
|
54 Gaim::Presence presence
|
|
55 Gaim::Status status
|
|
56
|
|
57 gint
|
|
58 gaim_presence_compare(presence1, presence2)
|
|
59 Gaim::Presence presence1
|
|
60 Gaim::Presence presence2
|
|
61
|
|
62 void
|
|
63 gaim_presence_destroy(presence)
|
|
64 Gaim::Presence presence
|
|
65
|
|
66 Gaim::Account
|
|
67 gaim_presence_get_account(presence)
|
|
68 Gaim::Presence presence
|
|
69
|
|
70 Gaim::Status
|
|
71 gaim_presence_get_active_status(presence)
|
|
72 Gaim::Presence presence
|
|
73
|
|
74 void
|
|
75 gaim_presence_get_buddies(presence)
|
|
76 Gaim::Presence presence
|
|
77 PREINIT:
|
11130
|
78 const GList *l;
|
11118
|
79 PPCODE:
|
|
80 for (l = gaim_presence_get_buddies(presence); l != NULL; l = l->next) {
|
|
81 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem")));
|
|
82 }
|
|
83
|
|
84 const char *
|
|
85 gaim_presence_get_chat_user(presence)
|
|
86 Gaim::Presence presence
|
|
87
|
|
88 Gaim::PresenceContext
|
|
89 gaim_presence_get_context(presence)
|
|
90 Gaim::Presence presence
|
|
91
|
|
92 Gaim::Conversation
|
|
93 gaim_presence_get_conversation(presence)
|
|
94 Gaim::Presence presence
|
|
95
|
|
96 time_t
|
|
97 gaim_presence_get_idle_time(presence)
|
|
98 Gaim::Presence presence
|
|
99
|
|
100 time_t
|
|
101 gaim_presence_get_login_time(presence)
|
|
102 Gaim::Presence presence
|
|
103
|
|
104 Gaim::Status
|
|
105 gaim_presence_get_status(presence, status_id)
|
|
106 Gaim::Presence presence
|
|
107 const char *status_id
|
|
108
|
|
109 void
|
|
110 gaim_presence_get_statuses(presence)
|
|
111 Gaim::Presence presence
|
|
112 PREINIT:
|
11130
|
113 const GList *l;
|
11118
|
114 PPCODE:
|
|
115 for (l = gaim_presence_get_statuses(presence); l != NULL; l = l->next) {
|
|
116 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem")));
|
|
117 }
|
|
118
|
|
119 gboolean
|
|
120 gaim_presence_is_available(presence)
|
|
121 Gaim::Presence presence
|
|
122
|
|
123 gboolean
|
|
124 gaim_presence_is_idle(presence)
|
|
125 Gaim::Presence presence
|
|
126
|
|
127 gboolean
|
|
128 gaim_presence_is_online(presence)
|
|
129 Gaim::Presence presence
|
|
130
|
|
131 gboolean
|
|
132 gaim_presence_is_status_active(presence, status_id)
|
|
133 Gaim::Presence presence
|
|
134 const char *status_id
|
|
135
|
|
136 gboolean
|
|
137 gaim_presence_is_status_primitive_active(presence, primitive)
|
|
138 Gaim::Presence presence
|
|
139 Gaim::StatusPrimitive primitive
|
|
140
|
|
141 Gaim::Presence
|
|
142 gaim_presence_new(context)
|
|
143 Gaim::PresenceContext context
|
|
144
|
|
145 Gaim::Presence
|
|
146 gaim_presence_new_for_account(account)
|
|
147 Gaim::Account account
|
|
148
|
|
149 Gaim::Presence
|
|
150 gaim_presence_new_for_buddy(buddy)
|
|
151 Gaim::BuddyList::Buddy buddy
|
|
152
|
|
153 Gaim::Presence
|
|
154 gaim_presence_new_for_conv(conv)
|
|
155 Gaim::Conversation conv
|
|
156
|
|
157 void
|
|
158 gaim_presence_remove_buddy(presence, buddy)
|
|
159 Gaim::Presence presence
|
|
160 Gaim::BuddyList::Buddy buddy
|
|
161
|
|
162 void
|
|
163 gaim_presence_set_idle(presence, idle, idle_time)
|
|
164 Gaim::Presence presence
|
|
165 gboolean idle
|
|
166 time_t idle_time
|
|
167
|
|
168 void
|
|
169 gaim_presence_set_login_time(presence, login_time)
|
|
170 Gaim::Presence presence
|
|
171 time_t login_time
|
|
172
|
|
173 void
|
|
174 gaim_presence_set_status_active(presence, status_id, active)
|
|
175 Gaim::Presence presence
|
|
176 const char *status_id
|
|
177 gboolean active
|
|
178
|
|
179 void
|
|
180 gaim_presence_switch_status(presence, status_id)
|
|
181 Gaim::Presence presence
|
|
182 const char *status_id
|
|
183
|
|
184 const char *
|
|
185 gaim_primitive_get_id_from_type(type)
|
|
186 Gaim::StatusPrimitive type
|
|
187
|
|
188 const char *
|
|
189 gaim_primitive_get_name_from_type(type)
|
|
190 Gaim::StatusPrimitive type
|
|
191
|
|
192 Gaim::StatusPrimitive
|
|
193 gaim_primitive_get_type_from_id(id)
|
|
194 const char *id
|
|
195
|
|
196 MODULE = Gaim::Status PACKAGE = Gaim::Status PREFIX = gaim_status_
|
|
197 PROTOTYPES: ENABLE
|
|
198
|
|
199 void
|
|
200 gaim_status_attr_destroy(attr)
|
|
201 Gaim::StatusAttr attr
|
|
202
|
|
203 const char *
|
|
204 gaim_status_attr_get_id(attr)
|
|
205 Gaim::StatusAttr attr
|
|
206
|
|
207 const char *
|
|
208 gaim_status_attr_get_name(attr)
|
|
209 Gaim::StatusAttr attr
|
|
210
|
|
211 Gaim::Value
|
11249
|
212 gaim_status_attr_get_value(attr)
|
11118
|
213 Gaim::StatusAttr attr
|
|
214
|
|
215 Gaim::StatusAttr
|
|
216 gaim_status_attr_new(id, name, value_type)
|
|
217 const char *id
|
|
218 const char *name
|
|
219 Gaim::Value value_type
|
|
220
|
|
221 gint
|
|
222 gaim_status_compare(status1, status2)
|
|
223 Gaim::Status status1
|
|
224 Gaim::Status status2
|
|
225
|
|
226 void
|
|
227 gaim_status_destroy(status)
|
|
228 Gaim::Status status
|
|
229
|
|
230 gboolean
|
|
231 gaim_status_get_attr_boolean(status, id)
|
|
232 Gaim::Status status
|
|
233 const char *id
|
|
234
|
|
235 int
|
|
236 gaim_status_get_attr_int(status, id)
|
|
237 Gaim::Status status
|
|
238 const char *id
|
|
239
|
|
240 const char *
|
|
241 gaim_status_get_attr_string(status, id)
|
|
242 Gaim::Status status
|
|
243 const char *id
|
|
244
|
|
245 Gaim::Value
|
|
246 gaim_status_get_attr_value(status, id)
|
|
247 Gaim::Status status
|
|
248 const char *id
|
|
249
|
|
250 void *
|
|
251 gaim_status_get_handle()
|
|
252
|
|
253
|
|
254 const char *
|
|
255 gaim_status_get_id(status)
|
|
256 Gaim::Status status
|
|
257
|
|
258 const char *
|
|
259 gaim_status_get_name(status)
|
|
260 Gaim::Status status
|
|
261
|
|
262 Gaim::Presence
|
|
263 gaim_status_get_presence(status)
|
|
264 Gaim::Status status
|
|
265
|
|
266 Gaim::StatusType
|
|
267 gaim_status_get_type(status)
|
|
268 Gaim::Status status
|
|
269
|
|
270 void
|
|
271 gaim_status_init()
|
|
272
|
|
273
|
|
274 gboolean
|
|
275 gaim_status_is_active(status)
|
|
276 Gaim::Status status
|
|
277
|
|
278 gboolean
|
|
279 gaim_status_is_available(status)
|
|
280 Gaim::Status status
|
|
281
|
|
282 gboolean
|
|
283 gaim_status_is_exclusive(status)
|
|
284 Gaim::Status status
|
|
285
|
|
286 gboolean
|
|
287 gaim_status_is_independent(status)
|
|
288 Gaim::Status status
|
|
289
|
|
290 gboolean
|
|
291 gaim_status_is_online(status)
|
|
292 Gaim::Status status
|
|
293
|
|
294 Gaim::Status
|
|
295 gaim_status_new(status_type, presence)
|
|
296 Gaim::StatusType status_type
|
|
297 Gaim::Presence presence
|
|
298
|
|
299 void
|
|
300 gaim_status_set_active(status, active)
|
|
301 Gaim::Status status
|
|
302 gboolean active
|
|
303
|
|
304 void
|
|
305 gaim_status_set_active_with_attrs(status, active, args)
|
|
306 Gaim::Status status
|
|
307 gboolean active
|
|
308 va_list args
|
|
309
|
|
310 void
|
|
311 gaim_status_set_attr_boolean(status, id, value)
|
|
312 Gaim::Status status
|
|
313 const char *id
|
|
314 gboolean value
|
|
315
|
|
316 void
|
|
317 gaim_status_set_attr_string(status, id, value)
|
|
318 Gaim::Status status
|
|
319 const char *id
|
|
320 const char *value
|
|
321
|
|
322 void
|
|
323 gaim_status_type_add_attr(status_type, id, name, value)
|
|
324 Gaim::StatusType status_type
|
|
325 const char *id
|
|
326 const char *name
|
|
327 Gaim::Value value
|
|
328
|
|
329
|
|
330 void
|
|
331 gaim_status_type_add_attrs_vargs(status_type, args)
|
|
332 Gaim::StatusType status_type
|
|
333 va_list args
|
|
334
|
|
335 void
|
|
336 gaim_status_type_destroy(status_type)
|
|
337 Gaim::StatusType status_type
|
|
338
|
|
339 Gaim::StatusType
|
|
340 gaim_status_type_find_with_id(status_types, id)
|
|
341 SV *status_types
|
|
342 const char *id
|
|
343 PREINIT:
|
|
344 GList *t_GL;
|
|
345 int i, t_len;
|
11131
|
346 CODE:
|
11118
|
347 t_GL = NULL;
|
|
348 t_len = av_len((AV *)SvRV(status_types));
|
|
349
|
|
350 for (i = 0; i < t_len; i++) {
|
|
351 STRLEN t_sl;
|
|
352 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(status_types), i, 0), t_sl));
|
|
353 }
|
11170
|
354 RETVAL = (GaimStatusType *)gaim_status_type_find_with_id(t_GL, id);
|
|
355 OUTPUT:
|
|
356 RETVAL
|
11118
|
357
|
|
358 Gaim::StatusAttr
|
|
359 gaim_status_type_get_attr(status_type, id)
|
|
360 Gaim::StatusType status_type
|
|
361 const char *id
|
|
362
|
|
363 void
|
|
364 gaim_status_type_get_attrs(status_type)
|
|
365 Gaim::StatusType status_type
|
|
366 PREINIT:
|
11130
|
367 const GList *l;
|
11118
|
368 PPCODE:
|
|
369 for (l = gaim_status_type_get_attrs(status_type); l != NULL; l = l->next) {
|
|
370 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem")));
|
|
371 }
|
|
372
|
|
373 const char *
|
|
374 gaim_status_type_get_id(status_type)
|
|
375 Gaim::StatusType status_type
|
|
376
|
|
377 const char *
|
|
378 gaim_status_type_get_name(status_type)
|
|
379 Gaim::StatusType status_type
|
|
380
|
|
381 const char *
|
|
382 gaim_status_type_get_primary_attr(type)
|
|
383 Gaim::StatusType type
|
|
384
|
|
385 Gaim::StatusPrimitive
|
|
386 gaim_status_type_get_primitive(status_type)
|
|
387 Gaim::StatusType status_type
|
|
388
|
|
389 gboolean
|
|
390 gaim_status_type_is_available(status_type)
|
|
391 Gaim::StatusType status_type
|
|
392
|
|
393 gboolean
|
|
394 gaim_status_type_is_exclusive(status_type)
|
|
395 Gaim::StatusType status_type
|
|
396
|
|
397 gboolean
|
|
398 gaim_status_type_is_independent(status_type)
|
|
399 Gaim::StatusType status_type
|
|
400
|
|
401 gboolean
|
|
402 gaim_status_type_is_saveable(status_type)
|
|
403 Gaim::StatusType status_type
|
|
404
|
|
405 gboolean
|
|
406 gaim_status_type_is_user_settable(status_type)
|
|
407 Gaim::StatusType status_type
|
|
408
|
|
409 Gaim::StatusType
|
|
410 gaim_status_type_new(primitive, id, name, user_settable)
|
|
411 Gaim::StatusPrimitive primitive
|
|
412 const char *id
|
|
413 const char *name
|
|
414 gboolean user_settable
|
|
415
|
|
416 Gaim::StatusType
|
|
417 gaim_status_type_new_full(primitive, id, name, saveable, user_settable, independent)
|
|
418 Gaim::StatusPrimitive primitive
|
|
419 const char *id
|
|
420 const char *name
|
|
421 gboolean saveable
|
|
422 gboolean user_settable
|
|
423 gboolean independent
|
|
424
|
|
425 void
|
|
426 gaim_status_type_set_primary_attr(status_type, attr_id)
|
|
427 Gaim::StatusType status_type
|
|
428 const char *attr_id
|
|
429
|
|
430 void
|
|
431 gaim_status_uninit()
|
|
432
|
|
433
|