Mercurial > pidgin.yaz
annotate src/account.h @ 6448:fd3c96c0c2d6
[gaim-migrate @ 6957]
italian.nsh added to EXTRA_DIST
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Wed, 13 Aug 2003 15:21:33 +0000 |
parents | 41e6d15f4687 |
children | 70d5122bc3ff |
rev | line source |
---|---|
5563 | 1 /** |
2 * @file account.h Account API | |
3 * @ingroup core | |
4 * | |
5 * gaim | |
6 * | |
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 #ifndef _GAIM_ACCOUNTS_H_ | |
24 #define _GAIM_ACCOUNTS_H_ | |
25 | |
26 typedef struct _GaimAccount GaimAccount; | |
27 | |
28 #include "connection.h" | |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
29 #include "proxy.h" |
5563 | 30 #include "prpl.h" |
31 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
32 enum |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
33 { |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
34 PERMIT_ALL = 1, |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
35 PERMIT_NONE, |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
36 PERMIT_SOME, |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
37 DENY_SOME |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
38 }; |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5779
diff
changeset
|
39 |
5563 | 40 struct _GaimAccount |
41 { | |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
42 char *username; /**< The username. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
43 char *alias; /**< The current alias. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
44 char *password; /**< The account password. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
45 char *user_info; /**< User information. */ |
5563 | 46 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
47 char *buddy_icon; /**< The buddy icon. */ |
5563 | 48 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
49 gboolean remember_pass; /**< Remember the password. */ |
5563 | 50 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
51 char *protocol_id; /**< The ID of the protocol. */ |
5563 | 52 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
53 GaimConnection *gc; /**< The connection handle. */ |
5563 | 54 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
55 GHashTable *settings; /**< Protocol-specific settings. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
56 GHashTable *ui_settings; /**< UI-specific settings. */ |
5563 | 57 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
58 char *ip; /**< The IP address for transfers. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
59 GaimProxyInfo *proxy_info; /**< Proxy information. */ |
5563 | 60 |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
61 GSList *permit; /**< Permit list. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
62 GSList *deny; /**< Deny list. */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
63 int perm_deny; /**< The permit/deny setting. */ |
5563 | 64 }; |
65 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
66 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
67 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
68 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
69 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
70 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
71 /** @name Account API */ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
72 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
73 /*@{*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
74 |
5563 | 75 /** |
76 * Creates a new account. | |
77 * | |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
78 * @param username The username. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
79 * @param protocol_id The protocol ID. |
5563 | 80 */ |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
81 GaimAccount *gaim_account_new(const char *username, const char *protocol_id); |
5563 | 82 |
83 /** | |
84 * Destroys an account. | |
85 * | |
86 * @param account The account to destroy. | |
87 */ | |
88 void gaim_account_destroy(GaimAccount *account); | |
89 | |
90 /** | |
91 * Connects to an account. | |
92 * | |
93 * @param account The account to connect to. | |
94 * | |
95 * @return The gaim connection. | |
96 */ | |
97 GaimConnection *gaim_account_connect(GaimAccount *account); | |
98 | |
99 /** | |
100 * Disconnects from an account. | |
101 * | |
102 * @param account The account to disconnect from. | |
103 * | |
104 * @return The gaim connection. | |
105 */ | |
106 void gaim_account_disconnect(GaimAccount *account); | |
107 | |
108 /** | |
109 * Sets the account's username. | |
110 * | |
111 * @param account The account. | |
112 * @param username The username. | |
113 */ | |
114 void gaim_account_set_username(GaimAccount *account, const char *username); | |
115 | |
116 /** | |
117 * Sets the account's password. | |
118 * | |
119 * @param account The account. | |
120 * @param password The password. | |
121 */ | |
122 void gaim_account_set_password(GaimAccount *account, const char *password); | |
123 | |
124 /** | |
125 * Sets the account's alias. | |
126 * | |
127 * @param account The account. | |
128 * @param alias The alias. | |
129 */ | |
130 void gaim_account_set_alias(GaimAccount *account, const char *alias); | |
131 | |
132 /** | |
133 * Sets the account's user information | |
134 * | |
135 * @param account The account. | |
136 * @param info The user information. | |
137 */ | |
138 void gaim_account_set_user_info(GaimAccount *account, const char *user_info); | |
139 | |
140 /** | |
141 * Sets the account's buddy icon. | |
142 * | |
143 * @param account The account. | |
144 * @param icon The buddy icon file. | |
145 */ | |
146 void gaim_account_set_buddy_icon(GaimAccount *account, const char *icon); | |
147 | |
148 /** | |
149 * Sets the account's protocol. | |
150 * | |
151 * @param account The account. | |
152 * @param protocol The protocol. | |
153 */ | |
154 void gaim_account_set_protocol(GaimAccount *account, GaimProtocol protocol); | |
155 | |
156 /** | |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
157 * Sets the account's protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
158 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
159 * @param account The account. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
160 * @param protocol_id The protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
161 */ |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
162 void gaim_account_set_protocol_id(GaimAccount *account, |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
163 const char *protocol_id); |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
164 |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
165 /** |
5563 | 166 * Sets the account's connection. |
167 * | |
168 * @param account The account. | |
169 * @param gc The connection. | |
170 */ | |
171 void gaim_account_set_connection(GaimAccount *account, GaimConnection *gc); | |
172 | |
173 /** | |
174 * Sets whether or not this account should save its password. | |
175 * | |
176 * @param account The account. | |
177 * @param value @c TRUE if it should remember the password. | |
178 */ | |
179 void gaim_account_set_remember_password(GaimAccount *account, gboolean value); | |
180 | |
181 /** | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
182 * Sets whether or not this account should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
183 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
184 * @param account The account. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
185 * @param value @c TRUE if it should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
186 */ |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
187 void gaim_account_set_check_mail(GaimAccount *account, gboolean value); |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
188 |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
189 /** |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
190 * Sets whether or not this account should auto-login for the specified |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
191 * UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
192 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
193 * @param account The account. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
194 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
195 * @param value @c TRUE if it should check for mail. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
196 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
197 void gaim_account_set_auto_login(GaimAccount *account, const char *ui, |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
198 gboolean value); |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
199 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
200 /** |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
201 * Sets the public IP address the account will use for such things |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
202 * as file transfer. |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
203 * |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
204 * @param account The account. |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
205 * @param ip The IP address. |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
206 */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
207 void gaim_account_set_public_ip(GaimAccount *account, const char *ip); |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
208 |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
209 /** |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
210 * Sets the account's proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
211 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
212 * @param account The account. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
213 * @param info The proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
214 */ |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
215 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info); |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
216 |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
217 /** |
5694
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
218 * Clears all protocol-specific settings on an account. |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
219 * |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
220 * @param account The account. |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
221 */ |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
222 void gaim_account_clear_settings(GaimAccount *account); |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
223 |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
224 /** |
5563 | 225 * Sets a protocol-specific integer setting for an account. |
226 * | |
227 * @param account The account. | |
228 * @param name The name of the setting. | |
229 * @param value The setting's value. | |
230 */ | |
231 void gaim_account_set_int(GaimAccount *account, const char *name, int value); | |
232 | |
233 /** | |
234 * Sets a protocol-specific string setting for an account. | |
235 * | |
236 * @param account The account. | |
237 * @param name The name of the setting. | |
238 * @param value The setting's value. | |
239 */ | |
240 void gaim_account_set_string(GaimAccount *account, const char *name, | |
241 const char *string); | |
242 | |
243 /** | |
244 * Sets a protocol-specific boolean setting for an account. | |
245 * | |
246 * @param account The account. | |
247 * @param name The name of the setting. | |
248 * @param value The setting's value. | |
249 */ | |
250 void gaim_account_set_bool(GaimAccount *account, const char *name, | |
251 gboolean value); | |
252 | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
253 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
254 * Sets a UI-specific integer setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
255 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
256 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
257 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
258 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
259 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
260 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
261 void gaim_account_set_ui_int(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
262 const char *name, int value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
263 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
264 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
265 * Sets a UI-specific string setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
266 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
267 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
268 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
269 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
270 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
271 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
272 void gaim_account_set_ui_string(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
273 const char *name, const char *string); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
274 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
275 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
276 * Sets a UI-specific boolean setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
277 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
278 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
279 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
280 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
281 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
282 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
283 void gaim_account_set_ui_bool(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
284 const char *name, gboolean value); |
5563 | 285 |
286 /** | |
287 * Returns whether or not the account is connected. | |
288 * | |
289 * @param account The account. | |
290 * | |
291 * @return @c TRUE if connected, or @c FALSE otherwise. | |
292 */ | |
293 gboolean gaim_account_is_connected(const GaimAccount *account); | |
294 | |
295 /** | |
296 * Returns the account's username. | |
297 * | |
298 * @param account The account. | |
299 * | |
300 * @return The username. | |
301 */ | |
302 const char *gaim_account_get_username(const GaimAccount *account); | |
303 | |
304 /** | |
305 * Returns the account's password. | |
306 * | |
307 * @param account The account. | |
308 * | |
309 * @return The password. | |
310 */ | |
311 const char *gaim_account_get_password(const GaimAccount *account); | |
312 | |
313 /** | |
314 * Returns the account's alias. | |
315 * | |
316 * @param account The account. | |
317 * | |
318 * @return The alias. | |
319 */ | |
320 const char *gaim_account_get_alias(const GaimAccount *account); | |
321 | |
322 /** | |
323 * Returns the account's user information. | |
324 * | |
325 * @param account The account. | |
326 * | |
327 * @return The user information. | |
328 */ | |
329 const char *gaim_account_get_user_info(const GaimAccount *account); | |
330 | |
331 /** | |
332 * Returns the account's buddy icon filename. | |
333 * | |
334 * @param account The account. | |
335 * | |
336 * @return The buddy icon filename. | |
337 */ | |
338 const char *gaim_account_get_buddy_icon(const GaimAccount *account); | |
339 | |
340 /** | |
341 * Returns the account's protocol. | |
342 * | |
343 * @param account The account. | |
344 * | |
345 * @return The protocol. | |
346 */ | |
347 GaimProtocol gaim_account_get_protocol(const GaimAccount *account); | |
348 | |
349 /** | |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
350 * Returns the account's protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
351 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
352 * @param account The account. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
353 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
354 * @return The protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
355 */ |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
356 const char *gaim_account_get_protocol_id(const GaimAccount *account); |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
357 |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
358 /** |
5563 | 359 * Returns the account's connection. |
360 * | |
361 * @param account The account. | |
362 * | |
363 * @return The connection. | |
364 */ | |
365 GaimConnection *gaim_account_get_connection(const GaimAccount *account); | |
366 | |
367 /** | |
368 * Returns whether or not this account should save its password. | |
369 * | |
370 * @param account The account. | |
371 * | |
372 * @return @c TRUE if it should remember the password. | |
373 */ | |
374 gboolean gaim_account_get_remember_password(const GaimAccount *account); | |
375 | |
376 /** | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
377 * Returns whether or not this account should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
378 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
379 * @param account The account. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
380 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
381 * @return @c TRUE if it should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
382 */ |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
383 gboolean gaim_account_get_check_mail(const GaimAccount *account); |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
384 |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
385 /** |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
386 * Returns whether or not this account should auto-login for the |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
387 * specified UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
388 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
389 * @param account The account. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
390 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
391 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
392 * @return @c TRUE if it should auto-login on this UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
393 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
394 gboolean gaim_account_get_auto_login(const GaimAccount *account, |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
395 const char *ui); |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
396 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
397 /** |
6239
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
398 * Returns the account's public IP address. |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
399 * |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
400 * @param account The account. |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
401 * |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
402 * @return The IP address. |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
403 */ |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
404 const char *gaim_account_get_public_ip(const GaimAccount *account); |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
405 |
8d10cdfe1bb1
[gaim-migrate @ 6733]
Christian Hammond <chipx86@chipx86.com>
parents:
5979
diff
changeset
|
406 /** |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
407 * Returns the account's proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
408 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
409 * @param account The account. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
410 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
411 * @return The proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
412 */ |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
413 GaimProxyInfo *gaim_account_get_proxy_info(const GaimAccount *account); |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
414 |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
415 /** |
5563 | 416 * Returns a protocol-specific integer setting for an account. |
417 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
418 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
419 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
420 * @param default_value The default value. |
5563 | 421 * |
422 * @return The value. | |
423 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
424 int gaim_account_get_int(const GaimAccount *account, const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
425 int default_value); |
5563 | 426 |
427 /** | |
428 * Returns a protocol-specific string setting for an account. | |
429 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
430 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
431 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
432 * @param default_value The default value. |
5563 | 433 * |
434 * @return The value. | |
435 */ | |
436 const char *gaim_account_get_string(const GaimAccount *account, | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
437 const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
438 const char *default_value); |
5563 | 439 |
440 /** | |
441 * Returns a protocol-specific boolean setting for an account. | |
442 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
443 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
444 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
445 * @param default_value The default value. |
5563 | 446 * |
447 * @return The value. | |
448 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
449 gboolean gaim_account_get_bool(const GaimAccount *account, const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
450 gboolean default_value); |
5563 | 451 |
452 /** | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
453 * Returns a UI-specific integer setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
454 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
455 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
456 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
457 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
458 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
459 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
460 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
461 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
462 int gaim_account_get_ui_int(const GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
463 const char *name, int default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
464 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
465 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
466 * Returns a UI-specific string setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
467 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
468 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
469 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
470 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
471 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
472 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
473 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
474 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
475 const char *gaim_account_get_ui_string(const GaimAccount *account, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
476 const char *ui, const char *name, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
477 const char *default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
478 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
479 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
480 * Returns a UI-specific boolean setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
481 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
482 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
483 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
484 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
485 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
486 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
487 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
488 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
489 gboolean gaim_account_get_ui_bool(const GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
490 const char *name, gboolean default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
491 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
492 /*@}*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
493 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
494 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
495 /** @name Accounts API */ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
496 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
497 /*@{*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
498 |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
499 /** |
5573
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
500 * Loads the accounts. |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
501 */ |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
502 gboolean gaim_accounts_load(); |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
503 |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
504 /** |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
505 * Force an immediate write of accounts. |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
506 */ |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
507 void gaim_accounts_sync(); |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
508 |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
509 /** |
5710
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
510 * Adds an account to the list of accounts. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
511 * |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
512 * @param account The account. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
513 */ |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
514 void gaim_accounts_add(GaimAccount *account); |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
515 |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
516 /** |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
517 * Removes an account from the list of accounts. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
518 * |
6367
9fd154ca6a94
[gaim-migrate @ 6872]
Christian Hammond <chipx86@chipx86.com>
parents:
6239
diff
changeset
|
519 * This will remove any buddies from the buddy list that belong to this |
9fd154ca6a94
[gaim-migrate @ 6872]
Christian Hammond <chipx86@chipx86.com>
parents:
6239
diff
changeset
|
520 * account. |
9fd154ca6a94
[gaim-migrate @ 6872]
Christian Hammond <chipx86@chipx86.com>
parents:
6239
diff
changeset
|
521 * |
5710
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
522 * @param account The account. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
523 */ |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
524 void gaim_accounts_remove(GaimAccount *account); |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
525 |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
526 /** |
6368
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
527 * Deletes an account. |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
528 * |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
529 * This will remove any buddies from the buddy list that belong to this |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
530 * account, and will also destroy @a account. |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
531 * |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
532 * @param account The account. |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
533 */ |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
534 void gaim_accounts_delete(GaimAccount *account); |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
535 |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
536 /** |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
537 * Auto-logins to all accounts set to auto-login under the specified UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
538 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
539 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
540 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
541 void gaim_accounts_auto_login(const char *ui); |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
542 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
543 /** |
5580
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
544 * Reorders an account. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
545 * |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
546 * @param account The account to reorder. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
547 * @param new_index The new index for the account. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
548 */ |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
549 void gaim_accounts_reorder(GaimAccount *account, size_t new_index); |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
550 |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
551 /** |
5563 | 552 * Returns a list of all accounts. |
553 * | |
554 * @return A list of all accounts. | |
555 */ | |
556 GList *gaim_accounts_get_all(void); | |
557 | |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
558 /** |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
559 * Finds an account with the specified name and protocol number. |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
560 * |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
561 * @param name The account username. |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
562 * @param protocol The account protocol number. |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
563 * |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
564 * @return The account, if found, or @c FALSE otherwise. |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
565 */ |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
566 GaimAccount *gaim_accounts_find(const char *name, GaimProtocol protocol); |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
567 |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
568 /** |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
569 * Finds an account with the specified name and protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
570 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
571 * @param name The account username. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
572 * @param protocol_id The account protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
573 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
574 * @return The account, if found, or @c FALSE otherwise. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
575 */ |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
576 GaimAccount *gaim_accounts_find_with_prpl_id(const char *name, |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
577 const char *protocol_id); |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
578 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
579 /*@}*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
580 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
581 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
582 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
583 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
584 |
5563 | 585 #endif /* _GAIM_ACCOUNTS_H_ */ |