Mercurial > pidgin
annotate src/account.h @ 5799:cbff8a7bbde8
[gaim-migrate @ 6224]
updated japanese translation from Junichi Uekawa
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Sat, 07 Jun 2003 15:52:38 +0000 |
| parents | 758fa27534b3 |
| children | 059d95c67cda |
| 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 /** |
|
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
165 * 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
|
166 * UI. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
167 * |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
168 * @param account The account. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
169 * @param ui The UI. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
170 * @param value @c TRUE if it should check for mail. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
171 */ |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
172 void gaim_account_set_auto_login(GaimAccount *account, const char *ui, |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
173 gboolean value); |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
174 |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
175 /** |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
176 * Sets the account's proxy information. |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
177 * |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
178 * @param account The account. |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
179 * @param info The proxy information. |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
180 */ |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
181 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info); |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
182 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
183 /** |
|
5694
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
184 * Clears all protocol-specific settings on an account. |
|
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
185 * |
|
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
186 * @param account The account. |
|
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
187 */ |
|
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
188 void gaim_account_clear_settings(GaimAccount *account); |
|
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
189 |
|
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
190 /** |
| 5563 | 191 * Sets a protocol-specific integer setting for an account. |
| 192 * | |
| 193 * @param account The account. | |
| 194 * @param name The name of the setting. | |
| 195 * @param value The setting's value. | |
| 196 */ | |
| 197 void gaim_account_set_int(GaimAccount *account, const char *name, int value); | |
| 198 | |
| 199 /** | |
| 200 * Sets a protocol-specific string setting for an account. | |
| 201 * | |
| 202 * @param account The account. | |
| 203 * @param name The name of the setting. | |
| 204 * @param value The setting's value. | |
| 205 */ | |
| 206 void gaim_account_set_string(GaimAccount *account, const char *name, | |
| 207 const char *string); | |
| 208 | |
| 209 /** | |
| 210 * Sets a protocol-specific boolean setting for an account. | |
| 211 * | |
| 212 * @param account The account. | |
| 213 * @param name The name of the setting. | |
| 214 * @param value The setting's value. | |
| 215 */ | |
| 216 void gaim_account_set_bool(GaimAccount *account, const char *name, | |
| 217 gboolean value); | |
| 218 | |
|
5777
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 integer 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_int(GaimAccount *account, const char *ui, |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
228 const char *name, int value); |
|
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 string 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_string(GaimAccount *account, const char *ui, |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
239 const char *name, const char *string); |
|
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 /** |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
242 * Sets a UI-specific boolean setting for an account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
243 * |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
244 * @param account The account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
245 * @param ui The UI name. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
246 * @param name The name of the setting. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
247 * @param value The setting's value. |
|
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 void gaim_account_set_ui_bool(GaimAccount *account, const char *ui, |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
250 const char *name, gboolean value); |
| 5563 | 251 |
| 252 /** | |
| 253 * Returns whether or not the account is connected. | |
| 254 * | |
| 255 * @param account The account. | |
| 256 * | |
| 257 * @return @c TRUE if connected, or @c FALSE otherwise. | |
| 258 */ | |
| 259 gboolean gaim_account_is_connected(const GaimAccount *account); | |
| 260 | |
| 261 /** | |
| 262 * Returns the account's username. | |
| 263 * | |
| 264 * @param account The account. | |
| 265 * | |
| 266 * @return The username. | |
| 267 */ | |
| 268 const char *gaim_account_get_username(const GaimAccount *account); | |
| 269 | |
| 270 /** | |
| 271 * Returns the account's password. | |
| 272 * | |
| 273 * @param account The account. | |
| 274 * | |
| 275 * @return The password. | |
| 276 */ | |
| 277 const char *gaim_account_get_password(const GaimAccount *account); | |
| 278 | |
| 279 /** | |
| 280 * Returns the account's alias. | |
| 281 * | |
| 282 * @param account The account. | |
| 283 * | |
| 284 * @return The alias. | |
| 285 */ | |
| 286 const char *gaim_account_get_alias(const GaimAccount *account); | |
| 287 | |
| 288 /** | |
| 289 * Returns the account's user information. | |
| 290 * | |
| 291 * @param account The account. | |
| 292 * | |
| 293 * @return The user information. | |
| 294 */ | |
| 295 const char *gaim_account_get_user_info(const GaimAccount *account); | |
| 296 | |
| 297 /** | |
| 298 * Returns the account's buddy icon filename. | |
| 299 * | |
| 300 * @param account The account. | |
| 301 * | |
| 302 * @return The buddy icon filename. | |
| 303 */ | |
| 304 const char *gaim_account_get_buddy_icon(const GaimAccount *account); | |
| 305 | |
| 306 /** | |
| 307 * Returns the account's protocol. | |
| 308 * | |
| 309 * @param account The account. | |
| 310 * | |
| 311 * @return The protocol. | |
| 312 */ | |
| 313 GaimProtocol gaim_account_get_protocol(const GaimAccount *account); | |
| 314 | |
| 315 /** | |
| 316 * Returns the account's connection. | |
| 317 * | |
| 318 * @param account The account. | |
| 319 * | |
| 320 * @return The connection. | |
| 321 */ | |
| 322 GaimConnection *gaim_account_get_connection(const GaimAccount *account); | |
| 323 | |
| 324 /** | |
| 325 * Returns whether or not this account should save its password. | |
| 326 * | |
| 327 * @param account The account. | |
| 328 * | |
| 329 * @return @c TRUE if it should remember the password. | |
| 330 */ | |
| 331 gboolean gaim_account_get_remember_password(const GaimAccount *account); | |
| 332 | |
| 333 /** | |
|
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
334 * Returns whether or not this account should check for mail. |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
335 * |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
336 * @param account The account. |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
337 * |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
338 * @return @c TRUE if it should check for mail. |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
339 */ |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
340 gboolean gaim_account_get_check_mail(const GaimAccount *account); |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
341 |
|
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
342 /** |
|
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
343 * Returns whether or not this account should auto-login for the |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
344 * specified UI. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
345 * |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
346 * @param account The account. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
347 * @param ui The UI. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
348 * |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
349 * @return @c TRUE if it should auto-login on this UI. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
350 */ |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
351 gboolean gaim_account_get_auto_login(const GaimAccount *account, |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
352 const char *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 /** |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
355 * Returns the account's proxy information. |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
356 * |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
357 * @param account The account. |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
358 * |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
359 * @return The proxy information. |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
360 */ |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
361 GaimProxyInfo *gaim_account_get_proxy_info(const GaimAccount *account); |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
362 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
363 /** |
| 5563 | 364 * Returns a protocol-specific integer setting for an account. |
| 365 * | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
366 * @param account The account. |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
367 * @param name The name of the setting. |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
368 * @param default_value The default value. |
| 5563 | 369 * |
| 370 * @return The value. | |
| 371 */ | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
372 int gaim_account_get_int(const GaimAccount *account, const char *name, |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
373 int default_value); |
| 5563 | 374 |
| 375 /** | |
| 376 * Returns a protocol-specific string setting for an account. | |
| 377 * | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
378 * @param account The account. |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
379 * @param name The name of the setting. |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
380 * @param default_value The default value. |
| 5563 | 381 * |
| 382 * @return The value. | |
| 383 */ | |
| 384 const char *gaim_account_get_string(const GaimAccount *account, | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
385 const char *name, |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
386 const char *default_value); |
| 5563 | 387 |
| 388 /** | |
| 389 * Returns a protocol-specific boolean setting for an account. | |
| 390 * | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
391 * @param account The account. |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
392 * @param name The name of the setting. |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
393 * @param default_value The default value. |
| 5563 | 394 * |
| 395 * @return The value. | |
| 396 */ | |
|
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
397 gboolean gaim_account_get_bool(const GaimAccount *account, const char *name, |
|
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
398 gboolean default_value); |
| 5563 | 399 |
| 400 /** | |
|
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
401 * Returns a UI-specific integer setting for an account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
402 * |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
403 * @param account The account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
404 * @param ui The UI name. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
405 * @param name The name of the setting. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
406 * @param default_value The default value. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
407 * |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
408 * @return The value. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
409 */ |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
410 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
|
411 const char *name, int default_value); |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
412 |
|
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 * Returns a UI-specific string setting for an account. |
|
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 * @param account The account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
417 * @param ui The UI name. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
418 * @param name The name of the setting. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
419 * @param default_value The 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 * @return The value. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
422 */ |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
423 const char *gaim_account_get_ui_string(const GaimAccount *account, |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
424 const char *ui, const char *name, |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
425 const char *default_value); |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
426 |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
427 /** |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
428 * Returns a UI-specific boolean setting for an account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
429 * |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
430 * @param account The account. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
431 * @param ui The UI name. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
432 * @param name The name of the setting. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
433 * @param default_value The 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 * @return The value. |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
436 */ |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
437 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
|
438 const char *name, gboolean default_value); |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
439 |
|
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
440 /** |
|
5573
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
441 * Loads the accounts. |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
442 */ |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
443 gboolean gaim_accounts_load(); |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
444 |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
445 /** |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
446 * Force an immediate write of accounts. |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
447 */ |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
448 void gaim_accounts_sync(); |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
449 |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5565
diff
changeset
|
450 /** |
|
5710
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
451 * Adds an account to the list of accounts. |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
452 * |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
453 * @param account The account. |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
454 */ |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
455 void gaim_accounts_add(GaimAccount *account); |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
456 |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
457 /** |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
458 * Removes an account from the list of accounts. |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
459 * |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
460 * @param account The account. |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
461 */ |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
462 void gaim_accounts_remove(GaimAccount *account); |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
463 |
|
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
464 /** |
|
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
465 * 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
|
466 * |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
467 * @param ui The UI. |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
468 */ |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
469 void gaim_accounts_auto_login(const char *ui); |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
470 |
|
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
471 /** |
|
5580
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
472 * Reorders an account. |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
473 * |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
474 * @param account The account to reorder. |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
475 * @param new_index The new index for the account. |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
476 */ |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
477 void gaim_accounts_reorder(GaimAccount *account, size_t new_index); |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
478 |
|
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
479 /** |
| 5563 | 480 * Returns a list of all accounts. |
| 481 * | |
| 482 * @return A list of all accounts. | |
| 483 */ | |
| 484 GList *gaim_accounts_get_all(void); | |
| 485 | |
| 486 #endif /* _GAIM_ACCOUNTS_H_ */ |
