Mercurial > pidgin.yaz
comparison libpurple/prpl.h @ 30262: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 | 905e291986bc |
children | ba0571f18075 |
comparison
equal
deleted
inserted
replaced
30261:75ea2a624b10 | 30262:2a436e0ce977 |
---|---|
578 const char *who); | 578 const char *who); |
579 | 579 |
580 /** | 580 /** |
581 * Returns an array of "PurpleMood"s, with the last one having | 581 * Returns an array of "PurpleMood"s, with the last one having |
582 * "mood" set to @c NULL. | 582 * "mood" set to @c NULL. |
583 * @since 2.7.0 | |
583 */ | 584 */ |
584 PurpleMood *(*get_moods)(PurpleAccount *account); | 585 PurpleMood *(*get_moods)(PurpleAccount *account); |
586 | |
587 /** | |
588 * Set the user's "friendly name" (or alias or nickname or | |
589 * whatever term you want to call it) on the server. The | |
590 * protocol plugin should call success_cb or failure_cb | |
591 * *asynchronously* (if it knows immediately that the set will fail, | |
592 * call one of the callbacks from an idle/0-second timeout) depending | |
593 * on if the nickname is set successfully. | |
594 * | |
595 * @param gc The connection for which to set an alias | |
596 * @param alias The new server-side alias/nickname for this account, | |
597 * or NULL to unset the alias/nickname (or return it to | |
598 * a protocol-specific "default"). | |
599 * @param success_cb Callback to be called if the public alias is set | |
600 * @param failure_cb Callback to be called if setting the public alias | |
601 * fails | |
602 * @see purple_account_set_public_alias | |
603 * @since 2.7.0 | |
604 */ | |
605 void (*set_public_alias)(PurpleConnection *gc, const char *alias, | |
606 PurpleSetPublicAliasSuccessCallback success_cb, | |
607 PurpleSetPublicAliasFailureCallback failure_cb); | |
608 /** | |
609 * Retrieve the user's "friendly name" as set on the server. | |
610 * The protocol plugin should call success_cb or failure_cb | |
611 * *asynchronously* (even if it knows immediately that the set will fail, | |
612 * call one of the callbacks from an idle/0-second timeout) depending | |
613 * on if the nickname is retrieved. | |
614 * | |
615 * @param gc The connection for which to retireve the alias | |
616 * @param success_cb Callback to be called with the retrieved alias | |
617 * @param failure_cb Callback to be called if the prpl is unable to | |
618 * retrieve the alias | |
619 * @see purple_account_get_public_alias | |
620 * @since 2.7.0 | |
621 */ | |
622 void (*get_public_alias)(PurpleConnection *gc, | |
623 PurpleSetPublicAliasSuccessCallback success_cb, | |
624 PurpleSetPublicAliasFailureCallback failure_cb); | |
585 }; | 625 }; |
586 | 626 |
587 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ | 627 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ |
588 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ | 628 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ |
589 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ | 629 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ |