comparison libpurple/plugins/perl/common/Status.xs @ 15374:5fe8042783c1

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