comparison src/account.h @ 9944:e4a27c9aec4c

[gaim-migrate @ 10838] with much rejoicing, and massive thanks to the efforts of Christian, and all who have helped him, I present to you the incomplete status rewrite! committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 03 Sep 2004 21:35:52 +0000
parents 78022bad9367
children 3726addc1c97
comparison
equal deleted inserted replaced
9943:f8e395a054e2 9944:e4a27c9aec4c
42 struct _GaimAccountUiOps 42 struct _GaimAccountUiOps
43 { 43 {
44 void (*notify_added)(GaimAccount *account, const char *remote_user, 44 void (*notify_added)(GaimAccount *account, const char *remote_user,
45 const char *id, const char *alias, 45 const char *id, const char *alias,
46 const char *message); 46 const char *message);
47 void (*status_changed)(GaimAccount *account, GaimStatus *status);
47 }; 48 };
48 49
49 struct _GaimAccount 50 struct _GaimAccount
50 { 51 {
51 char *username; /**< The username. */ 52 char *username; /**< The username. */
69 /* proxy settings from global prefs. */ 70 /* proxy settings from global prefs. */
70 71
71 GSList *permit; /**< Permit list. */ 72 GSList *permit; /**< Permit list. */
72 GSList *deny; /**< Deny list. */ 73 GSList *deny; /**< Deny list. */
73 int perm_deny; /**< The permit/deny setting. */ 74 int perm_deny; /**< The permit/deny setting. */
75
76 GList *status_types; /**< Status types. */
77
78 GaimPresence *presence; /**< Presence. */
74 GaimLog *system_log; /**< The system log */ 79 GaimLog *system_log; /**< The system log */
75 80
76 void *ui_data; /**< The UI can put data here. */ 81 void *ui_data; /**< The UI can put data here. */
77 }; 82 };
78 83
250 * @param info The proxy information. 255 * @param info The proxy information.
251 */ 256 */
252 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info); 257 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info);
253 258
254 /** 259 /**
260 * Sets the account's status types.
261 *
262 * @param account The account.
263 * @param status_types The list of status types.
264 */
265 void gaim_account_set_status_types(GaimAccount *account, GList *status_types);
266
267 /**
268 * Sets the account's presence.
269 *
270 * @param account The account.
271 * @param presence The presence.
272 */
273 void gaim_account_set_presence(GaimAccount *account, GaimPresence *presence);
274
275 /**
276 * Activates or deactivates a status.
277 *
278 * Only independent statuses can be deactivated with this. To deactivate
279 * an exclusive status, activate a separate status.
280 *
281 * @param account The account.
282 * @param status_id The ID of the status.
283 * @param active The active state.
284 * @param ... Optional NULL-terminated attributes passed for the
285 * new status, in an id, value pair.
286 */
287 void gaim_account_set_status(GaimAccount *account, const char *status_id,
288 gboolean active, ...);
289
290 /**
255 * Clears all protocol-specific settings on an account. 291 * Clears all protocol-specific settings on an account.
256 * 292 *
257 * @param account The account. 293 * @param account The account.
258 */ 294 */
259 void gaim_account_clear_settings(GaimAccount *account); 295 void gaim_account_clear_settings(GaimAccount *account);
437 * @param account The account. 473 * @param account The account.
438 * 474 *
439 * @return The proxy information. 475 * @return The proxy information.
440 */ 476 */
441 GaimProxyInfo *gaim_account_get_proxy_info(const GaimAccount *account); 477 GaimProxyInfo *gaim_account_get_proxy_info(const GaimAccount *account);
478
479 /**
480 * Returns the account status with the specified ID.
481 *
482 * Note that this works differently than gaim_buddy_get_status() in that
483 * it will only return NULL if the status was not registered.
484 *
485 * @param account The account.
486 * @param status_id The status ID.
487 *
488 * @return The status, or NULL if it was never registered.
489 */
490 GaimStatus *gaim_account_get_status(const GaimAccount *account,
491 const char *status_id);
492
493 /**
494 * Returns the account status type with the specified ID.
495 *
496 * @param account The account.
497 * @param id The ID of the status type.
498 *
499 * @return The status type if found, or NULL.
500 */
501 GaimStatusType *gaim_account_get_status_type(const GaimAccount *account,
502 const char *id);
503
504 /**
505 * Returns the account's presence.
506 *
507 * @param account The account.
508 *
509 * @return The account's presence.
510 */
511 GaimPresence *gaim_account_get_presence(const GaimAccount *account);
512
513 /**
514 * Returns whether or not an account status is active.
515 *
516 * @param account The account.
517 * @param status_id The status ID.
518 *
519 * @return TRUE if active, or FALSE if not.
520 */
521 gboolean gaim_account_is_status_active(const GaimAccount *account,
522 const char *status_id);
523
524 /**
525 * Returns the account's status types.
526 *
527 * @param account The account.
528 *
529 * @return The account's status types.
530 */
531 const GList *gaim_account_get_status_types(const GaimAccount *account);
442 532
443 /** 533 /**
444 * Returns a protocol-specific integer setting for an account. 534 * Returns a protocol-specific integer setting for an account.
445 * 535 *
446 * @param account The account. 536 * @param account The account.