Mercurial > pidgin
annotate plugins/perl/common/BuddyList.xs @ 11118:134d0001983d
[gaim-migrate @ 13174]
Some new xsubs for the perl interpreter and a work around to get it all working again.
committer: Tailor Script <tailor@pidgin.im>
author | John H. Kelm <johnkelm@gmail.com> |
---|---|
date | Mon, 18 Jul 2005 13:37:38 +0000 |
parents | cbd13a12d9be |
children | ece127d56c14 |
rev | line source |
---|---|
6531 | 1 #include "module.h" |
11118 | 2 #include "../perl-handlers.h" |
3 | |
4 /* | |
5 TODO | |
6 | |
7 void * | |
8 gaim_blist_node_action_new(label, cb, data, children) | |
9 char * label | |
10 SV * cb | |
11 SV * data | |
12 SV * children | |
13 CODE: | |
14 RETVAL = gaim_perl_blist_node_action(label, cb, data, children); | |
15 OUTPUT: | |
16 RETVAL | |
17 | |
18 */ | |
19 | |
20 | |
21 MODULE = Gaim::BuddyList PACKAGE = Gaim::BuddyList PREFIX = gaim_ | |
22 PROTOTYPES: ENABLE | |
23 | |
24 Gaim::BuddyList | |
25 gaim_get_blist() | |
26 | |
27 | |
28 MODULE = Gaim::BuddyList PACKAGE = Gaim::Find PREFIX = gaim_find_ | |
29 PROTOTYPES: ENABLE | |
30 | |
31 Gaim::BuddyList::Buddy | |
32 gaim_find_buddy(account, name) | |
33 Gaim::Account account | |
34 const char * name | |
35 | |
36 void | |
37 gaim_find_buddies(account, name) | |
38 Gaim::Account account | |
39 const char * name | |
40 PREINIT: | |
41 GSList *l; | |
42 PPCODE: | |
43 for (l = gaim_find_buddies(account, name); l != NULL; l = l->next) { | |
44 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::BuddyList::Buddy"))); | |
45 } | |
46 | |
47 gboolean | |
48 gaim_group_on_account(group, account) | |
49 Gaim::BuddyList::Group group | |
50 Gaim::Account account | |
51 | |
52 Gaim::BuddyList::Group | |
53 gaim_find_group(name) | |
54 const char *name | |
55 | |
56 Gaim::BuddyList::Group | |
57 gaim_find_buddys_group(buddy) | |
58 Gaim::BuddyList::Buddy buddy | |
59 | |
60 | |
61 | |
62 | |
63 MODULE = Gaim::BuddyList PACKAGE = Gaim::Contact PREFIX = gaim_contact_ | |
64 PROTOTYPES: ENABLE | |
65 | |
66 Gaim::BuddyList::Contact | |
67 gaim_contact_new(); | |
68 | |
69 Gaim::BuddyList::Buddy | |
70 gaim_contact_get_priority_buddy(contact) | |
71 Gaim::BuddyList::Contact contact | |
72 | |
73 void | |
74 gaim_contact_set_alias(contact, alias) | |
75 Gaim::BuddyList::Contact contact | |
76 const char * alias | |
77 | |
78 const char * | |
79 gaim_contact_get_alias(contact) | |
80 Gaim::BuddyList::Contact contact | |
81 | |
82 gboolean | |
83 gaim_contact_on_account(contact, account) | |
84 Gaim::BuddyList::Contact contact | |
85 Gaim::Account account | |
86 | |
87 void | |
88 gaim_contact_invalidate_priority_buddy(contact) | |
89 Gaim::BuddyList::Contact contact | |
90 | |
91 MODULE = Gaim::BuddyList PACKAGE = Gaim::Group PREFIX = gaim_group_ | |
92 PROTOTYPES: ENABLE | |
93 | |
94 | |
95 Gaim::BuddyList::Group | |
96 gaim_group_new(name) | |
97 const char *name | |
98 | |
99 void | |
100 gaim_group_get_accounts(group) | |
101 Gaim::BuddyList::Group group | |
102 PREINIT: | |
103 GSList *l; | |
104 PPCODE: | |
105 for (l = gaim_group_get_accounts(group); l != NULL; l = l->next) { | |
106 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
107 } | |
108 | |
109 gboolean | |
110 gaim_group_on_account(group, account) | |
111 Gaim::BuddyList::Group group | |
112 Gaim::Account account | |
113 | |
6531 | 114 |
115 MODULE = Gaim::BuddyList PACKAGE = Gaim::BuddyList PREFIX = gaim_blist_ | |
116 PROTOTYPES: ENABLE | |
117 | |
118 void | |
11118 | 119 gaim_blist_add_contact(contact, group, node) |
120 Gaim::BuddyList::Contact contact | |
121 Gaim::BuddyList::Group group | |
122 Gaim::BuddyList::Node node | |
123 | |
124 void | |
125 gaim_blist_merge_contact(source, node) | |
126 Gaim::BuddyList::Contact source | |
127 Gaim::BuddyList::Node node | |
6531 | 128 |
129 void | |
11118 | 130 gaim_blist_add_group(group, node) |
131 Gaim::BuddyList::Group group | |
132 Gaim::BuddyList::Node node | |
6531 | 133 |
134 void | |
11118 | 135 gaim_blist_add_buddy(buddy, contact, group, node) |
136 Gaim::BuddyList::Buddy buddy | |
137 Gaim::BuddyList::Contact contact | |
138 Gaim::BuddyList::Group group | |
139 Gaim::BuddyList::Node node | |
6531 | 140 |
141 void | |
142 gaim_blist_remove_buddy(buddy) | |
143 Gaim::BuddyList::Buddy buddy | |
144 | |
145 void | |
11118 | 146 gaim_blist_remove_contact(contact) |
147 Gaim::BuddyList::Contact contact | |
6531 | 148 |
149 void | |
150 gaim_blist_remove_chat(chat) | |
151 Gaim::BuddyList::Chat chat | |
152 | |
153 void | |
11118 | 154 gaim_blist_remove_group(group) |
155 Gaim::BuddyList::Group group | |
6531 | 156 |
157 Gaim::BuddyList::Chat | |
158 gaim_blist_find_chat(account, name) | |
159 Gaim::Account account | |
160 const char *name | |
161 | |
6540
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
162 void |
11118 | 163 gaim_blist_add_chat(chat, group, node) |
164 Gaim::BuddyList::Chat chat | |
165 Gaim::BuddyList::Group group | |
166 Gaim::BuddyList::Node node | |
167 | |
168 Gaim::BuddyList | |
169 gaim_blist_new() | |
170 | |
171 void | |
172 gaim_set_blist(blist) | |
173 Gaim::BuddyList blist | |
174 | |
175 void | |
176 gaim_blist_show() | |
177 | |
178 void | |
179 gaim_blist_destroy(); | |
180 | |
181 void | |
182 gaim_blist_set_visible(show) | |
183 gboolean show | |
184 | |
185 void | |
186 gaim_blist_update_buddy_status(buddy, old_status) | |
187 Gaim::BuddyList::Buddy buddy | |
188 Gaim::Status old_status | |
189 | |
190 void | |
191 gaim_blist_update_buddy_icon(buddy) | |
192 Gaim::BuddyList::Buddy buddy | |
193 | |
194 void | |
195 gaim_blist_rename_buddy(buddy, name) | |
196 Gaim::BuddyList::Buddy buddy | |
197 const char * name | |
198 | |
199 void | |
200 gaim_blist_alias_buddy(buddy, alias) | |
201 Gaim::BuddyList::Buddy buddy | |
202 const char * alias | |
203 | |
204 void | |
205 gaim_blist_server_alias_buddy(buddy, alias) | |
206 Gaim::BuddyList::Buddy buddy | |
207 const char * alias | |
208 | |
209 void | |
210 gaim_blist_alias_chat(chat, alias) | |
211 Gaim::BuddyList::Chat chat | |
212 const char * alias | |
213 | |
214 void | |
215 gaim_blist_rename_group(group, name) | |
216 Gaim::BuddyList::Group group | |
217 const char * name | |
218 | |
219 void | |
220 gaim_blist_add_account(account) | |
221 Gaim::Account account | |
222 | |
223 void | |
224 gaim_blist_remove_account(account) | |
225 Gaim::Account account | |
226 | |
227 int | |
228 gaim_blist_get_group_size(group, offline) | |
229 Gaim::BuddyList::Group group | |
230 gboolean offline | |
231 | |
232 int | |
233 gaim_blist_get_group_online_count(group) | |
234 Gaim::BuddyList::Group group | |
235 | |
236 void | |
237 gaim_blist_load() | |
238 | |
239 void | |
240 gaim_blist_schedule_save() | |
241 | |
242 void | |
243 gaim_blist_request_add_group() | |
244 | |
245 void | |
246 gaim_blist_node_set_bool(node, key, value) | |
247 Gaim::BuddyList::Node node | |
248 const char * key | |
249 gboolean value | |
250 | |
251 gboolean | |
252 gaim_blist_node_get_bool(node, key) | |
253 Gaim::BuddyList::Node node | |
254 const char * key | |
255 | |
256 void | |
257 gaim_blist_node_set_int(node, key, value) | |
258 Gaim::BuddyList::Node node | |
259 const char * key | |
260 int value | |
261 | |
262 int | |
263 gaim_blist_node_get_int(node, key) | |
264 Gaim::BuddyList::Node node | |
265 const char * key | |
266 | |
267 const char * | |
268 gaim_blist_node_get_string(node, key) | |
269 Gaim::BuddyList::Node node | |
270 const char * key | |
271 | |
272 void | |
273 gaim_blist_node_remove_setting(node, key) | |
274 Gaim::BuddyList::Node node | |
275 const char * key | |
276 | |
277 void | |
278 gaim_blist_node_set_flags(node, flags) | |
279 Gaim::BuddyList::Node node | |
280 Gaim::BlistNodeFlags flags | |
281 | |
282 Gaim::BlistNodeFlags | |
283 gaim_blist_node_get_flags(node) | |
284 Gaim::BuddyList::Node node | |
285 | |
286 void | |
287 gaim_blist_node_get_extended_menu(node) | |
288 Gaim::BuddyList::Node node | |
6540
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
289 PREINIT: |
11118 | 290 GList *l; |
6544
a87b9c7d199e
[gaim-migrate @ 7066]
Christian Hammond <chipx86@chipx86.com>
parents:
6543
diff
changeset
|
291 PPCODE: |
11118 | 292 for (l = gaim_blist_node_get_extended_menu(node); l != NULL; l = l->next) { |
293 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::ListEntry"))); | |
294 } | |
295 | |
296 | |
297 void | |
298 gaim_blist_set_ui_ops(ops) | |
299 Gaim::BuddyList::UiOps ops | |
300 | |
301 | |
302 Gaim::BuddyList::UiOps | |
303 gaim_blist_get_ui_ops() | |
304 | |
305 void * | |
306 gaim_blist_get_handle() | |
307 | |
308 void | |
309 gaim_blist_init() | |
310 | |
311 void | |
312 gaim_blist_uninit() | |
313 | |
314 | |
315 MODULE = Gaim::BuddyList PACKAGE = Gaim::Chat PREFIX = gaim_chat_ | |
316 PROTOTYPES: ENABLE | |
317 | |
318 | |
319 Gaim::BuddyList::Group | |
320 gaim_chat_get_group(chat) | |
321 Gaim::BuddyList::Chat chat | |
322 | |
323 const char * | |
324 gaim_chat_get_name(chat) | |
325 Gaim::BuddyList::Chat chat | |
326 | |
327 Gaim::BuddyList::Chat | |
328 gaim_chat_new(account, alias, components) | |
329 Gaim::Account account | |
330 const char * alias | |
331 SV * components | |
332 INIT: | |
333 HV * t_HV; | |
334 HE * t_HE; | |
335 SV * t_SV; | |
336 GHashTable * t_GHash; | |
337 int i; | |
338 I32 len; | |
339 char *t_key, *t_value; | |
340 CODE: | |
341 t_HV = (HV *)SvRV(components); | |
342 t_GHash = g_hash_table_new(NULL, NULL); | |
343 | |
344 for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { | |
345 t_key = hv_iterkey(t_HE, &len); | |
346 t_SV = *hv_fetch(t_HV, t_key, len, 0); | |
347 t_value = SvPV(t_SV, PL_na); | |
348 | |
349 g_hash_table_insert(t_GHash, t_key, t_value); | |
6540
eae61831e596
[gaim-migrate @ 7062]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
350 } |
6545
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
351 |
11118 | 352 RETVAL = gaim_chat_new(account, alias, t_GHash); |
6545
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
353 OUTPUT: |
5a3fbef32910
[gaim-migrate @ 7067]
Christian Hammond <chipx86@chipx86.com>
parents:
6544
diff
changeset
|
354 RETVAL |
11118 | 355 |
356 | |
357 | |
358 | |
359 | |
360 | |
361 | |
362 | |
363 | |
364 | |
365 | |
366 MODULE = Gaim::BuddyList PACKAGE = Gaim::Buddy PREFIX = gaim_buddy_ | |
367 PROTOTYPES: ENABLE | |
368 | |
369 Gaim::BuddyList::Buddy | |
370 gaim_buddy_new(account, screenname, alias) | |
371 Gaim::Account account | |
372 const char *screenname | |
373 const char *alias | |
374 | |
375 void | |
376 gaim_buddy_set_icon(buddy, icon) | |
377 Gaim::BuddyList::Buddy buddy | |
378 Gaim::Buddy::Icon icon | |
379 | |
380 Gaim::Account | |
381 gaim_buddy_get_account(buddy) | |
382 Gaim::BuddyList::Buddy buddy | |
383 | |
384 const char * | |
385 gaim_buddy_get_name(buddy) | |
386 Gaim::BuddyList::Buddy buddy | |
387 | |
388 Gaim::Buddy::Icon | |
389 gaim_buddy_get_icon(buddy) | |
390 Gaim::BuddyList::Buddy buddy | |
391 | |
392 Gaim::BuddyList::Contact | |
393 gaim_buddy_get_contact(buddy) | |
394 Gaim::BuddyList::Buddy buddy | |
395 | |
396 Gaim::Presence | |
397 gaim_buddy_get_presence(buddy) | |
398 Gaim::BuddyList::Buddy buddy | |
399 | |
400 const char * | |
401 gaim_buddy_get_alias_only(buddy) | |
402 Gaim::BuddyList::Buddy buddy | |
403 | |
404 const char * | |
405 gaim_buddy_get_contact_alias(buddy) | |
406 Gaim::BuddyList::Buddy buddy | |
407 | |
408 const char * | |
409 gaim_buddy_get_local_alias(buddy) | |
410 Gaim::BuddyList::Buddy buddy | |
411 | |
412 const char * | |
413 gaim_buddy_get_alias(buddy) | |
414 Gaim::BuddyList::Buddy buddy | |
415 |