diff -r c5cc8ebf62c0 -r c47c22006b0d libpurple/account.h --- 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.