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 unsigned int
|
|
120 gaim_presence_get_warning_level(presence)
|
|
121 Gaim::Presence presence
|
|
122
|
|
123 gboolean
|
|
124 gaim_presence_is_available(presence)
|
|
125 Gaim::Presence presence
|
|
126
|
|
127 gboolean
|
|
128 gaim_presence_is_idle(presence)
|
|
129 Gaim::Presence presence
|
|
130
|
|
131 gboolean
|
|
132 gaim_presence_is_online(presence)
|
|
133 Gaim::Presence presence
|
|
134
|
|
135 gboolean
|
|
136 gaim_presence_is_status_active(presence, status_id)
|
|
137 Gaim::Presence presence
|
|
138 const char *status_id
|
|
139
|
|
140 gboolean
|
|
141 gaim_presence_is_status_primitive_active(presence, primitive)
|
|
142 Gaim::Presence presence
|
|
143 Gaim::StatusPrimitive primitive
|
|
144
|
|
145 Gaim::Presence
|
|
146 gaim_presence_new(context)
|
|
147 Gaim::PresenceContext context
|
|
148
|
|
149 Gaim::Presence
|
|
150 gaim_presence_new_for_account(account)
|
|
151 Gaim::Account account
|
|
152
|
|
153 Gaim::Presence
|
|
154 gaim_presence_new_for_buddy(buddy)
|
|
155 Gaim::BuddyList::Buddy buddy
|
|
156
|
|
157 Gaim::Presence
|
|
158 gaim_presence_new_for_conv(conv)
|
|
159 Gaim::Conversation conv
|
|
160
|
|
161 void
|
|
162 gaim_presence_remove_buddy(presence, buddy)
|
|
163 Gaim::Presence presence
|
|
164 Gaim::BuddyList::Buddy buddy
|
|
165
|
|
166 void
|
|
167 gaim_presence_set_idle(presence, idle, idle_time)
|
|
168 Gaim::Presence presence
|
|
169 gboolean idle
|
|
170 time_t idle_time
|
|
171
|
|
172 void
|
|
173 gaim_presence_set_login_time(presence, login_time)
|
|
174 Gaim::Presence presence
|
|
175 time_t login_time
|
|
176
|
|
177 void
|
|
178 gaim_presence_set_status_active(presence, status_id, active)
|
|
179 Gaim::Presence presence
|
|
180 const char *status_id
|
|
181 gboolean active
|
|
182
|
|
183 void
|
|
184 gaim_presence_set_warning_level(presence, level)
|
|
185 Gaim::Presence presence
|
|
186 unsigned int level
|
|
187
|
|
188 void
|
|
189 gaim_presence_switch_status(presence, status_id)
|
|
190 Gaim::Presence presence
|
|
191 const char *status_id
|
|
192
|
|
193 const char *
|
|
194 gaim_primitive_get_id_from_type(type)
|
|
195 Gaim::StatusPrimitive type
|
|
196
|
|
197 const char *
|
|
198 gaim_primitive_get_name_from_type(type)
|
|
199 Gaim::StatusPrimitive type
|
|
200
|
|
201 Gaim::StatusPrimitive
|
|
202 gaim_primitive_get_type_from_id(id)
|
|
203 const char *id
|
|
204
|
|
205 MODULE = Gaim::Status PACKAGE = Gaim::Status PREFIX = gaim_status_
|
|
206 PROTOTYPES: ENABLE
|
|
207
|
|
208 void
|
|
209 gaim_status_attr_destroy(attr)
|
|
210 Gaim::StatusAttr attr
|
|
211
|
|
212 const char *
|
|
213 gaim_status_attr_get_id(attr)
|
|
214 Gaim::StatusAttr attr
|
|
215
|
|
216 const char *
|
|
217 gaim_status_attr_get_name(attr)
|
|
218 Gaim::StatusAttr attr
|
|
219
|
|
220 Gaim::Value
|
|
221 gaim_status_attr_get_value_type(attr)
|
|
222 Gaim::StatusAttr attr
|
|
223
|
|
224 Gaim::StatusAttr
|
|
225 gaim_status_attr_new(id, name, value_type)
|
|
226 const char *id
|
|
227 const char *name
|
|
228 Gaim::Value value_type
|
|
229
|
|
230 gint
|
|
231 gaim_status_compare(status1, status2)
|
|
232 Gaim::Status status1
|
|
233 Gaim::Status status2
|
|
234
|
|
235 void
|
|
236 gaim_status_destroy(status)
|
|
237 Gaim::Status status
|
|
238
|
|
239 gboolean
|
|
240 gaim_status_get_attr_boolean(status, id)
|
|
241 Gaim::Status status
|
|
242 const char *id
|
|
243
|
|
244 int
|
|
245 gaim_status_get_attr_int(status, id)
|
|
246 Gaim::Status status
|
|
247 const char *id
|
|
248
|
|
249 const char *
|
|
250 gaim_status_get_attr_string(status, id)
|
|
251 Gaim::Status status
|
|
252 const char *id
|
|
253
|
|
254 Gaim::Value
|
|
255 gaim_status_get_attr_value(status, id)
|
|
256 Gaim::Status status
|
|
257 const char *id
|
|
258
|
|
259 void *
|
|
260 gaim_status_get_handle()
|
|
261
|
|
262
|
|
263 const char *
|
|
264 gaim_status_get_id(status)
|
|
265 Gaim::Status status
|
|
266
|
|
267 const char *
|
|
268 gaim_status_get_name(status)
|
|
269 Gaim::Status status
|
|
270
|
|
271 Gaim::Presence
|
|
272 gaim_status_get_presence(status)
|
|
273 Gaim::Status status
|
|
274
|
|
275 Gaim::StatusType
|
|
276 gaim_status_get_type(status)
|
|
277 Gaim::Status status
|
|
278
|
|
279 void
|
|
280 gaim_status_init()
|
|
281
|
|
282
|
|
283 gboolean
|
|
284 gaim_status_is_active(status)
|
|
285 Gaim::Status status
|
|
286
|
|
287 gboolean
|
|
288 gaim_status_is_available(status)
|
|
289 Gaim::Status status
|
|
290
|
|
291 gboolean
|
|
292 gaim_status_is_exclusive(status)
|
|
293 Gaim::Status status
|
|
294
|
|
295 gboolean
|
|
296 gaim_status_is_independent(status)
|
|
297 Gaim::Status status
|
|
298
|
|
299 gboolean
|
|
300 gaim_status_is_online(status)
|
|
301 Gaim::Status status
|
|
302
|
|
303 Gaim::Status
|
|
304 gaim_status_new(status_type, presence)
|
|
305 Gaim::StatusType status_type
|
|
306 Gaim::Presence presence
|
|
307
|
|
308 void
|
|
309 gaim_status_set_active(status, active)
|
|
310 Gaim::Status status
|
|
311 gboolean active
|
|
312
|
|
313 void
|
|
314 gaim_status_set_active_with_attrs(status, active, args)
|
|
315 Gaim::Status status
|
|
316 gboolean active
|
|
317 va_list args
|
|
318
|
|
319 void
|
|
320 gaim_status_set_attr_boolean(status, id, value)
|
|
321 Gaim::Status status
|
|
322 const char *id
|
|
323 gboolean value
|
|
324
|
|
325 void
|
|
326 gaim_status_set_attr_string(status, id, value)
|
|
327 Gaim::Status status
|
|
328 const char *id
|
|
329 const char *value
|
|
330
|
|
331 void
|
|
332 gaim_status_type_add_attr(status_type, id, name, value)
|
|
333 Gaim::StatusType status_type
|
|
334 const char *id
|
|
335 const char *name
|
|
336 Gaim::Value value
|
|
337
|
|
338
|
|
339 void
|
|
340 gaim_status_type_add_attrs_vargs(status_type, args)
|
|
341 Gaim::StatusType status_type
|
|
342 va_list args
|
|
343
|
|
344 void
|
|
345 gaim_status_type_destroy(status_type)
|
|
346 Gaim::StatusType status_type
|
|
347
|
|
348 Gaim::StatusType
|
|
349 gaim_status_type_find_with_id(status_types, id)
|
|
350 SV *status_types
|
|
351 const char *id
|
|
352 PREINIT:
|
|
353 GList *t_GL;
|
|
354 int i, t_len;
|
11131
|
355 CODE:
|
11118
|
356 t_GL = NULL;
|
|
357 t_len = av_len((AV *)SvRV(status_types));
|
|
358
|
|
359 for (i = 0; i < t_len; i++) {
|
|
360 STRLEN t_sl;
|
|
361 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(status_types), i, 0), t_sl));
|
|
362 }
|
11170
|
363 RETVAL = (GaimStatusType *)gaim_status_type_find_with_id(t_GL, id);
|
|
364 OUTPUT:
|
|
365 RETVAL
|
11118
|
366
|
|
367 Gaim::StatusAttr
|
|
368 gaim_status_type_get_attr(status_type, id)
|
|
369 Gaim::StatusType status_type
|
|
370 const char *id
|
|
371
|
|
372 void
|
|
373 gaim_status_type_get_attrs(status_type)
|
|
374 Gaim::StatusType status_type
|
|
375 PREINIT:
|
11130
|
376 const GList *l;
|
11118
|
377 PPCODE:
|
|
378 for (l = gaim_status_type_get_attrs(status_type); l != NULL; l = l->next) {
|
|
379 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListItem")));
|
|
380 }
|
|
381
|
|
382 const char *
|
|
383 gaim_status_type_get_id(status_type)
|
|
384 Gaim::StatusType status_type
|
|
385
|
|
386 const char *
|
|
387 gaim_status_type_get_name(status_type)
|
|
388 Gaim::StatusType status_type
|
|
389
|
|
390 const char *
|
|
391 gaim_status_type_get_primary_attr(type)
|
|
392 Gaim::StatusType type
|
|
393
|
|
394 Gaim::StatusPrimitive
|
|
395 gaim_status_type_get_primitive(status_type)
|
|
396 Gaim::StatusType status_type
|
|
397
|
|
398 gboolean
|
|
399 gaim_status_type_is_available(status_type)
|
|
400 Gaim::StatusType status_type
|
|
401
|
|
402 gboolean
|
|
403 gaim_status_type_is_exclusive(status_type)
|
|
404 Gaim::StatusType status_type
|
|
405
|
|
406 gboolean
|
|
407 gaim_status_type_is_independent(status_type)
|
|
408 Gaim::StatusType status_type
|
|
409
|
|
410 gboolean
|
|
411 gaim_status_type_is_saveable(status_type)
|
|
412 Gaim::StatusType status_type
|
|
413
|
|
414 gboolean
|
|
415 gaim_status_type_is_user_settable(status_type)
|
|
416 Gaim::StatusType status_type
|
|
417
|
|
418 Gaim::StatusType
|
|
419 gaim_status_type_new(primitive, id, name, user_settable)
|
|
420 Gaim::StatusPrimitive primitive
|
|
421 const char *id
|
|
422 const char *name
|
|
423 gboolean user_settable
|
|
424
|
|
425 Gaim::StatusType
|
|
426 gaim_status_type_new_full(primitive, id, name, saveable, user_settable, independent)
|
|
427 Gaim::StatusPrimitive primitive
|
|
428 const char *id
|
|
429 const char *name
|
|
430 gboolean saveable
|
|
431 gboolean user_settable
|
|
432 gboolean independent
|
|
433
|
|
434 void
|
|
435 gaim_status_type_set_primary_attr(status_type, attr_id)
|
|
436 Gaim::StatusType status_type
|
|
437 const char *attr_id
|
|
438
|
|
439 void
|
|
440 gaim_status_uninit()
|
|
441
|
|
442
|