Mercurial > pidgin
annotate plugins/perl/common/Account.xs @ 10738:55af3fa46329
[gaim-migrate @ 12340]
Lots of changes here. A lot of it stems from chaning
gaim_account_connect() so that it DOES NOT have the GaimStatus
parameter. It will attempt to use the GaimStatus of your
account from the last time it was connected (which doesn't
work quite right yet).
My goal here was to save and load each account's GaimStatuses
to accounts.xml, so if you were "away" when you signed off then
you'll be "away" when you sign back on. Not quite there yet.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 26 Mar 2005 20:08:43 +0000 |
parents | 1a97d5e88d12 |
children | 2f5d99f963eb |
rev | line source |
---|---|
6508 | 1 #include "module.h" |
2 | |
3 MODULE = Gaim::Account PACKAGE = Gaim::Account PREFIX = gaim_account_ | |
4 PROTOTYPES: ENABLE | |
5 | |
10437 | 6 Gaim::Connection |
7 gaim_account_connect(account) | |
8 Gaim::Account account | |
9 CODE: | |
10738 | 10 RETVAL = gaim_account_connect(account); |
10437 | 11 OUTPUT: |
12 RETVAL | |
13 | |
6508 | 14 void |
15 gaim_account_disconnect(account) | |
16 Gaim::Account account | |
17 | |
18 void | |
19 gaim_account_set_username(account, username) | |
20 Gaim::Account account | |
21 const char *username | |
22 | |
23 void | |
24 gaim_account_set_password(account, password) | |
25 Gaim::Account account | |
26 const char *password | |
27 | |
28 void | |
29 gaim_account_set_alias(account, alias) | |
30 Gaim::Account account | |
31 const char *alias | |
32 | |
33 void | |
34 gaim_account_set_user_info(account, user_info) | |
35 Gaim::Account account | |
36 const char *user_info | |
6523
d7e04709be96
[gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
37 CODE: |
d7e04709be96
[gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
38 gaim_account_set_user_info(account, user_info); |
d7e04709be96
[gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
39 serv_set_info(gaim_account_get_connection(account), user_info); |
6508 | 40 |
41 void | |
42 gaim_account_set_buddy_icon(account, buddy_icon) | |
43 Gaim::Account account | |
44 const char *buddy_icon | |
45 | |
46 void | |
47 gaim_account_set_protocol_id(account, protocol_id) | |
48 Gaim::Account account | |
49 const char *protocol_id | |
50 | |
51 void | |
52 gaim_account_set_remember_password(account, value) | |
53 Gaim::Account account | |
54 gboolean value | |
55 | |
56 void | |
57 gaim_account_set_check_mail(account, value) | |
58 Gaim::Account account | |
59 gboolean value | |
60 | |
10504 | 61 void |
62 gaim_account_set_enabled(account, ui, value) | |
63 Gaim::Account account | |
64 const char *ui | |
65 gboolean value | |
66 | |
6508 | 67 gboolean |
68 gaim_account_is_connected(account) | |
69 Gaim::Account account | |
70 | |
71 const char * | |
72 gaim_account_get_username(account) | |
73 Gaim::Account account | |
74 | |
75 const char * | |
76 gaim_account_get_password(account) | |
77 Gaim::Account account | |
78 | |
79 const char * | |
80 gaim_account_get_alias(account) | |
81 Gaim::Account account | |
82 | |
83 const char * | |
84 gaim_account_get_user_info(account) | |
85 Gaim::Account account | |
86 | |
87 const char * | |
88 gaim_account_get_buddy_icon(account) | |
89 Gaim::Account account | |
90 | |
91 const char * | |
92 gaim_account_get_protocol_id(account) | |
93 Gaim::Account account | |
94 | |
95 Gaim::Connection | |
96 gaim_account_get_connection(account) | |
97 Gaim::Account account | |
98 | |
99 gboolean | |
100 gaim_account_get_remember_password(account) | |
101 Gaim::Account account | |
102 | |
103 gboolean | |
104 gaim_account_get_check_mail(account) | |
105 Gaim::Account account | |
106 | |
10504 | 107 gboolean |
108 gaim_account_get_enabled(account, ui) | |
109 Gaim::Account account | |
110 const char *ui | |
111 | |
6508 | 112 |
113 MODULE = Gaim::Account PACKAGE = Gaim::Accounts PREFIX = gaim_accounts_ | |
114 | |
115 void | |
116 gaim_accounts_add(account) | |
117 Gaim::Account account | |
118 | |
119 void | |
120 gaim_accounts_remove(account) | |
121 Gaim::Account account | |
122 | |
6595
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
123 Gaim::Account |
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
124 find(name, protocol_id) |
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
125 const char *name |
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
126 const char *protocol_id |
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
127 CODE: |
7176 | 128 RETVAL = gaim_accounts_find(name, protocol_id); |
6595
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
129 OUTPUT: |
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
130 RETVAL |
782eef79cf3c
[gaim-migrate @ 7119]
Christian Hammond <chipx86@chipx86.com>
parents:
6551
diff
changeset
|
131 |
6551
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
132 void * |
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
133 handle() |
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
134 CODE: |
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
135 RETVAL = gaim_accounts_get_handle(); |
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
136 OUTPUT: |
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
137 RETVAL |
12343e2aaab1
[gaim-migrate @ 7073]
Christian Hammond <chipx86@chipx86.com>
parents:
6523
diff
changeset
|
138 |
6508 | 139 |
140 MODULE = Gaim::Account PACKAGE = Gaim | |
141 | |
142 void | |
143 accounts() | |
144 PREINIT: | |
145 GList *l; | |
146 PPCODE: | |
147 for (l = gaim_accounts_get_all(); l != NULL; l = l->next) | |
148 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); | |
149 |