Mercurial > pidgin.yaz
diff libpurple/account.h @ 17607:ca0b86f3dbd2
Implemented a callback for a successful registration, supplying the username and password to the application when available, in the way explained by Sean.
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Fri, 22 Jun 2007 00:05:35 +0000 |
parents | 759cd72bd2ff |
children | a8b1159fd95b |
line wrap: on
line diff
--- a/libpurple/account.h Wed Jun 20 10:18:52 2007 +0000 +++ b/libpurple/account.h Fri Jun 22 00:05:35 2007 +0000 @@ -36,6 +36,7 @@ typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account); typedef void (*PurpleAccountRequestAuthorizationCb)(void *); +typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, const char *username, const char *password, void *user_data); #include "connection.h" #include "log.h" @@ -106,6 +107,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 @@ -142,6 +145,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.