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