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