Mercurial > pidgin.yaz
diff libpurple/account.c @ 19277:f821d4bffb0a
propagate from branch 'im.pidgin.pidgin' (head 37793415aab363acafa9ca7ce5a76c974dbc6c4c)
to branch 'im.pidgin.soc.2007.xmpp' (head c9129cb5ffdd67387b55d418b79fd8c2b6665f55)
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Tue, 14 Aug 2007 22:00:24 +0000 |
parents | 1ca6c4b234ab 2a9d60d7af82 |
children | 1d2002a5735e |
line wrap: on
line diff
--- a/libpurple/account.c Tue Aug 14 21:33:53 2007 +0000 +++ b/libpurple/account.c Tue Aug 14 22:00:24 2007 +0000 @@ -913,6 +913,15 @@ } void +purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data) +{ + g_return_if_fail(account != NULL); + + account->registration_cb = cb; + account->registration_cb_user_data = user_data; +} + +void purple_account_register(PurpleAccount *account) { g_return_if_fail(account != NULL); @@ -923,6 +932,17 @@ purple_connection_new(account, TRUE, purple_account_get_password(account)); } +void +purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data) +{ + g_return_if_fail(account != NULL); + + purple_debug_info("account", "Unregistering account %s\n", + purple_account_get_username(account)); + + purple_connection_new_unregister(account, purple_account_get_password(account), cb, user_data); +} + static void request_password_ok_cb(PurpleAccount *account, PurpleRequestFields *fields) {