Mercurial > pidgin.yaz
changeset 19195:1ca6c4b234ab
Warning fixes in the aftermath of resiak's authorize_cb and deny_cb type fixing.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sun, 12 Aug 2007 00:52:17 +0000 |
parents | 510ed64b8c74 |
children | e1afc0e009d2 |
files | libpurple/account.c libpurple/account.h libpurple/protocols/jabber/presence.c libpurple/protocols/msn/userlist.c libpurple/protocols/oscar/oscar.c libpurple/protocols/yahoo/yahoo.c |
diffstat | 6 files changed, 29 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/account.c Sun Aug 12 00:00:54 2007 +0000 +++ b/libpurple/account.c Sun Aug 12 00:52:17 2007 +0000 @@ -1130,8 +1130,8 @@ void * purple_account_request_authorization(PurpleAccount *account, const char *remote_user, - const char *id, const char *alias, const char *message, gboolean on_list, - GCallback auth_cb, GCallback deny_cb, void *user_data) + const char *id, const char *alias, const char *message, gboolean on_list, + PurpleAccountRequestAuthorizationCb auth_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data) { PurpleAccountUiOps *ui_ops; PurpleAccountRequestInfo *info; @@ -1146,8 +1146,8 @@ info->type = PURPLE_ACCOUNT_REQUEST_AUTHORIZATION; info->account = account; info->ui_handle = ui_ops->request_authorize(account, remote_user, id, alias, message, - on_list, auth_cb, deny_cb, user_data); - + on_list, auth_cb, deny_cb, user_data); + handles = g_list_append(handles, info); return info->ui_handle; }
--- a/libpurple/account.h Sun Aug 12 00:00:54 2007 +0000 +++ b/libpurple/account.h Sun Aug 12 00:52:17 2007 +0000 @@ -242,7 +242,7 @@ */ void *purple_account_request_authorization(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message, gboolean on_list, - GCallback auth_cb, GCallback deny_cb, void *user_data); + PurpleAccountRequestAuthorizationCb auth_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data); /** * Close account requests registered for the given PurpleAccount
--- a/libpurple/protocols/jabber/presence.c Sun Aug 12 00:00:54 2007 +0000 +++ b/libpurple/protocols/jabber/presence.c Sun Aug 12 00:52:17 2007 +0000 @@ -193,16 +193,18 @@ char *who; }; -static void authorize_add_cb(struct _jabber_add_permit *jap) +static void authorize_add_cb(gpointer data) { + struct _jabber_add_permit *jap = data; jabber_presence_subscription_set(jap->gc->proto_data, jap->who, "subscribed"); g_free(jap->who); g_free(jap); } -static void deny_add_cb(struct _jabber_add_permit *jap) +static void deny_add_cb(gpointer data) { + struct _jabber_add_permit *jap = data; jabber_presence_subscription_set(jap->gc->proto_data, jap->who, "unsubscribed"); @@ -305,7 +307,7 @@ jap->js = js; purple_account_request_authorization(purple_connection_get_account(js->gc), from, NULL, NULL, NULL, onlist, - G_CALLBACK(authorize_add_cb), G_CALLBACK(deny_add_cb), jap); + authorize_add_cb, deny_add_cb, jap); jabber_id_free(jid); return; } else if(type && !strcmp(type, "subscribed")) {
--- a/libpurple/protocols/msn/userlist.c Sun Aug 12 00:00:54 2007 +0000 +++ b/libpurple/protocols/msn/userlist.c Sun Aug 12 00:52:17 2007 +0000 @@ -38,8 +38,9 @@ * Callbacks **************************************************************************/ static void -msn_accept_add_cb(MsnPermitAdd *pa) +msn_accept_add_cb(gpointer data) { + MsnPermitAdd *pa = data; MsnSession *session = pa->gc->proto_data; MsnUserList *userlist = session->userlist; @@ -51,8 +52,9 @@ } static void -msn_cancel_add_cb(MsnPermitAdd *pa) +msn_cancel_add_cb(gpointer data) { + MsnPermitAdd *pa = data; MsnSession *session = pa->gc->proto_data; MsnUserList *userlist = session->userlist; @@ -75,7 +77,7 @@ purple_account_request_authorization(purple_connection_get_account(gc), passport, NULL, friendly, NULL, purple_find_buddy(purple_connection_get_account(gc), passport) != NULL, - G_CALLBACK(msn_accept_add_cb), G_CALLBACK(msn_cancel_add_cb), pa); + msn_accept_add_cb, msn_cancel_add_cb, pa); } /**************************************************************************
--- a/libpurple/protocols/oscar/oscar.c Sun Aug 12 00:00:54 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun Aug 12 00:52:17 2007 +0000 @@ -2261,8 +2261,9 @@ /* When other people ask you for authorization */ static void -purple_auth_grant(struct name_data *data) +purple_auth_grant(gpointer cbdata) { + struct name_data *data = cbdata; PurpleConnection *gc = data->gc; OscarData *od = gc->proto_data; @@ -2282,8 +2283,9 @@ } static void -purple_auth_dontgrant_msgprompt(struct name_data *data) +purple_auth_dontgrant_msgprompt(gpointer cbdata) { + struct name_data *data = cbdata; purple_request_input(data->gc, NULL, _("Authorization Denied Message:"), NULL, _("No reason given."), TRUE, FALSE, NULL, _("_OK"), G_CALLBACK(purple_auth_dontgrant), @@ -2404,8 +2406,8 @@ purple_account_request_authorization(account, sn, NULL, NULL, reason, purple_find_buddy(account, sn) != NULL, - G_CALLBACK(purple_auth_grant), - G_CALLBACK(purple_auth_dontgrant_msgprompt), data); + purple_auth_grant, + purple_auth_dontgrant_msgprompt, data); g_free(reason); } } break; @@ -5170,8 +5172,8 @@ purple_account_request_authorization(account, sn, NULL, (buddy ? purple_buddy_get_alias_only(buddy) : NULL), - reason, buddy != NULL, G_CALLBACK(purple_auth_grant), - G_CALLBACK(purple_auth_dontgrant_msgprompt), data); + reason, buddy != NULL, purple_auth_grant, + purple_auth_dontgrant_msgprompt, data); g_free(reason); return 1;
--- a/libpurple/protocols/yahoo/yahoo.c Sun Aug 12 00:00:54 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Sun Aug 12 00:52:17 2007 +0000 @@ -953,7 +953,8 @@ }; static void -yahoo_buddy_add_authorize_cb(struct yahoo_add_request *add_req) { +yahoo_buddy_add_authorize_cb(gpointer data) { + struct yahoo_add_request *add_req = data; g_free(add_req->id); g_free(add_req->who); g_free(add_req->msg); @@ -997,7 +998,8 @@ } static void -yahoo_buddy_add_deny_reason_cb(struct yahoo_add_request *add_req) { +yahoo_buddy_add_deny_reason_cb(gpointer data) { + struct yahoo_add_request *add_req = data; purple_request_input(add_req->gc, NULL, _("Authorization denied message:"), NULL, _("No reason given."), TRUE, FALSE, NULL, _("OK"), G_CALLBACK(yahoo_buddy_add_deny_cb), @@ -1042,8 +1044,8 @@ */ purple_account_request_authorization(purple_connection_get_account(gc), add_req->who, add_req->id, NULL, add_req->msg, purple_find_buddy(purple_connection_get_account(gc),add_req->who) != NULL, - G_CALLBACK(yahoo_buddy_add_authorize_cb), - G_CALLBACK(yahoo_buddy_add_deny_reason_cb), + yahoo_buddy_add_authorize_cb, + yahoo_buddy_add_deny_reason_cb, add_req); } else { g_free(add_req->id);