Mercurial > pidgin
diff libpurple/account.c @ 19695:1d2002a5735e
propagate from branch 'im.pidgin.pidgin' (head 996cf0c57149ba6e1c714ebb1f11d5d4bac8fb68)
to branch 'im.pidgin.soc.2007.xmpp' (head cdf63b6603891b8cd3e7f629ef5a9a927a153550)
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Wed, 05 Sep 2007 22:32:14 +0000 |
parents | e6364b0679b0 f821d4bffb0a |
children | 481749fc0b6b |
line wrap: on
line diff
--- a/libpurple/account.c Wed Sep 05 12:56:35 2007 +0000 +++ b/libpurple/account.c Wed Sep 05 22:32:14 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) {