Mercurial > pidgin.yaz
comparison plugins/perl/common/BuddyList.xs @ 6542:fe0294504602
[gaim-migrate @ 7064]
Learn as you go, I guess... Split off the Chat, Group, and Buddy classes
into their own files and bootstrapped them so they'll actually work (I hope
at least).
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 21 Aug 2003 03:23:18 +0000 |
parents | f31eb1fab20e |
children | 4d45f1eb0a7b |
comparison
equal
deleted
inserted
replaced
6541:f31eb1fab20e | 6542:fe0294504602 |
---|---|
84 for (node = gaim_get_blist()->root; node != NULL; node = node->next) | 84 for (node = gaim_get_blist()->root; node != NULL; node = node->next) |
85 { | 85 { |
86 XPUSHs(sv_2mortal(gaim_perl_bless_object(node, | 86 XPUSHs(sv_2mortal(gaim_perl_bless_object(node, |
87 "Gaim::BuddyList::Group"))); | 87 "Gaim::BuddyList::Group"))); |
88 } | 88 } |
89 | |
90 | |
91 ########################################################################### | |
92 MODULE = Gaim::BuddyList::Group PACKAGE = Gaim::BuddyList::Group PREFIX = gaim_group_ | |
93 PROTOTYPES: ENABLE | |
94 ########################################################################### | |
95 | |
96 Gaim::BuddyList::Group | |
97 new(name) | |
98 const char *name | |
99 CODE: | |
100 RETVAL = gaim_group_new(name); | |
101 OUTPUT: | |
102 RETVAL | |
103 | |
104 void | |
105 rename(group, new_name) | |
106 Gaim::BuddyList::Group group | |
107 const char *new_name | |
108 CODE: | |
109 gaim_blist_rename_group(group, new_name); | |
110 | |
111 void | |
112 get_accounts(group) | |
113 Gaim::BuddyList::Group group | |
114 PREINIT: | |
115 GSList *l; | |
116 PPCODE: | |
117 for (l = gaim_group_get_accounts(group); l != NULL; l = l->next) | |
118 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); | |
119 | |
120 int | |
121 get_size(group, offline) | |
122 Gaim::BuddyList::Group group | |
123 gboolean offline | |
124 CODE: | |
125 RETVAL = gaim_blist_get_group_size(group, offline); | |
126 OUTPUT: | |
127 RETVAL | |
128 | |
129 const char * | |
130 get_name(group) | |
131 Gaim::BuddyList::Group group | |
132 CODE: | |
133 RETVAL = group->name; | |
134 OUTPUT: | |
135 RETVAL | |
136 | |
137 int | |
138 get_online_count(group) | |
139 Gaim::BuddyList::Group group | |
140 CODE: | |
141 RETVAL = gaim_blist_get_group_online_count(group); | |
142 OUTPUT: | |
143 RETVAL | |
144 | |
145 void | |
146 gaim_group_set_setting(group, key, value) | |
147 Gaim::BuddyList::Group group | |
148 const char *key | |
149 const char *value | |
150 | |
151 const char * | |
152 gaim_group_get_setting(group, key) | |
153 Gaim::BuddyList::Group group | |
154 const char *key | |
155 | |
156 void | |
157 buddies(group) | |
158 Gaim::BuddyList::Group group | |
159 PREINIT: | |
160 GaimBlistNode *node; | |
161 GaimBlistNode *_group = (GaimBlistNode *)group; | |
162 PPCODE: | |
163 for (node = _group->child; node != NULL; node = node->next) | |
164 { | |
165 XPUSHs(sv_2mortal(gaim_perl_bless_object(node, | |
166 "Gaim::BuddyList::Buddy"))); | |
167 } | |
168 | |
169 | |
170 ########################################################################### | |
171 MODULE = Gaim::BuddyList::Buddy PACKAGE = Gaim::BuddyList::Buddy PREFIX = gaim_buddy_ | |
172 PROTOTYPES: ENABLE | |
173 ########################################################################### | |
174 | |
175 Gaim::BuddyList::Buddy | |
176 new(account, name, alias) | |
177 Gaim::Account account | |
178 const char *name | |
179 const char *alias | |
180 CODE: | |
181 RETVAL = gaim_buddy_new(account, name, alias); | |
182 OUTPUT: | |
183 RETVAL | |
184 | |
185 void | |
186 update_presence(buddy, presence) | |
187 Gaim::BuddyList::Buddy buddy | |
188 int presence | |
189 CODE: | |
190 gaim_blist_update_buddy_presence(buddy, presence); | |
191 | |
192 void | |
193 set_idle_time(buddy, idle) | |
194 Gaim::BuddyList::Buddy buddy | |
195 int idle | |
196 CODE: | |
197 gaim_blist_update_buddy_idle(buddy, idle); | |
198 | |
199 void | |
200 set_warning_percent(buddy, warning) | |
201 Gaim::BuddyList::Buddy buddy | |
202 int warning | |
203 CODE: | |
204 gaim_blist_update_buddy_evil(buddy, warning); | |
205 | |
206 void | |
207 rename(buddy, new_name) | |
208 Gaim::BuddyList::Buddy buddy | |
209 const char *new_name | |
210 CODE: | |
211 gaim_blist_rename_buddy(buddy, new_name); | |
212 | |
213 void | |
214 set_alias(buddy, alias) | |
215 Gaim::BuddyList::Buddy buddy | |
216 const char *alias | |
217 CODE: | |
218 gaim_blist_alias_buddy(buddy, alias); | |
219 | |
220 void | |
221 set_server_alias(buddy, alias) | |
222 Gaim::BuddyList::Buddy buddy | |
223 const char *alias | |
224 CODE: | |
225 gaim_blist_server_alias_buddy(buddy, alias); | |
226 | |
227 const char * | |
228 get_name(buddy) | |
229 Gaim::BuddyList::Buddy buddy | |
230 CODE: | |
231 RETVAL = buddy->name; | |
232 OUTPUT: | |
233 RETVAL | |
234 | |
235 Gaim::Account | |
236 get_account(buddy) | |
237 Gaim::BuddyList::Buddy buddy | |
238 CODE: | |
239 RETVAL = buddy->account; | |
240 OUTPUT: | |
241 RETVAL | |
242 | |
243 const char * | |
244 get_alias_only(buddy) | |
245 Gaim::BuddyList::Buddy buddy | |
246 CODE: | |
247 RETVAL = gaim_get_buddy_alias_only(buddy); | |
248 OUTPUT: | |
249 RETVAL | |
250 | |
251 const char * | |
252 get_alias(buddy) | |
253 Gaim::BuddyList::Buddy buddy | |
254 CODE: | |
255 RETVAL = gaim_get_buddy_alias(buddy); | |
256 OUTPUT: | |
257 RETVAL | |
258 | |
259 Gaim::BuddyList::Group | |
260 get_group(buddy) | |
261 Gaim::BuddyList::Buddy buddy | |
262 CODE: | |
263 RETVAL = gaim_find_buddys_group(buddy); | |
264 OUTPUT: | |
265 RETVAL | |
266 | |
267 void | |
268 gaim_buddy_set_setting(buddy, key, value) | |
269 Gaim::BuddyList::Buddy buddy | |
270 const char *key | |
271 const char *value | |
272 | |
273 const char * | |
274 gaim_buddy_get_setting(buddy, key) | |
275 Gaim::BuddyList::Buddy buddy | |
276 const char *key | |
277 | |
278 | |
279 ########################################################################### | |
280 MODULE = Gaim::BuddyList::Chat PACKAGE = Gaim::BuddyList::Chat PREFIX = gaim_chat_ | |
281 PROTOTYPES: ENABLE | |
282 ########################################################################### | |
283 | |
284 void | |
285 set_alias(chat, alias) | |
286 Gaim::BuddyList::Chat chat | |
287 const char *alias | |
288 CODE: | |
289 gaim_blist_alias_chat(chat, alias); | |
290 | |
291 const char * | |
292 gaim_chat_get_display_name(chat) | |
293 Gaim::BuddyList::Chat chat | |
294 | |
295 Gaim::BuddyList::Group | |
296 gaim_blist_chat_get_group(chat) | |
297 Gaim::BuddyList::Chat chat | |
298 CODE: | |
299 RETVAL = gaim_blist_chat_get_group(chat); | |
300 OUTPUT: | |
301 RETVAL | |
302 | |
303 void | |
304 gaim_chat_set_setting(chat, key, value) | |
305 Gaim::BuddyList::Chat chat | |
306 const char *key | |
307 const char *value | |
308 | |
309 const char * | |
310 gaim_chat_get_setting(chat, key) | |
311 Gaim::BuddyList::Chat chat | |
312 const char *key | |
313 | |
314 Gaim::Account | |
315 get_account(chat) | |
316 Gaim::BuddyList::Chat chat | |
317 CODE: | |
318 RETVAL = chat->account; | |
319 OUTPUT: | |
320 RETVAL |