Mercurial > pidgin.yaz
annotate src/account.h @ 5916:a51b709b2b3e
[gaim-migrate @ 6348]
Kyung-uk Son updated the Korean translation again :-)
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 18 Jun 2003 01:32:39 +0000 |
parents | d58406d31a1a |
children | a4f2aba0848d |
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 { | |
42 char *username; /**< The username. */ | |
43 char *alias; /**< The current alias. */ | |
44 char *password; /**< The account password. */ | |
45 char *user_info; /**< User information. */ | |
46 | |
47 char *buddy_icon; /**< The buddy icon. */ | |
48 | |
49 gboolean remember_pass; /**< Remember the password. */ | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
50 gboolean check_mail; /**< Check for mail. */ |
5563 | 51 |
52 GaimProtocol protocol; /**< The account protocol. */ | |
5643
eb685809108b
[gaim-migrate @ 6057]
Christian Hammond <chipx86@chipx86.com>
parents:
5580
diff
changeset
|
53 char *protocol_id; /**< The ID of the protocol. */ |
5563 | 54 |
55 GaimConnection *gc; /**< The connection handle. */ | |
56 | |
57 GHashTable *settings; /**< Protocol-specific settings. */ | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
58 GHashTable *ui_settings; /**< UI-specific settings. */ |
5563 | 59 |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
60 GaimProxyInfo *proxy_info; /**< Proxy information. */ |
5563 | 61 |
62 GSList *permit; /**< Permit list. */ | |
63 GSList *deny; /**< Deny list. */ | |
64 int perm_deny; /**< The permit/deny setting. */ | |
65 }; | |
66 | |
67 /** | |
68 * Creates a new account. | |
69 * | |
70 * @param username The username. | |
71 * @param protocol The protocol. | |
72 */ | |
73 GaimAccount *gaim_account_new(const char *username, GaimProtocol protocol); | |
74 | |
75 /** | |
76 * Destroys an account. | |
77 * | |
78 * @param account The account to destroy. | |
79 */ | |
80 void gaim_account_destroy(GaimAccount *account); | |
81 | |
82 /** | |
83 * Connects to an account. | |
84 * | |
85 * @param account The account to connect to. | |
86 * | |
87 * @return The gaim connection. | |
88 */ | |
89 GaimConnection *gaim_account_connect(GaimAccount *account); | |
90 | |
91 /** | |
92 * Disconnects from an account. | |
93 * | |
94 * @param account The account to disconnect from. | |
95 * | |
96 * @return The gaim connection. | |
97 */ | |
98 void gaim_account_disconnect(GaimAccount *account); | |
99 | |
100 /** | |
101 * Sets the account's username. | |
102 * | |
103 * @param account The account. | |
104 * @param username The username. | |
105 */ | |
106 void gaim_account_set_username(GaimAccount *account, const char *username); | |
107 | |
108 /** | |
109 * Sets the account's password. | |
110 * | |
111 * @param account The account. | |
112 * @param password The password. | |
113 */ | |
114 void gaim_account_set_password(GaimAccount *account, const char *password); | |
115 | |
116 /** | |
117 * Sets the account's alias. | |
118 * | |
119 * @param account The account. | |
120 * @param alias The alias. | |
121 */ | |
122 void gaim_account_set_alias(GaimAccount *account, const char *alias); | |
123 | |
124 /** | |
125 * Sets the account's user information | |
126 * | |
127 * @param account The account. | |
128 * @param info The user information. | |
129 */ | |
130 void gaim_account_set_user_info(GaimAccount *account, const char *user_info); | |
131 | |
132 /** | |
133 * Sets the account's buddy icon. | |
134 * | |
135 * @param account The account. | |
136 * @param icon The buddy icon file. | |
137 */ | |
138 void gaim_account_set_buddy_icon(GaimAccount *account, const char *icon); | |
139 | |
140 /** | |
141 * Sets the account's protocol. | |
142 * | |
143 * @param account The account. | |
144 * @param protocol The protocol. | |
145 */ | |
146 void gaim_account_set_protocol(GaimAccount *account, GaimProtocol protocol); | |
147 | |
148 /** | |
149 * Sets the account's connection. | |
150 * | |
151 * @param account The account. | |
152 * @param gc The connection. | |
153 */ | |
154 void gaim_account_set_connection(GaimAccount *account, GaimConnection *gc); | |
155 | |
156 /** | |
157 * Sets whether or not this account should save its password. | |
158 * | |
159 * @param account The account. | |
160 * @param value @c TRUE if it should remember the password. | |
161 */ | |
162 void gaim_account_set_remember_password(GaimAccount *account, gboolean value); | |
163 | |
164 /** | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
165 * Sets whether or not this account should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
166 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
167 * @param account The account. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
168 * @param value @c TRUE if it should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
169 */ |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
170 void gaim_account_set_check_mail(GaimAccount *account, gboolean value); |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
171 |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
172 /** |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
173 * 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
|
174 * UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
175 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
176 * @param account The account. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
177 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
178 * @param value @c TRUE if it should check for mail. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
179 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
180 void gaim_account_set_auto_login(GaimAccount *account, const char *ui, |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
181 gboolean value); |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
182 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
183 /** |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
184 * Sets the account's proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
185 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
186 * @param account The account. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
187 * @param info The proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
188 */ |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
189 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info); |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
190 |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
191 /** |
5694
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
192 * Clears all protocol-specific settings on an account. |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
193 * |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
194 * @param account The account. |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
195 */ |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
196 void gaim_account_clear_settings(GaimAccount *account); |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
197 |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
198 /** |
5563 | 199 * Sets a protocol-specific integer setting for an account. |
200 * | |
201 * @param account The account. | |
202 * @param name The name of the setting. | |
203 * @param value The setting's value. | |
204 */ | |
205 void gaim_account_set_int(GaimAccount *account, const char *name, int value); | |
206 | |
207 /** | |
208 * Sets a protocol-specific string setting for an account. | |
209 * | |
210 * @param account The account. | |
211 * @param name The name of the setting. | |
212 * @param value The setting's value. | |
213 */ | |
214 void gaim_account_set_string(GaimAccount *account, const char *name, | |
215 const char *string); | |
216 | |
217 /** | |
218 * Sets a protocol-specific boolean setting for an account. | |
219 * | |
220 * @param account The account. | |
221 * @param name The name of the setting. | |
222 * @param value The setting's value. | |
223 */ | |
224 void gaim_account_set_bool(GaimAccount *account, const char *name, | |
225 gboolean value); | |
226 | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
227 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
228 * Sets a UI-specific integer setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
229 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
230 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
231 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
232 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
233 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
234 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
235 void gaim_account_set_ui_int(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
236 const char *name, int value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
237 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
238 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
239 * Sets a UI-specific string setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
240 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
241 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
242 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
243 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
244 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
245 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
246 void gaim_account_set_ui_string(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
247 const char *name, const char *string); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
248 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
249 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
250 * Sets a UI-specific boolean setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
251 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
252 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
253 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
254 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
255 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
256 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
257 void gaim_account_set_ui_bool(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
258 const char *name, gboolean value); |
5563 | 259 |
260 /** | |
261 * Returns whether or not the account is connected. | |
262 * | |
263 * @param account The account. | |
264 * | |
265 * @return @c TRUE if connected, or @c FALSE otherwise. | |
266 */ | |
267 gboolean gaim_account_is_connected(const GaimAccount *account); | |
268 | |
269 /** | |
270 * Returns the account's username. | |
271 * | |
272 * @param account The account. | |
273 * | |
274 * @return The username. | |
275 */ | |
276 const char *gaim_account_get_username(const GaimAccount *account); | |
277 | |
278 /** | |
279 * Returns the account's password. | |
280 * | |
281 * @param account The account. | |
282 * | |
283 * @return The password. | |
284 */ | |
285 const char *gaim_account_get_password(const GaimAccount *account); | |
286 | |
287 /** | |
288 * Returns the account's alias. | |
289 * | |
290 * @param account The account. | |
291 * | |
292 * @return The alias. | |
293 */ | |
294 const char *gaim_account_get_alias(const GaimAccount *account); | |
295 | |
296 /** | |
297 * Returns the account's user information. | |
298 * | |
299 * @param account The account. | |
300 * | |
301 * @return The user information. | |
302 */ | |
303 const char *gaim_account_get_user_info(const GaimAccount *account); | |
304 | |
305 /** | |
306 * Returns the account's buddy icon filename. | |
307 * | |
308 * @param account The account. | |
309 * | |
310 * @return The buddy icon filename. | |
311 */ | |
312 const char *gaim_account_get_buddy_icon(const GaimAccount *account); | |
313 | |
314 /** | |
315 * Returns the account's protocol. | |
316 * | |
317 * @param account The account. | |
318 * | |
319 * @return The protocol. | |
320 */ | |
321 GaimProtocol gaim_account_get_protocol(const GaimAccount *account); | |
322 | |
323 /** | |
324 * Returns the account's connection. | |
325 * | |
326 * @param account The account. | |
327 * | |
328 * @return The connection. | |
329 */ | |
330 GaimConnection *gaim_account_get_connection(const GaimAccount *account); | |
331 | |
332 /** | |
333 * Returns whether or not this account should save its password. | |
334 * | |
335 * @param account The account. | |
336 * | |
337 * @return @c TRUE if it should remember the password. | |
338 */ | |
339 gboolean gaim_account_get_remember_password(const GaimAccount *account); | |
340 | |
341 /** | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
342 * Returns whether or not this account should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
343 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
344 * @param account The account. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
345 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
346 * @return @c TRUE if it should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
347 */ |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
348 gboolean gaim_account_get_check_mail(const GaimAccount *account); |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
349 |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
350 /** |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
351 * Returns whether or not this account should auto-login for the |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
352 * specified UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
353 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
354 * @param account The account. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
355 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
356 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
357 * @return @c TRUE if it should auto-login on this UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
358 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
359 gboolean gaim_account_get_auto_login(const GaimAccount *account, |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
360 const char *ui); |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
361 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
362 /** |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
363 * Returns the account's proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
364 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
365 * @param account The account. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
366 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
367 * @return The proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
368 */ |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
369 GaimProxyInfo *gaim_account_get_proxy_info(const GaimAccount *account); |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
370 |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
371 /** |
5563 | 372 * Returns a protocol-specific integer setting for an account. |
373 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
374 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
375 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
376 * @param default_value The default value. |
5563 | 377 * |
378 * @return The value. | |
379 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
380 int gaim_account_get_int(const GaimAccount *account, const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
381 int default_value); |
5563 | 382 |
383 /** | |
384 * Returns a protocol-specific string setting for an account. | |
385 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
386 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
387 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
388 * @param default_value The default value. |
5563 | 389 * |
390 * @return The value. | |
391 */ | |
392 const char *gaim_account_get_string(const GaimAccount *account, | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
393 const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
394 const char *default_value); |
5563 | 395 |
396 /** | |
397 * Returns a protocol-specific boolean setting for an account. | |
398 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
399 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
400 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
401 * @param default_value The default value. |
5563 | 402 * |
403 * @return The value. | |
404 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
405 gboolean gaim_account_get_bool(const GaimAccount *account, const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
406 gboolean default_value); |
5563 | 407 |
408 /** | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
409 * Returns a UI-specific integer setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
410 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
411 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
412 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
413 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
414 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
415 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
416 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
417 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
418 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
|
419 const char *name, int default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
420 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
421 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
422 * Returns a UI-specific string setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
423 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
424 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
425 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
426 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
427 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
428 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
429 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
430 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
431 const char *gaim_account_get_ui_string(const GaimAccount *account, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
432 const char *ui, const char *name, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
433 const char *default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
434 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
435 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
436 * Returns a UI-specific boolean setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
437 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
438 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
439 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
440 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
441 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
442 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
443 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
444 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
445 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
|
446 const char *name, gboolean default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
447 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
448 /** |
5573
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
449 * Loads the accounts. |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
450 */ |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
451 gboolean gaim_accounts_load(); |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
452 |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
453 /** |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
454 * Force an immediate write of accounts. |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
455 */ |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
456 void gaim_accounts_sync(); |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
457 |
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
458 /** |
5710
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
459 * Adds an account to the list of accounts. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
460 * |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
461 * @param account The account. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
462 */ |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
463 void gaim_accounts_add(GaimAccount *account); |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
464 |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
465 /** |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
466 * Removes an account from the list of accounts. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
467 * |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
468 * @param account The account. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
469 */ |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
470 void gaim_accounts_remove(GaimAccount *account); |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
471 |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
472 /** |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
473 * 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
|
474 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
475 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
476 */ |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
477 void gaim_accounts_auto_login(const char *ui); |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
478 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
479 /** |
5580
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
480 * Reorders an account. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
481 * |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
482 * @param account The account to reorder. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
483 * @param new_index The new index for the account. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
484 */ |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
485 void gaim_accounts_reorder(GaimAccount *account, size_t new_index); |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
486 |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
487 /** |
5563 | 488 * Returns a list of all accounts. |
489 * | |
490 * @return A list of all accounts. | |
491 */ | |
492 GList *gaim_accounts_get_all(void); | |
493 | |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
494 /** |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
495 * Finds an account with the specified name and protocol. |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
496 * |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
497 * @param name The account username. |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
498 * @param protocol The account protocol. |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
499 * |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
500 * @return The account, if found, or @c FALSE otherwise. |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
501 */ |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
502 GaimAccount *gaim_accounts_find(const char *name, GaimProtocol protocol); |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
503 |
5563 | 504 #endif /* _GAIM_ACCOUNTS_H_ */ |