Mercurial > pidgin.yaz
annotate plugins/perl/common/Account.xs @ 12784:d3476701107d
[gaim-migrate @ 15131]
Whitespace and fix gaim_account_get_status_types so that the objects it returns are correctly classed.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Mon, 09 Jan 2006 07:46:31 +0000 |
parents | 6fd82071a7b8 |
children | 7ffee2a0fb12 |
rev | line source |
---|---|
6508 | 1 #include "module.h" |
2 | |
11290 | 3 MODULE = Gaim::Account PACKAGE = Gaim::Account PREFIX = gaim_account_ |
4 PROTOTYPES: ENABLE | |
11118 | 5 |
6 Gaim::Presence | |
7 gaim_account_get_presence(account) | |
8 Gaim::Account account | |
9 | |
10 Gaim::Account | |
12364 | 11 gaim_account_new(class, username, protocol_id) |
11118 | 12 const char * username |
13 const char * protocol_id | |
12364 | 14 C_ARGS: |
15 username, protocol_id | |
11118 | 16 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
17 void |
11118 | 18 gaim_account_destroy(account) |
19 Gaim::Account account | |
20 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
21 void |
10437 | 22 gaim_account_connect(account) |
23 Gaim::Account account | |
24 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
25 void |
11118 | 26 gaim_account_register(account) |
27 Gaim::Account account | |
28 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
29 void |
6508 | 30 gaim_account_disconnect(account) |
31 Gaim::Account account | |
32 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
33 void |
11118 | 34 gaim_account_request_change_password(account) |
35 Gaim::Account account | |
36 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
37 void |
11118 | 38 gaim_account_request_change_user_info(account) |
39 Gaim::Account account | |
40 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
41 void |
6508 | 42 gaim_account_set_username(account, username) |
43 Gaim::Account account | |
11118 | 44 const char * username |
6508 | 45 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
46 void |
6508 | 47 gaim_account_set_password(account, password) |
48 Gaim::Account account | |
11118 | 49 const char * password |
6508 | 50 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
51 void |
6508 | 52 gaim_account_set_alias(account, alias) |
53 Gaim::Account account | |
11118 | 54 const char * alias |
6508 | 55 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
56 void |
6508 | 57 gaim_account_set_user_info(account, user_info) |
58 Gaim::Account account | |
59 const char *user_info | |
60 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
61 void |
11118 | 62 gaim_account_set_buddy_icon(account, icon) |
6508 | 63 Gaim::Account account |
11118 | 64 const char *icon |
6508 | 65 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
66 void |
11118 | 67 gaim_account_set_connection(account, gc) |
6508 | 68 Gaim::Account account |
11118 | 69 Gaim::Connection gc |
6508 | 70 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
71 void |
6508 | 72 gaim_account_set_remember_password(account, value) |
73 Gaim::Account account | |
74 gboolean value | |
75 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
76 void |
6508 | 77 gaim_account_set_check_mail(account, value) |
78 Gaim::Account account | |
79 gboolean value | |
80 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
81 void |
11118 | 82 gaim_account_set_proxy_info(account, info) |
83 Gaim::Account account | |
84 Gaim::ProxyInfo info | |
85 | |
10504 | 86 void |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
87 gaim_account_set_status(account, status_id, active) |
11118 | 88 Gaim::Account account |
89 const char *status_id | |
90 gboolean active | |
91 CODE: | |
92 gaim_account_set_status(account, status_id, active); | |
93 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
94 void |
11118 | 95 gaim_account_set_status_types(account, status_types) |
10504 | 96 Gaim::Account account |
11118 | 97 SV * status_types |
98 PREINIT: | |
99 GList *t_GL; | |
100 int i, t_len; | |
101 PPCODE: | |
102 t_GL = NULL; | |
103 t_len = av_len((AV *)SvRV(status_types)); | |
10504 | 104 |
11118 | 105 for (i = 0; i < t_len; i++) { |
106 STRLEN t_sl; | |
107 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(status_types), i, 0), t_sl)); | |
108 } | |
109 gaim_account_set_status_types(account, t_GL); | |
110 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
111 void |
11118 | 112 gaim_account_clear_settings(account) |
113 Gaim::Account account | |
114 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
115 void |
11118 | 116 gaim_account_set_int(account, name, value) |
117 Gaim::Account account | |
118 const char *name | |
119 int value | |
120 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
121 gboolean |
6508 | 122 gaim_account_is_connected(account) |
123 Gaim::Account account | |
124 | |
125 const char * | |
126 gaim_account_get_username(account) | |
127 Gaim::Account account | |
128 | |
129 const char * | |
130 gaim_account_get_password(account) | |
131 Gaim::Account account | |
132 | |
133 const char * | |
134 gaim_account_get_alias(account) | |
135 Gaim::Account account | |
136 | |
137 const char * | |
138 gaim_account_get_user_info(account) | |
139 Gaim::Account account | |
140 | |
141 const char * | |
142 gaim_account_get_buddy_icon(account) | |
143 Gaim::Account account | |
144 | |
145 const char * | |
146 gaim_account_get_protocol_id(account) | |
147 Gaim::Account account | |
148 | |
11118 | 149 const char * |
150 gaim_account_get_protocol_name(account) | |
151 Gaim::Account account | |
152 | |
6508 | 153 Gaim::Connection |
154 gaim_account_get_connection(account) | |
155 Gaim::Account account | |
156 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
157 gboolean |
6508 | 158 gaim_account_get_remember_password(account) |
159 Gaim::Account account | |
160 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
161 gboolean |
6508 | 162 gaim_account_get_check_mail(account) |
163 Gaim::Account account | |
164 | |
11118 | 165 Gaim::ProxyInfo |
166 gaim_account_get_proxy_info(account) | |
167 Gaim::Account account | |
168 | |
169 Gaim::Status | |
170 gaim_account_get_active_status(account) | |
171 Gaim::Account account | |
172 | |
173 void | |
174 gaim_account_get_status_types(account) | |
10504 | 175 Gaim::Account account |
11118 | 176 PREINIT: |
11130 | 177 const GList *l; |
11118 | 178 PPCODE: |
179 for (l = gaim_account_get_status_types(account); l != NULL; l = l->next) { | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
180 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::StatusType"))); |
11118 | 181 } |
182 | |
183 Gaim::Log | |
184 gaim_account_get_log(account) | |
185 Gaim::Account account | |
186 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
187 void |
11118 | 188 gaim_account_destroy_log(account) |
189 Gaim::Account account | |
190 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
191 void |
11643 | 192 gaim_account_add_buddies(account, list) |
193 Gaim::Account account | |
194 SV * list | |
195 PREINIT: | |
196 GList *t_GL; | |
197 int i, t_len; | |
198 PPCODE: | |
199 t_GL = NULL; | |
200 t_len = av_len((AV *)SvRV(list)); | |
201 | |
202 for (i = 0; i < t_len; i++) { | |
203 STRLEN t_sl; | |
204 t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(list), i, 0), t_sl)); | |
205 } | |
206 gaim_account_add_buddies(account, t_GL); | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
207 |
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
208 void |
11643 | 209 gaim_account_add_buddy(account, buddy) |
210 Gaim::Account account | |
211 Gaim::BuddyList::Buddy buddy | |
212 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
213 void |
11643 | 214 gaim_account_change_password(account, a, b) |
215 Gaim::Account account | |
216 const char * a | |
217 const char * b | |
218 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
219 void |
11643 | 220 gaim_account_remove_buddies(account, A, B) |
221 Gaim::Account account | |
222 SV * A | |
223 SV * B | |
224 PREINIT: | |
225 GList *t_GL1, *t_GL2; | |
226 int i, t_len; | |
227 PPCODE: | |
228 t_GL1 = NULL; | |
229 t_len = av_len((AV *)SvRV(A)); | |
230 | |
231 for (i = 0; i < t_len; i++) { | |
232 STRLEN t_sl; | |
233 t_GL1 = g_list_append(t_GL1, SvPV(*av_fetch((AV *)SvRV(A), i, 0), t_sl)); | |
234 } | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
235 |
11643 | 236 t_GL2 = NULL; |
237 t_len = av_len((AV *)SvRV(B)); | |
238 | |
239 for (i = 0; i < t_len; i++) { | |
240 STRLEN t_sl; | |
241 t_GL2 = g_list_append(t_GL2, SvPV(*av_fetch((AV *)SvRV(B), i, 0), t_sl)); | |
242 } | |
243 gaim_account_remove_buddies(account, t_GL1, t_GL2); | |
244 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
245 void |
11643 | 246 gaim_account_remove_buddy(account, buddy, group) |
247 Gaim::Account account | |
248 Gaim::BuddyList::Buddy buddy | |
249 Gaim::BuddyList::Group group | |
250 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
251 void |
11643 | 252 gaim_account_remove_group(account, group) |
253 Gaim::Account account | |
254 Gaim::BuddyList::Group group | |
255 | |
6508 | 256 MODULE = Gaim::Account PACKAGE = Gaim::Accounts PREFIX = gaim_accounts_ |
11118 | 257 PROTOTYPES: ENABLE |
6508 | 258 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
259 void |
6508 | 260 gaim_accounts_add(account) |
261 Gaim::Account account | |
262 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
263 void |
6508 | 264 gaim_accounts_remove(account) |
265 Gaim::Account account | |
266 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
267 void |
11118 | 268 gaim_accounts_delete(account) |
269 Gaim::Account account | |
6595
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
270 |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
271 void |
11118 | 272 gaim_accounts_reorder(account, new_index) |
273 Gaim::Account account | |
274 size_t new_index | |
6508 | 275 |
276 void | |
11118 | 277 gaim_accounts_get_all() |
278 PREINIT: | |
279 GList *l; | |
280 PPCODE: | |
281 for (l = gaim_accounts_get_all(); l != NULL; l = l->next) { | |
282 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); | |
283 } | |
284 | |
285 void | |
286 gaim_accounts_get_all_active() | |
6508 | 287 PREINIT: |
288 GList *l; | |
289 PPCODE: | |
11118 | 290 for (l = gaim_accounts_get_all_active(); l != NULL; l = l->next) { |
6508 | 291 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); |
11118 | 292 } |
6508 | 293 |
11118 | 294 Gaim::Account |
295 gaim_accounts_find(name, protocol) | |
296 const char * name | |
297 const char * protocol | |
298 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
299 void |
11118 | 300 gaim_accounts_set_ui_ops(ops) |
301 Gaim::Account::UiOps ops | |
302 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
303 Gaim::Account::UiOps |
11118 | 304 gaim_accounts_get_ui_ops() |
305 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
306 void |
11118 | 307 gaim_accounts_get_handle() |
308 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
309 void |
11118 | 310 gaim_accounts_init() |
311 | |
12784
d3476701107d
[gaim-migrate @ 15131]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12364
diff
changeset
|
312 void |
11118 | 313 gaim_accounts_uninit() |