Mercurial > pidgin
diff libpurple/protocols/silc/buddy.c @ 32672:3828a61c44da
A boring and large patch so I can merge heads.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 23 Dec 2011 08:21:58 +0000 |
parents | 99ca503ea087 |
children |
line wrap: on
line diff
--- a/libpurple/protocols/silc/buddy.c Mon Aug 22 22:46:08 2011 +0000 +++ b/libpurple/protocols/silc/buddy.c Fri Dec 23 08:21:58 2011 +0000 @@ -72,7 +72,7 @@ void *context) { PurpleConnection *gc = client->application; - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); if (!sg->conn) return; @@ -146,7 +146,7 @@ silcpurple_buddy_keyagr_do(PurpleConnection *gc, const char *name, gboolean force_local) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcDList clients; SilcClientEntry client_entry; SilcClientConnectionParams params; @@ -314,7 +314,7 @@ a->port = port; purple_request_action(client->application, _("Key Agreement Request"), tmp, - hostname ? tmp2 : NULL, 1, gc->account, client_entry->nickname, + hostname ? tmp2 : NULL, 1, purple_connection_get_account(gc), client_entry->nickname, NULL, a, 2, _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb), _("No"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb)); } @@ -346,7 +346,7 @@ b = (PurpleBuddy *) node; gc = purple_account_get_connection(purple_buddy_get_account(b)); - sg = gc->proto_data; + sg = purple_connection_get_protocol_data(gc); /* Find client entry */ clients = silc_client_get_clients_local(sg->client, sg->conn, @@ -426,7 +426,7 @@ static void silcpurple_buddy_privkey(PurpleConnection *gc, const char *name) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcPurplePrivkey p; SilcDList clients; SilcClientEntry client_entry; @@ -457,7 +457,7 @@ _("Set IM Password"), NULL, FALSE, TRUE, NULL, _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb), _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb), - gc->account, NULL, NULL, p); + purple_connection_get_account(gc), NULL, NULL, p); silc_client_list_free(sg->client, sg->conn, clients); } @@ -554,7 +554,7 @@ static void silcpurple_buddy_getkey(PurpleConnection *gc, const char *name) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClient client = sg->client; SilcClientConnection conn = sg->conn; SilcClientEntry client_entry; @@ -618,7 +618,7 @@ b = (PurpleBuddy *) node; gc = purple_account_get_connection(purple_buddy_get_account(b)); - sg = gc->proto_data; + sg = purple_connection_get_protocol_data(gc); pkfile = purple_blist_node_get_string(node, "public-key"); if (!silc_pkcs_load_public_key(pkfile, &public_key)) { @@ -669,7 +669,7 @@ void silcpurple_get_info(PurpleConnection *gc, const char *who) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClient client = sg->client; SilcClientConnection conn = sg->conn; SilcClientEntry client_entry; @@ -686,7 +686,7 @@ if (strlen(who) > 2 && who[0] == '*' && who[1] == '@') nick = who + 2; - b = purple_find_buddy(gc->account, nick); + b = purple_find_buddy(purple_connection_get_account(gc), nick); if (b) { /* See if we have this buddy's public key. If we do use that to search the details. */ @@ -1338,7 +1338,7 @@ static void silcpurple_add_buddy_i(PurpleConnection *gc, PurpleBuddy *b, gboolean init) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClient client = sg->client; SilcClientConnection conn = sg->conn; SilcPurpleBuddyRes r; @@ -1396,7 +1396,7 @@ silc_buffer_free(attrs); } -void silcpurple_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) +void silcpurple_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group, const char *message) { /* Don't add if the buddy is already on the list. * @@ -1437,7 +1437,7 @@ const char *server; int port; - sg = gc->proto_data; + sg = purple_connection_get_protocol_data(gc); if (sg == NULL) return; @@ -1467,7 +1467,7 @@ { PurpleAccount *account = purple_buddy_get_account(b); PurpleConnection *gc = purple_account_get_connection(account); - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClient client = sg->client; SilcClientConnection conn = sg->conn; SilcClientID *client_id = purple_buddy_get_protocol_data(b); @@ -1533,7 +1533,7 @@ { PurpleAccount *account = purple_buddy_get_account(b); PurpleConnection *gc = purple_account_get_connection(account); - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClient client = sg->client; SilcClientConnection conn = sg->conn; SilcClientID *client_id = purple_buddy_get_protocol_data(b); @@ -1629,7 +1629,7 @@ b = (PurpleBuddy *) node; gc = purple_account_get_connection(purple_buddy_get_account(b)); - sg = gc->proto_data; + sg = purple_connection_get_protocol_data(gc); /* Call KILL */ silc_client_command_call(sg->client, sg->conn, NULL, "KILL", @@ -1653,7 +1653,7 @@ { PurpleAccount *account = purple_buddy_get_account(buddy); PurpleConnection *gc = purple_account_get_connection(account); - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClientConnection conn = sg->conn; const char *pkfile = NULL; SilcClientEntry client_entry = NULL; @@ -1719,7 +1719,7 @@ void silcpurple_buddy_set_icon(PurpleConnection *gc, PurpleStoredImage *img) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = purple_connection_get_protocol_data(gc); SilcClient client = sg->client; SilcClientConnection conn = sg->conn; SilcMime mime;