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