Mercurial > pidgin
comparison libpurple/account.h @ 29847:2a436e0ce977
Add purple_account_[gs]et_public_alias functions, per discussion in d@cpi
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 29 Apr 2010 05:58:02 +0000 |
parents | 57a482217ee1 |
children | 38ba52f4bb96 28e27a37e4b4 |
comparison
equal
deleted
inserted
replaced
29846:75ea2a624b10 | 29847:2a436e0ce977 |
---|---|
37 | 37 |
38 typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account); | 38 typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account); |
39 typedef void (*PurpleAccountRequestAuthorizationCb)(void *); | 39 typedef void (*PurpleAccountRequestAuthorizationCb)(void *); |
40 typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); | 40 typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); |
41 typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); | 41 typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); |
42 typedef void (*PurpleSetPublicAliasSuccessCallback)(PurpleAccount *account, const char *new_alias); | |
43 typedef void (*PurpleSetPublicAliasFailureCallback)(PurpleAccount *account, const char *error); | |
44 typedef void (*PurpleGetPublicAliasSuccessCallback)(PurpleAccount *account, const char *alias); | |
45 typedef void (*PurpleGetPublicAliasFailureCallback)(PurpleAccount *account, const char *error); | |
42 | 46 |
43 #include "connection.h" | 47 #include "connection.h" |
44 #include "log.h" | 48 #include "log.h" |
45 #include "privacy.h" | 49 #include "privacy.h" |
46 #include "proxy.h" | 50 #include "proxy.h" |
460 */ | 464 */ |
461 void purple_account_set_status_list(PurpleAccount *account, | 465 void purple_account_set_status_list(PurpleAccount *account, |
462 const char *status_id, gboolean active, GList *attrs); | 466 const char *status_id, gboolean active, GList *attrs); |
463 | 467 |
464 /** | 468 /** |
469 * Set a server-side (public) alias for this account. The account | |
470 * must already be connected. | |
471 * | |
472 * Currently, the public alias is not stored locally, although this | |
473 * may change in a later version. | |
474 * | |
475 * @param account The account | |
476 * @param alias The new public alias for this account or NULL | |
477 * to unset the alias/nickname (or return it to | |
478 * a protocol-specific "default", like the username) | |
479 * @param success_cb A callback which will be called if the alias | |
480 * is successfully set on the server (or NULL). | |
481 * @param failure_cb A callback which will be called if the alias | |
482 * is not successfully set on the server (or NULL). | |
483 * | |
484 * @since 2.7.0 | |
485 */ | |
486 void purple_account_set_public_alias(PurpleAccount *account, | |
487 const char *alias, PurpleSetPublicAliasSuccessCallback success_cb, | |
488 PurpleSetPublicAliasFailureCallback failure_cb); | |
489 | |
490 /** | |
491 * Fetch the server-side (public) alias for this account. The account | |
492 * must already be connected. | |
493 * | |
494 * @param account The account | |
495 * @param success_cb A callback which will be called with the alias | |
496 * @param failure_cb A callback which will be called if the prpl is | |
497 * unable to retrieve the server-side alias. | |
498 * @since 2.7.0 | |
499 */ | |
500 void purple_account_get_public_alias(PurpleAccount *account, | |
501 PurpleGetPublicAliasSuccessCallback success_cb, | |
502 PurpleGetPublicAliasFailureCallback failure_cb); | |
503 | |
504 /** | |
465 * Clears all protocol-specific settings on an account. | 505 * Clears all protocol-specific settings on an account. |
466 * | 506 * |
467 * @param account The account. | 507 * @param account The account. |
468 */ | 508 */ |
469 void purple_account_clear_settings(PurpleAccount *account); | 509 void purple_account_clear_settings(PurpleAccount *account); |