Mercurial > pidgin
diff libpurple/account.h @ 18924:3afcfbed2ced
propagate from branch 'im.pidgin.pidgin' (head 5775dc23bad7ecf62c8f951574460d2f075f9e72)
to branch 'im.pidgin.soc.2007.xmpp' (head c9129cb5ffdd67387b55d418b79fd8c2b6665f55)
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Wed, 08 Aug 2007 21:05:47 +0000 |
parents | 8007c107054b 2a9d60d7af82 |
children | c9de28101e6d |
line wrap: on
line diff
--- a/libpurple/account.h Wed Aug 08 01:35:56 2007 +0000 +++ b/libpurple/account.h Wed Aug 08 21:05:47 2007 +0000 @@ -36,6 +36,8 @@ typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account); typedef void (*PurpleAccountRequestAuthorizationCb)(void *); +typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); +typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); #include "connection.h" #include "log.h" @@ -136,6 +138,8 @@ PurpleLog *system_log; /**< The system log */ void *ui_data; /**< The UI can put data here. */ + PurpleAccountRegistrationCb registration_cb; + void *registration_cb_user_data; }; #ifdef __cplusplus @@ -172,6 +176,15 @@ void purple_account_connect(PurpleAccount *account); /** + * Sets the callback for successful registration. + * + * @param account The account for which this callback should be used + * @param cb The callback + * @param user_data The user data passed to the callback + */ +void purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data); + +/** * Registers an account. * * @param account The account to register. @@ -179,6 +192,15 @@ void purple_account_register(PurpleAccount *account); /** + * Unregisters an account (deleting it from the server). + * + * @param account The account to unregister. + * @param cb Optional callback to be called when unregistration is complete + * @param user_data user data to pass to the callback + */ +void purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data); + +/** * Disconnects from an account. * * @param account The account to disconnect from.