pidgin: b8202627: On the way to hiding the PurpleConnectio...
andrew.victor at mxit.com
andrew.victor at mxit.com
Tue Oct 18 17:57:03 EDT 2011
----------------------------------------------------------------------
Revision: b8202627a0a57b35822ed4f574e6a52ca06fab7e
Parent: 9c1bfeea12710f09274edbe499da40a1e1e25026
Author: andrew.victor at mxit.com
Date: 10/18/11 14:47:48
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b8202627a0a57b35822ed4f574e6a52ca06fab7e
Changelog:
On the way to hiding the PurpleConnection struct.
* Added purple_connection_get_flags() and purple_connection_set_flags()
* Use purple_connection_ accessor functions.
Changes against parent 9c1bfeea12710f09274edbe499da40a1e1e25026
patched ChangeLog.API
patched finch/gntconv.c
patched libpurple/account.c
patched libpurple/connection.c
patched libpurple/connection.h
patched libpurple/conversation.c
patched libpurple/protocols/bonjour/bonjour.c
patched libpurple/protocols/bonjour/bonjour_ft.c
patched libpurple/protocols/gg/gg.c
patched libpurple/protocols/irc/irc.c
patched libpurple/protocols/irc/msgs.c
patched libpurple/protocols/jabber/buddy.c
patched libpurple/protocols/jabber/disco.c
patched libpurple/protocols/jabber/google/gmail.c
patched libpurple/protocols/jabber/google/google_presence.c
patched libpurple/protocols/jabber/jabber.c
patched libpurple/protocols/jabber/oob.c
patched libpurple/protocols/jabber/presence.c
patched libpurple/protocols/jabber/roster.c
patched libpurple/protocols/jabber/si.c
patched libpurple/protocols/jabber/usermood.c
patched libpurple/protocols/jabber/usertune.c
patched libpurple/protocols/msn/msg.c
patched libpurple/protocols/msn/msn.c
patched libpurple/protocols/msn/notification.c
patched libpurple/protocols/mxit/login.c
patched libpurple/protocols/myspace/myspace.c
patched libpurple/protocols/myspace/zap.c
patched libpurple/protocols/novell/novell.c
patched libpurple/protocols/null/nullprpl.c
patched libpurple/protocols/oscar/oscar.c
patched libpurple/protocols/sametime/sametime.c
patched libpurple/protocols/silc/buddy.c
patched libpurple/protocols/silc/silc.c
patched libpurple/protocols/silc/util.c
patched libpurple/protocols/simple/simple.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/protocols/yahoo/yahoo_aliases.c
patched libpurple/protocols/yahoo/yahoo_doodle.c
patched libpurple/protocols/yahoo/yahoo_filexfer.c
patched libpurple/protocols/yahoo/yahoo_picture.c
patched libpurple/protocols/zephyr/zephyr.c
patched libpurple/prpl.c
patched libpurple/server.c
patched pidgin/gtkblist.c
patched pidgin/gtkconv.c
patched pidgin/gtkdocklet.c
patched pidgin/gtknotify.c
patched pidgin/gtkpounce.c
patched pidgin/gtkroomlist.c
patched pidgin/gtkutils.c
patched pidgin/plugins/xmppconsole.c
-------------- next part --------------
============================================================
--- libpurple/server.c 33b8e22d42988584b0fe44df95bd952fb58e4c78
+++ libpurple/server.c d2b7e95a54a6e23bc975be73041c062543c35993
@@ -149,7 +149,7 @@ int serv_send_im(PurpleConnection *gc, c
* this only reset lar->sent if we're away AND idle?
*/
auto_reply_pref = purple_prefs_get_string("/purple/away/auto_reply");
- if((gc->flags & PURPLE_CONNECTION_AUTO_RESP) &&
+ if((purple_connection_get_flags(gc) & PURPLE_CONNECTION_AUTO_RESP) &&
!purple_presence_is_available(presence) &&
!purple_strequal(auto_reply_pref, "never")) {
@@ -570,7 +570,7 @@ void serv_got_im(PurpleConnection *gc, c
* We should update the conversation window buttons and menu,
* if it exists.
*/
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, gc->account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, who, purple_connection_get_account(gc));
/*
* Make copies of the message and the sender in case plugins want
@@ -581,7 +581,7 @@ void serv_got_im(PurpleConnection *gc, c
plugin_return = GPOINTER_TO_INT(
purple_signal_emit_return_1(purple_conversations_get_handle(),
- "receiving-im-msg", gc->account,
+ "receiving-im-msg", purple_connection_get_account(gc),
&angel, &buffy, conv, &flags));
if (!buffy || !angel || plugin_return) {
@@ -593,12 +593,12 @@ void serv_got_im(PurpleConnection *gc, c
name = angel;
message = buffy;
- purple_signal_emit(purple_conversations_get_handle(), "received-im-msg", gc->account,
+ purple_signal_emit(purple_conversations_get_handle(), "received-im-msg", purple_connection_get_account(gc),
name, message, conv, flags);
/* search for conversation again in case it was created by received-im-msg handler */
if (conv == NULL)
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, gc->account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, purple_connection_get_account(gc));
if (conv == NULL)
conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
@@ -615,7 +615,7 @@ void serv_got_im(PurpleConnection *gc, c
* - or we're not idle and the 'only auto respond if idle' pref
* is set
*/
- if (gc->flags & PURPLE_CONNECTION_AUTO_RESP)
+ if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_AUTO_RESP)
{
PurplePresence *presence;
PurpleStatus *status;
@@ -688,7 +688,7 @@ void serv_got_typing(PurpleConnection *g
PurpleConversation *conv;
PurpleConvIm *im = NULL;
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, gc->account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, purple_connection_get_account(gc));
if (conv != NULL) {
im = PURPLE_CONV_IM(conv);
@@ -698,15 +698,15 @@ void serv_got_typing(PurpleConnection *g
{
case PURPLE_TYPING:
purple_signal_emit(purple_conversations_get_handle(),
- "buddy-typing", gc->account, name);
+ "buddy-typing", purple_connection_get_account(gc), name);
break;
case PURPLE_TYPED:
purple_signal_emit(purple_conversations_get_handle(),
- "buddy-typed", gc->account, name);
+ "buddy-typed", purple_connection_get_account(gc), name);
break;
case PURPLE_NOT_TYPING:
purple_signal_emit(purple_conversations_get_handle(),
- "buddy-typing-stopped", gc->account, name);
+ "buddy-typing-stopped", purple_connection_get_account(gc), name);
break;
}
}
@@ -720,7 +720,7 @@ void serv_got_typing_stopped(PurpleConne
PurpleConversation *conv;
PurpleConvIm *im;
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, gc->account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, purple_connection_get_account(gc));
if (conv != NULL)
{
im = PURPLE_CONV_IM(conv);
@@ -734,7 +734,7 @@ void serv_got_typing_stopped(PurpleConne
else
{
purple_signal_emit(purple_conversations_get_handle(),
- "buddy-typing-stopped", gc->account, name);
+ "buddy-typing-stopped", purple_connection_get_account(gc), name);
}
}
@@ -925,7 +925,7 @@ void serv_got_chat_in(PurpleConnection *
plugin_return = GPOINTER_TO_INT(
purple_signal_emit_return_1(purple_conversations_get_handle(),
- "receiving-chat-msg", g->account,
+ "receiving-chat-msg", purple_connection_get_account(g),
&angel, &buffy, conv, &flags));
if (!buffy || !angel || plugin_return) {
@@ -937,7 +937,7 @@ void serv_got_chat_in(PurpleConnection *
who = angel;
message = buffy;
- purple_signal_emit(purple_conversations_get_handle(), "received-chat-msg", g->account,
+ purple_signal_emit(purple_conversations_get_handle(), "received-chat-msg", purple_connection_get_account(g),
who, message, conv, flags);
purple_conv_chat_write(chat, who, message, flags, mtime);
============================================================
--- libpurple/conversation.c 420a11ae3faf2b04888d1fecbeb677fe06b96fab
+++ libpurple/conversation.c 6a8a3d9dc80515dc9fc10d6c3aa83a8033c28f6e
@@ -493,7 +493,7 @@ purple_conversation_new(PurpleConversati
conv->data = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, NULL);
/* copy features from the connection. */
- conv->features = gc->flags;
+ conv->features = purple_connection_get_flags(gc);
if (type == PURPLE_CONV_TYPE_IM)
{
@@ -1789,7 +1789,7 @@ purple_conv_chat_add_users(PurpleConvCha
}
} else {
PurpleBuddy *buddy;
- if ((buddy = purple_find_buddy(gc->account, user)) != NULL)
+ if ((buddy = purple_find_buddy(purple_connection_get_account(gc), user)) != NULL)
alias = purple_buddy_get_contact_alias(buddy);
}
}
@@ -1887,7 +1887,7 @@ purple_conv_chat_rename_user(PurpleConvC
}
} else if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) {
PurpleBuddy *buddy;
- if ((buddy = purple_find_buddy(gc->account, new_user)) != NULL)
+ if ((buddy = purple_find_buddy(purple_connection_get_account(gc), new_user)) != NULL)
new_alias = purple_buddy_get_contact_alias(buddy);
}
@@ -1936,9 +1936,9 @@ purple_conv_chat_rename_user(PurpleConvC
if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) {
PurpleBuddy *buddy;
- if ((buddy = purple_find_buddy(gc->account, old_user)) != NULL)
+ if ((buddy = purple_find_buddy(purple_connection_get_account(gc), old_user)) != NULL)
old_alias = purple_buddy_get_contact_alias(buddy);
- if ((buddy = purple_find_buddy(gc->account, new_user)) != NULL)
+ if ((buddy = purple_find_buddy(purple_connection_get_account(gc), new_user)) != NULL)
new_alias = purple_buddy_get_contact_alias(buddy);
}
@@ -2013,7 +2013,7 @@ purple_conv_chat_remove_users(PurpleConv
if (!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) {
PurpleBuddy *buddy;
- if ((buddy = purple_find_buddy(gc->account, user)) != NULL)
+ if ((buddy = purple_find_buddy(purple_connection_get_account(gc), user)) != NULL)
alias = purple_buddy_get_contact_alias(buddy);
}
============================================================
--- libpurple/prpl.c 1e96c85d1eec181d8de5a0154445b511c7990969
+++ libpurple/prpl.c 44f9efbeb20854cd6d5d250281f92af6c57c9fe6
@@ -446,13 +446,13 @@ purple_prpl_send_attention(PurpleConnect
g_return_if_fail(gc != NULL);
g_return_if_fail(who != NULL);
- prpl = purple_find_prpl(purple_account_get_protocol_id(gc->account));
+ prpl = purple_find_prpl(purple_account_get_protocol_id(purple_connection_get_account(gc)));
send_attention = PURPLE_PLUGIN_PROTOCOL_INFO(prpl)->send_attention;
g_return_if_fail(send_attention != NULL);
mtime = time(NULL);
- attn = purple_get_attention_type_from_code(gc->account, type_code);
+ attn = purple_get_attention_type_from_code(purple_connection_get_account(gc), type_code);
if ((buddy = purple_find_buddy(purple_connection_get_account(gc), who)) != NULL)
alias = purple_buddy_get_contact_alias(buddy);
@@ -473,7 +473,7 @@ purple_prpl_send_attention(PurpleConnect
if (!send_attention(gc, who, type_code))
return;
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, gc->account, who);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, purple_connection_get_account(gc), who);
purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, description, flags, mtime);
purple_prpl_attention(conv, who, type_code, PURPLE_MESSAGE_SEND, time(NULL));
@@ -492,7 +492,7 @@ got_attention(PurpleConnection *gc, int
mtime = time(NULL);
- attn = purple_get_attention_type_from_code(gc->account, type_code);
+ attn = purple_get_attention_type_from_code(purple_connection_get_account(gc), type_code);
/* PURPLE_MESSAGE_NOTIFY is for attention messages. */
flags = PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_RECV;
============================================================
--- libpurple/protocols/irc/irc.c 6afa1bb71a1a1e36e3659aa48047aedde17ea410
+++ libpurple/protocols/irc/irc.c 3545e4e803ceaa2bde96ccd9fbcefaaaba93be73
@@ -356,7 +356,7 @@ static void irc_login(PurpleAccount *acc
const char *username = purple_account_get_username(account);
gc = purple_account_get_connection(account);
- gc->flags |= PURPLE_CONNECTION_NO_NEWLINES;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_NO_NEWLINES);
if (strpbrk(username, " \t\v\r\n") != NULL) {
purple_connection_error (gc,
============================================================
--- libpurple/protocols/jabber/jabber.c 591890cc0c0297288cf79d6ba6be9225539cb150
+++ libpurple/protocols/jabber/jabber.c 0cad5485dad50fd34e38220736f305880dcb931a
@@ -852,7 +852,7 @@ static void tls_init(JabberStream *js)
{
purple_input_remove(js->gc->inpa);
js->gc->inpa = 0;
- js->gsc = purple_ssl_connect_with_host_fd(js->gc->account, js->fd,
+ js->gsc = purple_ssl_connect_with_host_fd(purple_connection_get_account(js->gc), js->fd,
jabber_login_callback_ssl, jabber_ssl_connect_failure, js->certificate_CN, js->gc);
/* The fd is no longer our concern */
js->fd = -1;
@@ -1086,8 +1086,7 @@ jabber_login(PurpleAccount *account)
JabberStream *js;
PurpleStoredImage *image;
- gc->flags |= PURPLE_CONNECTION_HTML |
- PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY);
js = jabber_stream_new(account);
if (js == NULL)
return;
@@ -1265,7 +1264,7 @@ jabber_register_cb(JabberRegisterCBData
cbdata->js->user->node = g_strdup(value);
}
if(cbdata->js->registration && !strcmp(id, "password"))
- purple_account_set_password(cbdata->js->gc->account, value);
+ purple_account_set_password(purple_connection_get_account(cbdata->js->gc), value);
}
}
}
@@ -1274,7 +1273,7 @@ jabber_register_cb(JabberRegisterCBData
username = g_strdup_printf("%s@%s%s%s", cbdata->js->user->node, cbdata->js->user->domain,
cbdata->js->user->resource ? "/" : "",
cbdata->js->user->resource ? cbdata->js->user->resource : "");
- purple_account_set_username(cbdata->js->gc->account, username);
+ purple_account_set_username(purple_connection_get_account(cbdata->js->gc), username);
g_free(username);
}
@@ -1423,7 +1422,7 @@ void jabber_register_parse(JabberStream
if((node = xmlnode_get_child(query, "name"))) {
if(js->registration)
field = purple_request_field_string_new("name", _("Name"),
- purple_account_get_alias(js->gc->account), FALSE);
+ purple_account_get_alias(purple_connection_get_account(js->gc)), FALSE);
else {
char *data = xmlnode_get_data(node);
field = purple_request_field_string_new("name", _("Name"), data, FALSE);
@@ -1557,8 +1556,8 @@ void jabber_unregister_account(PurpleAcc
PurpleConnection *gc = purple_account_get_connection(account);
JabberStream *js;
- if(gc->state != PURPLE_CONNECTED) {
- if(gc->state != PURPLE_CONNECTING)
+ if (purple_connection_get_state(gc) != PURPLE_CONNECTED) {
+ if (purple_connection_get_state(gc) != PURPLE_CONNECTING)
jabber_login(account);
js = purple_connection_get_protocol_data(gc);
js->unregistration = TRUE;
@@ -2487,7 +2486,7 @@ jabber_password_change_result_cb(JabberS
purple_notify_info(js->gc, _("Password Changed"), _("Password Changed"),
_("Your password has been changed."));
- purple_account_set_password(js->gc->account, (char *)data);
+ purple_account_set_password(purple_connection_get_account(js->gc), (char *)data);
} else {
char *msg = jabber_parse_error(js, packet, NULL);
@@ -2742,8 +2741,8 @@ char *jabber_parse_error(JabberStream *j
} else if(xmlnode_get_child(packet, "not-authorized")) {
SET_REASON(PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED);
/* Clear the pasword if it isn't being saved */
- if (!purple_account_get_remember_password(js->gc->account))
- purple_account_set_password(js->gc->account, NULL);
+ if (!purple_account_get_remember_password(purple_connection_get_account(js->gc)))
+ purple_account_set_password(purple_connection_get_account(js->gc), NULL);
text = _("Not Authorized");
} else if(xmlnode_get_child(packet, "temporary-auth-failure")) {
text = _("Temporary Authentication Failure");
============================================================
--- libpurple/protocols/msn/msn.c 0fc217c75b6336d9536eead7c6b329f6b7c0d319
+++ libpurple/protocols/msn/msn.c e54e15d2ba9a286511cc469133e98d2aa15a27ec
@@ -881,7 +881,7 @@ msn_new_xfer(PurpleConnection *gc, const
session = purple_connection_get_protocol_data(gc);
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who);
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND, who);
g_return_val_if_fail(xfer != NULL, NULL);
@@ -1354,8 +1354,9 @@ msn_login(PurpleAccount *account)
session = msn_session_new(account);
purple_connection_set_protocol_data(gc, session);
- gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_FORMATTING_WBFO | PURPLE_CONNECTION_NO_BGCOLOR |
- PURPLE_CONNECTION_NO_FONTSIZE | PURPLE_CONNECTION_NO_URLDESC | PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY;
+ purple_connection_set_flags(gc,
+ PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_FORMATTING_WBFO | PURPLE_CONNECTION_NO_BGCOLOR |
+ PURPLE_CONNECTION_NO_FONTSIZE | PURPLE_CONNECTION_NO_URLDESC | PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY);
msn_session_set_login_step(session, MSN_LOGIN_STEP_START);
@@ -1526,7 +1527,7 @@ msn_send_im(PurpleConnection *gc, const
PurpleMessageFlags flags)
{
PurpleAccount *account;
- PurpleBuddy *buddy = purple_find_buddy(gc->account, who);
+ PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(gc), who);
MsnSession *session;
MsnSwitchBoard *swboard;
MsnMessage *msg;
============================================================
--- libpurple/protocols/oscar/oscar.c 6dc8669d0926ebcb40d5f94231b0f2d7ccb12121
+++ libpurple/protocols/oscar/oscar.c d27e9d401f21dc6360a401905d74b7b5bf6cf10f
@@ -655,6 +655,7 @@ oscar_login(PurpleAccount *account)
GList *sorted_handlers;
GList *cur;
GString *msg = g_string_new("");
+ PurpleConnectionFlags flags;
gc = purple_account_get_connection(account);
od = oscar_data_new();
@@ -740,18 +741,20 @@ oscar_login(PurpleAccount *account)
return;
}
- gc->flags |= PURPLE_CONNECTION_HTML;
+ flags = PURPLE_CONNECTION_HTML;
if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq")) {
od->icq = TRUE;
} else {
- gc->flags |= PURPLE_CONNECTION_AUTO_RESP;
+ flags |= PURPLE_CONNECTION_AUTO_RESP;
}
/* Set this flag based on the protocol_id rather than the username,
because that is what's tied to the get_moods prpl callback. */
if (g_str_equal(purple_account_get_protocol_id(account), "prpl-icq"))
- gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS;
+ flags |= PURPLE_CONNECTION_SUPPORT_MOODS;
+ purple_connection_set_flags(gc, flags);
+
od->default_port = purple_account_get_int(account, "port", OSCAR_DEFAULT_LOGIN_PORT);
encryption_type = purple_account_get_string(account, "encryption", OSCAR_DEFAULT_ENCRYPTION);
@@ -1000,7 +1003,7 @@ static int purple_memrequest(OscarData *
pos->len = len;
pos->modname = g_strdup(modname);
- if (purple_proxy_connect(pos->gc, pos->gc->account, "pidgin.im", 80,
+ if (purple_proxy_connect(pos->gc, purple_connection_get_account(pos->gc), "pidgin.im", 80,
straight_to_hell, pos) == NULL)
{
char buf[256];
@@ -1547,7 +1550,7 @@ static int purple_parse_offgoing(OscarDa
purple_prpl_got_user_status(account, info->bn, OSCAR_STATUS_ID_OFFLINE, NULL);
purple_prpl_got_user_status_deactive(account, info->bn, OSCAR_STATUS_ID_MOBILE);
- g_hash_table_remove(od->buddyinfo, purple_normalize(gc->account, info->bn));
+ g_hash_table_remove(od->buddyinfo, purple_normalize(purple_connection_get_account(gc), info->bn));
return 1;
}
@@ -3176,9 +3179,9 @@ oscar_send_typing(PurpleConnection *gc,
else {
/* Don't send if this turkey is in our deny list */
GSList *list;
- for (list=gc->account->deny; (list && oscar_util_name_compare(name, list->data)); list=list->next);
+ for (list=purple_connection_get_account(gc)->deny; (list && oscar_util_name_compare(name, list->data)); list=list->next);
if (!list) {
- struct buddyinfo *bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(gc->account, name));
+ struct buddyinfo *bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(purple_connection_get_account(gc), name));
if (bi && bi->typingnot) {
if (state == PURPLE_TYPING)
aim_im_sendmtn(od, 0x0001, name, 0x0002);
============================================================
--- libpurple/protocols/zephyr/zephyr.c 77c87d8b719f8f302d07be2211a216fdffbf2cf6
+++ libpurple/protocols/zephyr/zephyr.c 75aac58acf8b0d5a503ae96a01dfeb3dbd16437b
@@ -777,9 +777,9 @@ static void handle_message(PurpleConnect
if (ZParseLocations(¬ice, NULL, &nlocs, &user) != ZERR_NONE)
return;
- if ((b = purple_find_buddy(gc->account, user)) == NULL) {
+ if ((b = purple_find_buddy(purple_connection_get_account(gc), user)) == NULL) {
char* stripped_user = zephyr_strip_local_realm(zephyr,user);
- b = purple_find_buddy(gc->account,stripped_user);
+ b = purple_find_buddy(purple_connection_get_account(gc),stripped_user);
g_free(stripped_user);
}
@@ -815,9 +815,9 @@ static void handle_message(PurpleConnect
purple_notify_user_info_destroy(user_info);
} else {
if (nlocs>0)
- purple_prpl_got_user_status(gc->account, b ? bname : user, "available", NULL);
+ purple_prpl_got_user_status(purple_connection_get_account(gc), b ? bname : user, "available", NULL);
else
- purple_prpl_got_user_status(gc->account, b ? bname : user, "offline", NULL);
+ purple_prpl_got_user_status(purple_connection_get_account(gc), b ? bname : user, "offline", NULL);
}
g_free(user);
@@ -900,7 +900,7 @@ static void handle_message(PurpleConnect
}
gconv1 = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT,
- zt2->name, gc->account);
+ zt2->name, purple_connection_get_account(gc));
gcc = purple_conversation_get_chat_data(gconv1);
#ifndef INET_ADDRSTRLEN
#define INET_ADDRSTRLEN 16
@@ -1156,9 +1156,9 @@ static gint check_notify_tzc(gpointer da
gchar *locval;
user = tree_child(find_node(newparsetree,"user"),2)->contents;
- if ((b = purple_find_buddy(gc->account, user)) == NULL) {
+ if ((b = purple_find_buddy(purple_connection_get_account(gc), user)) == NULL) {
gchar *stripped_user = zephyr_strip_local_realm(zephyr,user);
- b = purple_find_buddy(gc->account, stripped_user);
+ b = purple_find_buddy(purple_connection_get_account(gc), stripped_user);
g_free(stripped_user);
}
locations = find_node(newparsetree,"locations");
@@ -1200,9 +1200,9 @@ static gint check_notify_tzc(gpointer da
purple_notify_user_info_destroy(user_info);
} else {
if (nlocs>0)
- purple_prpl_got_user_status(gc->account, b ? bname : user, "available", NULL);
+ purple_prpl_got_user_status(purple_connection_get_account(gc), b ? bname : user, "available", NULL);
else
- purple_prpl_got_user_status(gc->account, b ? bname : user, "offline", NULL);
+ purple_prpl_got_user_status(purple_connection_get_account(gc), b ? bname : user, "offline", NULL);
}
}
else if (!g_ascii_strncasecmp(spewtype,"subscribed",10)) {
@@ -1521,11 +1521,11 @@ static void process_anyone(PurpleConnect
while (fgets(buff, BUFSIZ, fd)) {
strip_comments(buff);
if (buff[0]) {
- if (!(b = purple_find_buddy(gc->account, buff))) {
+ if (!(b = purple_find_buddy(purple_connection_get_account(gc), buff))) {
char *stripped_user = zephyr_strip_local_realm(zephyr,buff);
purple_debug_info("zephyr","stripped_user %s\n",stripped_user);
- if (!(b = purple_find_buddy(gc->account,stripped_user))){
- b = purple_buddy_new(gc->account, stripped_user, NULL);
+ if (!(b = purple_find_buddy(purple_connection_get_account(gc),stripped_user))){
+ b = purple_buddy_new(purple_connection_get_account(gc), stripped_user, NULL);
purple_blist_add_buddy(b, NULL, g, NULL);
}
g_free(stripped_user);
@@ -1564,14 +1564,14 @@ static void zephyr_login(PurpleAccount *
gchar *exposure;
gc = purple_account_get_connection(account);
- read_anyone = purple_account_get_bool(gc->account,"read_anyone",TRUE);
- read_zsubs = purple_account_get_bool(gc->account,"read_zsubs",TRUE);
- exposure = (gchar *)purple_account_get_string(gc->account, "exposure_level", EXPOSE_REALMVIS);
+ read_anyone = purple_account_get_bool(purple_connection_get_account(gc),"read_anyone",TRUE);
+ read_zsubs = purple_account_get_bool(purple_connection_get_account(gc),"read_zsubs",TRUE);
+ exposure = (gchar *)purple_account_get_string(purple_connection_get_account(gc), "exposure_level", EXPOSE_REALMVIS);
#ifdef WIN32
username = purple_account_get_username(account);
#endif
- gc->flags |= PURPLE_CONNECTION_AUTO_RESP | PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_AUTO_RESP | PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC);
zephyr = g_new0(zephyr_account, 1);
purple_connection_set_protocol_data(gc, zephyr);
@@ -1580,13 +1580,13 @@ static void zephyr_login(PurpleAccount *
/* Make sure that the exposure (visibility) is set to a sane value */
zephyr->exposure=g_strdup(normalize_zephyr_exposure(exposure));
- if (purple_account_get_bool(gc->account,"use_tzc",0)) {
+ if (purple_account_get_bool(purple_connection_get_account(gc),"use_tzc",0)) {
zephyr->connection_type = PURPLE_ZEPHYR_TZC;
} else {
zephyr->connection_type = PURPLE_ZEPHYR_KRB4;
}
- zephyr->encoding = (char *)purple_account_get_string(gc->account, "encoding", ZEPHYR_FALLBACK_CHARSET);
+ zephyr->encoding = (char *)purple_account_get_string(purple_connection_get_account(gc), "encoding", ZEPHYR_FALLBACK_CHARSET);
purple_connection_update_progress(gc, _("Connecting"), 0, 8);
/* XXX z_call_s should actually try to report the com_err determined error */
@@ -1607,7 +1607,7 @@ static void zephyr_login(PurpleAccount *
if (pid == 0) {
unsigned int i=0;
gboolean found_ps = FALSE;
- gchar ** tzc_cmd_array = g_strsplit(purple_account_get_string(gc->account,"tzc_command","/usr/bin/tzc -e %s")," ",0);
+ gchar ** tzc_cmd_array = g_strsplit(purple_account_get_string(purple_connection_get_account(gc),"tzc_command","/usr/bin/tzc -e %s")," ",0);
if (close(1) == -1) {
exit(-1);
}
@@ -1779,7 +1779,7 @@ static void zephyr_login(PurpleAccount *
if ((realm = strchr(username,'@')))
zephyr->realm = g_strdup_printf("%s",realm+1);
else {
- realm = (gchar *)purple_account_get_string(gc->account,"realm","");
+ realm = (gchar *)purple_account_get_string(purple_connection_get_account(gc),"realm","");
if (!*realm) {
realm = "local-realm";
}
@@ -1816,7 +1816,7 @@ static void zephyr_login(PurpleAccount *
z_call_s(ZOpenPort(&(zephyr->port)), "Couldn't open port");
z_call_s(ZSetLocation((char *)zephyr->exposure), "Couldn't set location");
- realm = (gchar *)purple_account_get_string(gc->account,"realm","");
+ realm = (gchar *)purple_account_get_string(purple_connection_get_account(gc),"realm","");
if (!*realm) {
realm = ZGetRealm();
}
@@ -1972,10 +1972,10 @@ static void zephyr_close(PurpleConnectio
}
g_list_free(zephyr->pending_zloc_names);
- if (purple_account_get_bool(gc->account, "write_anyone", FALSE))
+ if (purple_account_get_bool(purple_connection_get_account(gc), "write_anyone", FALSE))
write_anyone(zephyr);
- if (purple_account_get_bool(gc->account, "write_zsubs", FALSE))
+ if (purple_account_get_bool(purple_connection_get_account(gc), "write_zsubs", FALSE))
write_zsubs(zephyr);
s = zephyr->subscrips;
@@ -2047,7 +2047,7 @@ static int zephyr_chat_send(PurpleConnec
sig = zephyr_get_signature();
gconv1 = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, zt->name,
- gc->account);
+ purple_connection_get_account(gc));
gcc = purple_conversation_get_chat_data(gconv1);
if (!(inst = (char *)purple_conv_chat_get_topic(gcc)))
@@ -2576,7 +2576,7 @@ static void zephyr_chat_set_topic(Purple
if (!zt)
return;
gconv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, zt->name,
- gc->account);
+ purple_connection_get_account(gc));
gcc = purple_conversation_get_chat_data(gconv);
topic_utf8 = zephyr_recv_convert(gc,(gchar *)topic);
============================================================
--- libpurple/protocols/gg/gg.c 231f2de698e9771c679d989c12ab74907c0355b6
+++ libpurple/protocols/gg/gg.c 4c91992273ee00eb14b99150b09ad43ac09efbb2
@@ -420,7 +420,7 @@ static void ggp_callback_register_accoun
GGPInfo *info = purple_connection_get_protocol_data(gc);
GGPToken *token = info->token;
- purple_account_disconnect(gc->account);
+ purple_account_disconnect(purple_connection_get_account(gc));
g_free(token->id);
g_free(token->data);
============================================================
--- libpurple/protocols/yahoo/libymsg.c 8b54ee89c365e905e68e7e972931ab7aee147a6c
+++ libpurple/protocols/yahoo/libymsg.c 33181fd2401298245203cfdb5ad10cb6e75cdc67
@@ -337,12 +337,12 @@ static void yahoo_process_status(PurpleC
if (!name)
break;
- b = purple_find_buddy(gc->account, name);
+ b = purple_find_buddy(purple_connection_get_account(gc), name);
if (!cksum || (cksum == -1)) {
if (f)
yahoo_friend_set_buddy_icon_need_request(f, TRUE);
- purple_buddy_icons_set_for_user(gc->account, name, NULL, 0, NULL);
+ purple_buddy_icons_set_for_user(purple_connection_get_account(gc), name, NULL, 0, NULL);
break;
}
@@ -2180,12 +2180,12 @@ static void yahoo_process_ignore(PurpleC
who, (ignore ? "ignoring" : "unignoring"));
if (ignore) {
- b = purple_find_buddy(gc->account, who);
+ b = purple_find_buddy(purple_connection_get_account(gc), who);
g_snprintf(buf, sizeof(buf), _("You have tried to ignore %s, but the "
"user is on your buddy list. Clicking \"Yes\" "
"will remove and ignore the buddy."), who);
purple_request_yes_no(gc, NULL, _("Ignore buddy?"), buf, 0,
- gc->account, who, NULL,
+ purple_connection_get_account(gc), who, NULL,
b,
G_CALLBACK(ignore_buddy),
G_CALLBACK(keep_buddy));
@@ -2214,7 +2214,7 @@ static void yahoo_process_authresp(Purpl
char *msg;
char *url = NULL;
char *fullmsg;
- PurpleAccount *account = gc->account;
+ PurpleAccount *account = purple_connection_get_account(gc);
PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_OTHER_ERROR;
while (l) {
@@ -3245,7 +3245,7 @@ static void yahoo_got_connected(gpointer
pkt = yahoo_packet_new(YAHOO_SERVICE_AUTH, yd->current_status, yd->session_id);
- yahoo_packet_hash_str(pkt, 1, purple_normalize(gc->account, purple_account_get_username(purple_connection_get_account(gc))));
+ yahoo_packet_hash_str(pkt, 1, purple_normalize(purple_connection_get_account(gc), purple_account_get_username(purple_connection_get_account(gc))));
yahoo_packet_send_and_free(pkt, yd);
gc->inpa = purple_input_add(yd->fd, PURPLE_INPUT_READ, yahoo_pending, gc);
@@ -3272,8 +3272,8 @@ static void yahoo_got_web_connected(gpoi
pkt = yahoo_packet_new(YAHOO_SERVICE_WEBLOGIN, YAHOO_STATUS_WEBLOGIN, yd->session_id);
yahoo_packet_hash(pkt, "sss", 0,
- purple_normalize(gc->account, purple_account_get_username(purple_connection_get_account(gc))),
- 1, purple_normalize(gc->account, purple_account_get_username(purple_connection_get_account(gc))),
+ purple_normalize(purple_connection_get_account(gc), purple_account_get_username(purple_connection_get_account(gc))),
+ 1, purple_normalize(purple_connection_get_account(gc), purple_account_get_username(purple_connection_get_account(gc))),
6, yd->auth);
yahoo_packet_send_and_free(pkt, yd);
@@ -3678,7 +3678,7 @@ void yahoo_login(PurpleAccount *account)
PurpleUtilFetchUrlData *url_data;
purple_connection_set_protocol_data(gc, yd);
- gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC);
purple_connection_update_progress(gc, _("Connecting"), 1, 2);
@@ -4476,7 +4476,7 @@ static void yahoo_get_sms_carrier(Purple
YAHOO_CLIENT_VERSION, yd->cookie_t, yd->cookie_y, strlen(validate_request_str), validate_request_str);
/* use whole URL if using HTTP Proxy */
- if ((purple_account_get_proxy_info(gc->account)) && (purple_proxy_info_get_type(purple_account_get_proxy_info(gc->account)) == PURPLE_PROXY_HTTP))
+ if ((purple_account_get_proxy_info(purple_connection_get_account(gc))) && (purple_proxy_info_get_type(purple_account_get_proxy_info(purple_connection_get_account(gc))) == PURPLE_PROXY_HTTP))
use_whole_url = TRUE;
url_data = purple_util_fetch_url_request(
@@ -4612,7 +4612,7 @@ int yahoo_send_im(PurpleConnection *gc,
*
* If they have not set an IMVironment, then use the default.
*/
- wb = purple_whiteboard_get_session(gc->account, who);
+ wb = purple_whiteboard_get_session(purple_connection_get_account(gc), who);
if (wb)
yahoo_packet_hash_str(pkt, 63, DOODLE_IMV_KEY);
else
@@ -5262,7 +5262,7 @@ gboolean yahoo_send_attention(PurpleConn
PurpleConversation *c;
c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
- username, gc->account);
+ username, purple_connection_get_account(gc));
g_return_val_if_fail(c != NULL, FALSE);
============================================================
--- pidgin/gtkconv.c 36455590d2fca8ef44d60d67f6c3f553e9db3ac9
+++ pidgin/gtkconv.c 8cfcff312ad1d475e84398663934fb6298ce4599
@@ -564,7 +564,7 @@ check_for_and_do_command(PurpleConversat
PurpleConnection *gc;
if ((gc = purple_conversation_get_gc(conv)))
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if ((prpl_info != NULL) && (prpl_info->options & OPT_PROTO_SLASH_COMMANDS_NATIVE)) {
char *spaceslash;
@@ -1512,7 +1512,7 @@ chat_do_im(PidginConversation *gtkconv,
gc = purple_account_get_connection(account);
g_return_if_fail(gc != NULL);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->get_cb_real_name)
real_who = prpl_info->get_cb_real_name(gc,
@@ -1568,7 +1568,7 @@ menu_chat_send_file_cb(GtkWidget *w, Pid
g_return_if_fail(gc != NULL);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->get_cb_real_name)
real_who = prpl_info->get_cb_real_name(gc,
@@ -1649,7 +1649,7 @@ create_chat_menu(PurpleConversation *con
PurpleBuddy *buddy = NULL;
if (gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
/*
* If a menu already exists, destroy it before creating a new one,
@@ -4069,7 +4069,7 @@ add_chat_buddy_common(PurpleConversation
gtkchat = gtkconv->u.chat;
gc = purple_conversation_get_gc(conv);
- if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)))
+ if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
return;
tm = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list));
@@ -4379,7 +4379,7 @@ static void topic_callback(GtkWidget *w,
gc = purple_conversation_get_gc(conv);
- if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)))
+ if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
return;
if(prpl_info->set_chat_topic == NULL)
@@ -4522,8 +4522,8 @@ blist_node_aliased_cb(PurpleBlistNode *n
gc = purple_conversation_get_gc(conv);
g_return_if_fail(gc != NULL);
- g_return_if_fail(gc->prpl != NULL);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ g_return_if_fail(purple_connection_get_prpl(gc) != NULL);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)
return;
@@ -4731,7 +4731,7 @@ setup_chat_topic(PidginConversation *gtk
{
PurpleConversation *conv = gtkconv->active_conv;
PurpleConnection *gc = purple_conversation_get_gc(conv);
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info->options & OPT_PROTO_CHAT_TOPIC)
{
GtkWidget *hbox, *label;
@@ -4780,7 +4780,7 @@ pidgin_conv_userlist_create_tooltip(GtkW
gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &who, -1);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_account_get_connection(account)->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(account)));
node = (PurpleBlistNode*)(purple_find_buddy(purple_conversation_get_account(conv), who));
if (node && prpl_info && (prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME))
pidgin_blist_draw_tooltip(node, gtkconv->infopane);
@@ -5370,7 +5370,7 @@ conv_dnd_recv(GtkWidget *widget, GdkDrag
PurpleConversation *c;
PurpleAccount *convaccount = purple_conversation_get_account(conv);
PurpleConnection *gc = purple_account_get_connection(convaccount);
- PurplePluginProtocolInfo *prpl_info = gc ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
+ PurplePluginProtocolInfo *prpl_info = gc ? PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc)) : NULL;
if (sd->target == gdk_atom_intern("PURPLE_BLIST_NODE", FALSE))
{
@@ -6865,7 +6865,7 @@ gray_stuff_out(PidginConversation *gtkco
account = purple_conversation_get_account(conv);
if (gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (win->menu.send_to != NULL)
update_send_to_selection(win);
@@ -7929,13 +7929,15 @@ account_signed_off_cb(PurpleConnection *
if (PURPLE_CONNECTION_IS_CONNECTED(gc) &&
purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT &&
- purple_conversation_get_account(conv) == gc->account &&
+ purple_conversation_get_account(conv) == purple_connection_get_account(gc) &&
purple_conversation_get_data(conv, "want-to-rejoin")) {
GHashTable *comps = NULL;
PurpleChat *chat = purple_blist_find_chat(purple_conversation_get_account(conv), purple_conversation_get_name(conv));
if (chat == NULL) {
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
- comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, purple_conversation_get_name(conv));
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
+
+ if (prpl_info->chat_info_defaults != NULL)
+ comps = prpl_info->chat_info_defaults(gc, purple_conversation_get_name(conv));
} else {
comps = chat->components;
}
@@ -9430,7 +9432,7 @@ infopane_entry_activate(PidginConversati
gc = purple_conversation_get_gc(conv);
if (gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->set_chat_topic == NULL)
/* This protocol doesn't support setting the chat room topic */
return FALSE;
============================================================
--- pidgin/gtkutils.c 1eecd73bf84282c70648a05f60e82215d1fbe2f7
+++ pidgin/gtkutils.c 3a7384188da7ab2b7902d3ba472ca2418a1993ec
@@ -1069,7 +1069,7 @@ void pidgin_retrieve_user_info_in_chat(P
return;
}
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(conn->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(conn));
if (prpl_info != NULL && prpl_info->get_cb_real_name)
who = prpl_info->get_cb_real_name(conn, chat, name);
if (prpl_info == NULL || prpl_info->get_cb_info == NULL) {
@@ -1195,7 +1195,7 @@ pidgin_parse_x_im_contact(const char *ms
gc = (PurpleConnection *)l->data;
account = purple_connection_get_account(gc);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
}
protoname = prpl_info->list_icon(account, NULL);
@@ -1237,7 +1237,7 @@ pidgin_parse_x_im_contact(const char *ms
gc = (PurpleConnection *)l->data;
account = purple_connection_get_account(gc);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
}
protoname = prpl_info->list_icon(account, NULL);
@@ -1649,7 +1649,7 @@ pidgin_dnd_file_manage(GtkSelectionData
data->account = account;
if (gc)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && prpl_info->options & OPT_PROTO_IM_IMAGE)
im = TRUE;
============================================================
--- libpurple/protocols/msn/msg.c eff188d1177bac3130fb75f3fd1d1187ab428240
+++ libpurple/protocols/msn/msg.c f3c82185167ec7756f43622f6211604ae426ea9a
@@ -688,7 +688,7 @@ msn_plain_msg(MsnCmdProc *cmdproc, MsnMe
swboard->flag |= MSN_SB_FLAG_IM;
}
}
- else if (!g_str_equal(passport, purple_account_get_username(gc->account)))
+ else if (!g_str_equal(passport, purple_account_get_username(purple_connection_get_account(gc))))
{
/* Don't im ourselves ... */
serv_got_im(gc, passport, body_final, 0, time(NULL));
============================================================
--- pidgin/gtkpounce.c 91cb352e3bb67038d882c0212da4497f10d43d16
+++ pidgin/gtkpounce.c b5c26953afbaa151484b507c80b9c6163cffe70a
@@ -476,7 +476,7 @@ reset_send_msg_entry(PidginPounceDialog
{
PurpleAccount *account = pidgin_account_option_menu_get_selected(dialog->account_menu);
gtk_imhtml_setup_entry(GTK_IMHTML(dialog->send_msg_entry),
- (account && purple_account_get_connection(account)) ? purple_account_get_connection(account)->flags : PURPLE_CONNECTION_HTML);
+ (account && purple_account_get_connection(account)) ? purple_connection_get_flags(purple_account_get_connection(account)) : PURPLE_CONNECTION_HTML);
}
void
============================================================
--- pidgin/gtkblist.c b0441c6f8cf8483cda5e65cc1d80570fefe5312f
+++ pidgin/gtkblist.c 06b3b72e5c9008f823a565278148e6a1bfd3c81f
@@ -916,7 +916,7 @@ set_sensitive_if_input_cb(GtkWidget *ent
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->rq_data.window), GTK_RESPONSE_OK, sensitive);
gc = purple_account_get_connection(data->rq_data.account);
- prpl_info = (gc != NULL) ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
+ prpl_info = (gc != NULL) ? PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc)) : NULL;
sensitive = (prpl_info != NULL && prpl_info->roomlist_get_list != NULL);
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->rq_data.window), 1, sensitive);
@@ -940,7 +940,7 @@ chat_account_filter_func(PurpleAccount *
if (gc == NULL)
return FALSE;
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
return (prpl_info->chat_info != NULL);
}
@@ -1030,6 +1030,7 @@ rebuild_chat_entries(PidginChatData *dat
rebuild_chat_entries(PidginChatData *data, const char *default_chat_name)
{
PurpleConnection *gc;
+ PurplePluginProtocolInfo *prpl_info;
GList *list = NULL, *tmp;
GHashTable *defaults = NULL;
struct proto_chat_entry *pce;
@@ -1038,17 +1039,18 @@ rebuild_chat_entries(PidginChatData *dat
g_return_if_fail(data->rq_data.account != NULL);
gc = purple_account_get_connection(data->rq_data.account);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
gtk_container_foreach(GTK_CONTAINER(data->rq_data.vbox), (GtkCallback)gtk_widget_destroy, NULL);
g_list_free(data->entries);
data->entries = NULL;
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
- list = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info(gc);
+ if (prpl_info->chat_info != NULL)
+ list = prpl_info->chat_info(gc);
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
- defaults = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, default_chat_name);
+ if (prpl_info->chat_info_defaults != NULL)
+ defaults = prpl_info->chat_info_defaults(gc, default_chat_name);
for (tmp = list; tmp; tmp = tmp->next)
{
@@ -1411,7 +1413,7 @@ pidgin_append_blist_node_proto_menu(GtkW
PurpleBlistNode *node)
{
GList *l, *ll;
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if(!prpl_info || !prpl_info->blist_node_menu)
return;
@@ -2301,7 +2303,7 @@ static void pidgin_blist_drag_data_get_c
}
protocol =
- PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->list_icon(buddy->account,
+ PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->list_icon(buddy->account,
buddy);
str = g_string_new(NULL);
@@ -2674,7 +2676,7 @@ static GdkPixbuf *pidgin_blist_get_buddy
}
if(account && purple_account_get_connection(account)) {
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_account_get_connection(account)->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(purple_account_get_connection(account)));
}
#if 0
@@ -3382,7 +3384,7 @@ edit_mood_cb(PurpleConnection *gc, Purpl
const char *text;
PurpleAccount *account = purple_connection_get_account(gc);
- if (gc->flags & PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES) {
+ if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES) {
PurpleRequestField *text_field;
text_field = purple_request_fields_get_field(fields, "text");
text = purple_request_field_string_get_value(text_field);
@@ -3398,7 +3400,7 @@ edit_mood_cb(PurpleConnection *gc, Purpl
PurpleAccount *account = (PurpleAccount *) accounts->data;
PurpleConnection *gc = purple_account_get_connection(account);
- if (gc && gc->flags & PURPLE_CONNECTION_SUPPORT_MOODS) {
+ if (gc && (purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOODS)) {
update_status_with_mood(account, mood, NULL);
}
}
@@ -3433,9 +3435,9 @@ get_global_moods(void)
if (purple_account_is_connected(account)) {
PurpleConnection *gc = purple_account_get_connection(account);
- if (gc->flags & PURPLE_CONNECTION_SUPPORT_MOODS) {
+ if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOODS) {
PurplePluginProtocolInfo *prpl_info =
- PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
PurpleMood *mood = NULL;
/* PURPLE_CONNECTION_SUPPORT_MOODS would not be set if the prpl doesn't
@@ -3493,7 +3495,7 @@ get_global_mood_status(void)
PurpleAccount *account = (PurpleAccount *) accounts->data;
if (purple_account_is_connected(account) &&
- (purple_account_get_connection(account)->flags &
+ (purple_connection_get_flags(purple_account_get_connection(account)) &
PURPLE_CONNECTION_SUPPORT_MOODS)) {
PurplePresence *presence = purple_account_get_presence(account);
PurpleStatus *status = purple_presence_get_status(presence, "mood");
@@ -3528,8 +3530,8 @@ set_mood_cb(GtkWidget *widget, PurpleAcc
PurplePresence *presence = purple_account_get_presence(account);
PurpleStatus *status = purple_presence_get_status(presence, "mood");
gc = purple_account_get_connection(account);
- g_return_if_fail(gc->prpl != NULL);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ g_return_if_fail(purple_connection_get_prpl(gc) != NULL);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
current_mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
} else {
current_mood = get_global_mood_status();
@@ -3568,7 +3570,7 @@ set_mood_cb(GtkWidget *widget, PurpleAcc
purple_request_fields_add_group(fields, g);
/* if the connection allows setting a mood message */
- if (gc && (gc->flags & PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES)) {
+ if (gc && (purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES)) {
g = purple_request_field_group_new(NULL);
f = purple_request_field_string_new("text",
_("Message (optional)"), NULL, FALSE);
@@ -7203,11 +7205,13 @@ pidgin_blist_request_add_chat(PurpleAcco
GList *l;
PurpleConnection *gc;
GtkBox *vbox;
+ PurplePluginProtocolInfo *prpl_info = NULL;
if (account != NULL) {
gc = purple_account_get_connection(account);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->join_chat == NULL) {
+ if (prpl_info->join_chat == NULL) {
purple_notify_error(gc, NULL, _("This protocol does not support chat rooms."), NULL);
return;
}
@@ -7215,8 +7219,9 @@ pidgin_blist_request_add_chat(PurpleAcco
/* Find an account with chat capabilities */
for (l = purple_connections_get_all(); l != NULL; l = l->next) {
gc = (PurpleConnection *)l->data;
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->join_chat != NULL) {
+ if (prpl_info->join_chat != NULL) {
account = purple_connection_get_account(gc);
break;
}
@@ -8081,14 +8086,14 @@ pidgin_blist_update_accounts_menu(void)
pidgin_separator(submenu);
gc = purple_account_get_connection(account);
- plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? gc->prpl : NULL;
+ plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? purple_connection_get_prpl(gc) : NULL;
prpl_info = plugin ? PURPLE_PLUGIN_PROTOCOL_INFO(plugin) : NULL;
if (prpl_info &&
(PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) ||
PURPLE_PLUGIN_HAS_ACTIONS(plugin))) {
if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) &&
- gc->flags & PURPLE_CONNECTION_SUPPORT_MOODS) {
+ (purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOODS)) {
if (purple_account_get_status(account, "mood")) {
menuitem = gtk_menu_item_new_with_mnemonic(_("Set _Mood..."));
============================================================
--- libpurple/protocols/msn/notification.c 1e03efe939388d3bb5a63d2b207eeb42e1462b8a
+++ libpurple/protocols/msn/notification.c 4534badc27d66694efc1b7b709415892f6a50651
@@ -1193,7 +1193,7 @@ ipg_cmd_post(MsnCmdProc *cmdproc, MsnCom
if (id && strcmp(id, "1")) {
PurpleConversation *conv
= purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
- who, gc->account);
+ who, purple_connection_get_account(gc));
if (conv != NULL) {
const char *error;
if (!strcmp(id, "407"))
============================================================
--- pidgin/gtknotify.c 37ecbca7ee40c4b4ba70c9f972c5a9756954d055
+++ pidgin/gtknotify.c b3e45bae1388cb3904d2a57d5cc58c6aca31cb9e
@@ -1076,7 +1076,7 @@ pidgin_notify_searchresults(PurpleConnec
g_signal_connect_swapped(G_OBJECT(close_button), "clicked",
G_CALLBACK(searchresults_close_cb), data);
- data->account = gc->account;
+ data->account = purple_connection_get_account(gc);
data->model = model;
data->treeview = treeview;
data->window = window;
============================================================
--- libpurple/account.c c2cc020834f96853f759c34fc46b634451063dac
+++ libpurple/account.c f78e7bae178409802bc0e622073411d6471892d0
@@ -1591,7 +1591,7 @@ purple_account_request_change_user_info(
purple_request_input(gc, _("Set User Info"), primary, NULL,
purple_account_get_user_info(account),
TRUE, FALSE, ((gc != NULL) &&
- (gc->flags & PURPLE_CONNECTION_HTML) ? "html" : NULL),
+ (purple_connection_get_flags(gc) & PURPLE_CONNECTION_HTML) ? "html" : NULL),
_("Save"), G_CALLBACK(set_user_info_cb),
_("Cancel"), NULL,
account, NULL, NULL,
============================================================
--- libpurple/connection.c 81ac93c4bf3524634bf1ddc8e64bc30568a1ec3f
+++ libpurple/connection.c a7cdbd077499a0917819ef86c1417dc0bf6aa92c
@@ -387,6 +387,14 @@ void
}
void
+purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags)
+{
+ g_return_if_fail(gc != NULL);
+
+ gc->flags = flags;
+}
+
+void
purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account)
{
g_return_if_fail(gc != NULL);
@@ -419,6 +427,14 @@ purple_connection_get_state(const Purple
return gc->state;
}
+PurpleConnectionFlags
+purple_connection_get_flags(const PurpleConnection *gc)
+{
+ g_return_val_if_fail(gc != NULL, 0);
+
+ return gc->flags;
+}
+
PurpleAccount *
purple_connection_get_account(const PurpleConnection *gc)
{
============================================================
--- libpurple/connection.h ac25032dc0b6da6c405620e546f15c5ee74ba197
+++ libpurple/connection.h 0ca3c3cca09faf13661b2c2f2b4996f418cd353c
@@ -281,6 +281,14 @@ void purple_connection_set_state(PurpleC
void purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state);
/**
+ * Sets the connection flags.
+ *
+ * @param gc The connection.
+ * @param flags The flags.
+ */
+void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags);
+
+/**
* Sets the connection's account.
*
* @param gc The connection.
@@ -314,6 +322,15 @@ PurpleConnectionState purple_connection_
PurpleConnectionState purple_connection_get_state(const PurpleConnection *gc);
/**
+ * Returns the connection flags.
+ *
+ * @param gc The connection.
+ *
+ * @return The connection flags.
+ */
+PurpleConnectionFlags purple_connection_get_flags(const PurpleConnection *gc);
+
+/**
* Returns TRUE if the account is connected, otherwise returns FALSE.
*
* @return TRUE if the account is connected, otherwise returns FALSE.
============================================================
--- libpurple/protocols/irc/msgs.c a2fbe86bbba36e9a29c40bc13ad713b14159abda
+++ libpurple/protocols/irc/msgs.c f3be925b8b5fbbde48b88f24a08369198dab25f4
@@ -92,7 +92,7 @@ static void irc_connected(struct irc_con
/* If we're away then set our away message */
status = purple_account_get_active_status(irc->account);
if (!purple_status_get_type(status) != PURPLE_STATUS_AVAILABLE) {
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
prpl_info->set_status(irc->account, status);
}
============================================================
--- libpurple/protocols/jabber/buddy.c 2c5ddbe26c173291d392387a3515a024d6bc552d
+++ libpurple/protocols/jabber/buddy.c 0d6da7631e8e4c26e360a89e27a4685bd115bcdb
@@ -501,7 +501,7 @@ void jabber_set_info(PurpleConnection *g
vc_node = NULL;
}
- if ((img = purple_buddy_icons_find_account_icon(gc->account))) {
+ if ((img = purple_buddy_icons_find_account_icon(purple_connection_get_account(gc)))) {
gconstpointer avatar_data;
gsize avatar_len;
xmlnode *photo, *binval, *type;
@@ -642,7 +642,7 @@ void jabber_setup_set_info(PurplePluginA
/*
* Get existing, XML-formatted, user info
*/
- if((user_info = purple_account_get_user_info(gc->account)) != NULL)
+ if((user_info = purple_account_get_user_info(purple_connection_get_account(gc))) != NULL)
x_vc_data = xmlnode_from_str(user_info, -1);
/*
@@ -1360,7 +1360,7 @@ static void jabber_last_parse(JabberStre
if (jbr ==
jabber_buddy_find_resource(jb, NULL)) {
- purple_prpl_got_user_idle(js->gc->account,
+ purple_prpl_got_user_idle(purple_connection_get_account(js->gc),
buddy_name, jbr->idle, jbr->idle);
}
}
@@ -2255,10 +2255,10 @@ void jabber_user_search(JabberStream *js
make sure we aren't persisting an old value */
if(js->user_directories && js->user_directories->data &&
!strcmp(directory, js->user_directories->data)) {
- purple_account_set_string(js->gc->account, "user_directory", "");
+ purple_account_set_string(purple_connection_get_account(js->gc), "user_directory", "");
}
else {
- purple_account_set_string(js->gc->account, "user_directory", directory);
+ purple_account_set_string(purple_connection_get_account(js->gc), "user_directory", directory);
}
iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:search");
@@ -2273,7 +2273,7 @@ void jabber_user_search_begin(PurplePlug
{
PurpleConnection *gc = (PurpleConnection *) action->context;
JabberStream *js = purple_connection_get_protocol_data(gc);
- const char *def_val = purple_account_get_string(js->gc->account, "user_directory", "");
+ const char *def_val = purple_account_get_string(purple_connection_get_account(js->gc), "user_directory", "");
if(!*def_val && js->user_directories)
def_val = js->user_directories->data;
============================================================
--- libpurple/protocols/jabber/presence.c 8aeca6ada866356f85868569e1e8d3a769061617
+++ libpurple/protocols/jabber/presence.c accfe90f95a0720700d62798cd40d41326a58245
@@ -459,7 +459,7 @@ jabber_vcard_parse_avatar(JabberStream *
hash = jabber_calculate_data_hash(data, size, "sha1");
}
- purple_buddy_icons_set_for_user(js->gc->account, from, data, size, hash);
+ purple_buddy_icons_set_for_user(purple_connection_get_account(js->gc), from, data, size, hash);
g_free(hash);
}
============================================================
--- libpurple/protocols/jabber/roster.c 27e6fe38e3d3c9cf9bae52b5a3323b013dc14a29
+++ libpurple/protocols/jabber/roster.c deecd8f9446f67e5e094f09e2b9c5b88686518d7
@@ -96,7 +96,7 @@ static void remove_purple_buddies(Jabber
{
GSList *buddies, *l;
- buddies = purple_find_buddies(js->gc->account, jid);
+ buddies = purple_find_buddies(purple_connection_get_account(js->gc), jid);
for(l = buddies; l; l = l->next)
purple_blist_remove_buddy(l->data);
@@ -110,7 +110,7 @@ static void add_purple_buddy_to_groups(J
GSList *buddies, *l;
PurpleAccount *account = purple_connection_get_account(js->gc);
- buddies = purple_find_buddies(js->gc->account, jid);
+ buddies = purple_find_buddies(purple_connection_get_account(js->gc), jid);
if(!groups) {
if(!buddies)
@@ -304,7 +304,7 @@ static void jabber_roster_update(JabberS
if (js->currently_parsing_roster_push)
return;
- if(!(b = purple_find_buddy(js->gc->account, name)))
+ if(!(b = purple_find_buddy(purple_connection_get_account(js->gc), name)))
return;
if (groups) {
@@ -314,7 +314,7 @@ static void jabber_roster_update(JabberS
"groups]: groups: %s\n", name, tmp);
g_free(tmp);
} else {
- GSList *buddies = purple_find_buddies(js->gc->account, name);
+ GSList *buddies = purple_find_buddies(purple_connection_get_account(js->gc), name);
char *tmp;
if(!buddies)
@@ -413,7 +413,7 @@ void jabber_roster_add_buddy(PurpleConne
} else if(!jb || !(jb->subscription & JABBER_SUB_TO)) {
jabber_presence_subscription_set(js, who, "subscribe");
} else if((jbr =jabber_buddy_find_resource(jb, NULL))) {
- purple_prpl_got_user_status(gc->account, who,
+ purple_prpl_got_user_status(purple_connection_get_account(gc), who,
jabber_buddy_state_get_status_id(jbr->state),
"priority", jbr->priority, jbr->status ? "message" : NULL, jbr->status, NULL);
}
@@ -423,7 +423,7 @@ void jabber_roster_alias_change(PurpleCo
void jabber_roster_alias_change(PurpleConnection *gc, const char *name, const char *alias)
{
- PurpleBuddy *b = purple_find_buddy(gc->account, name);
+ PurpleBuddy *b = purple_find_buddy(purple_connection_get_account(gc), name);
if(b != NULL) {
purple_blist_alias_buddy(b, alias);
@@ -446,7 +446,7 @@ void jabber_roster_group_change(PurpleCo
if(!old_group || !new_group || !strcmp(old_group, new_group))
return;
- buddies = purple_find_buddies(gc->account, name);
+ buddies = purple_find_buddies(purple_connection_get_account(gc), name);
while(buddies) {
b = buddies->data;
g = purple_buddy_get_group(b);
============================================================
--- libpurple/protocols/jabber/oob.c 5d5a7f04cc1ace30705632c8215e8f9aece54194
+++ libpurple/protocols/jabber/oob.c 06d22d012584880cb58411302fa00dc44be6d9dc
@@ -218,7 +218,7 @@ void jabber_oob_parse(JabberStream *js,
jox->headers = g_string_new("");
jox->iq_id = g_strdup(id);
- xfer = purple_xfer_new(js->gc->account, PURPLE_XFER_RECEIVE, from);
+ xfer = purple_xfer_new(purple_connection_get_account(js->gc), PURPLE_XFER_RECEIVE, from);
if (xfer)
{
purple_xfer_set_protocol_data(xfer, jox);
============================================================
--- libpurple/protocols/jabber/si.c fbe46f28afa0286dab1fcf7c739a1b66a95714a5
+++ libpurple/protocols/jabber/si.c 5edcba9e70297900bc076d1d4efbd47a9d3baf4d
@@ -1561,7 +1561,7 @@ static void jabber_si_xfer_init(PurpleXf
purple_request_fields(jsx->js->gc, _("Select a Resource"), msg, NULL, fields,
_("Send File"), G_CALLBACK(resource_select_ok_cb), _("Cancel"), G_CALLBACK(resource_select_cancel_cb),
- jsx->js->gc->account, purple_xfer_get_remote_user(xfer), NULL, xfer);
+ purple_connection_get_account(jsx->js->gc), purple_xfer_get_remote_user(xfer), NULL, xfer);
g_free(msg);
}
@@ -1617,7 +1617,7 @@ PurpleXfer *jabber_si_new_xfer(PurpleCon
js = purple_connection_get_protocol_data(gc);
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who);
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND, who);
if (xfer)
{
jsx = g_new0(JabberSIXfer, 1);
@@ -1743,7 +1743,7 @@ void jabber_si_parse(JabberStream *js, c
jsx->stream_id = g_strdup(stream_id);
jsx->iq_id = g_strdup(id);
- xfer = purple_xfer_new(js->gc->account, PURPLE_XFER_RECEIVE, from);
+ xfer = purple_xfer_new(purple_connection_get_account(js->gc), PURPLE_XFER_RECEIVE, from);
g_return_if_fail(xfer != NULL);
purple_xfer_set_protocol_data(xfer, jsx);
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c f12b0d3502699ada2023592eaee5bd93bee82765
+++ libpurple/protocols/yahoo/yahoo_filexfer.c e3f43c3124525704c7745c4b8f62ba8e1009a16d
@@ -692,7 +692,7 @@ static void yahoo_xfer_end(PurpleXfer *x
purple_xfer_set_protocol_data(xfer_old, NULL);
/* Build the file transfer handle. */
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, purple_xfer_get_remote_user(xfer_old));
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_RECEIVE, purple_xfer_get_remote_user(xfer_old));
if (xfer) {
@@ -879,7 +879,7 @@ void yahoo_process_filetransfer(PurpleCo
xfer_data->host, xfer_data->port, xfer_data->path, url);
/* Build the file transfer handle. */
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, from);
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_RECEIVE, from);
if (xfer == NULL) {
g_free(xfer_data);
g_return_if_reached();
@@ -935,7 +935,7 @@ PurpleXfer *yahoo_new_xfer(PurpleConnect
xfer_data->gc = gc;
/* Build the file transfer handle. */
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who);
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND, who);
if (xfer == NULL)
{
g_free(xfer_data);
@@ -1730,7 +1730,7 @@ void yahoo_process_filetrans_15(PurpleCo
xfer_data->size_list = size_list;
/* Build the file transfer handle. */
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, from);
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_RECEIVE, from);
if (xfer == NULL)
{
g_free(xfer_data);
============================================================
--- pidgin/gtkroomlist.c 9782ab6ee158b1c675de5306e941f2cdda4812de
+++ pidgin/gtkroomlist.c 39e1ed8da7e977f6bd7b622b4a0ae6f39687eab7
@@ -233,7 +233,7 @@ static void do_add_room_cb(GtkWidget *w,
PurplePluginProtocolInfo *prpl_info = NULL;
if(gc != NULL)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if(prpl_info != NULL && prpl_info->roomlist_room_serialize)
name = prpl_info->roomlist_room_serialize(info->room);
@@ -502,7 +502,7 @@ static gboolean account_filter_func(Purp
PurplePluginProtocolInfo *prpl_info = NULL;
if (conn && PURPLE_CONNECTION_IS_CONNECTED(conn))
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(conn->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(conn));
return (prpl_info && prpl_info->roomlist_get_list != NULL);
}
============================================================
--- libpurple/protocols/jabber/disco.c a5e79029861b00a72571ec0283c7e238f10a56c0
+++ libpurple/protocols/jabber/disco.c a94d897aebf3173cabbaf2cf23b55d4066e45e95
@@ -387,7 +387,7 @@ jabber_disco_finish_server_info_result_c
}
/* If there are manually specified bytestream proxies, query them */
- ft_proxies = purple_account_get_string(js->gc->account, "ft_proxies", NULL);
+ ft_proxies = purple_account_get_string(purple_connection_get_account(js->gc), "ft_proxies", NULL);
if (ft_proxies) {
JabberIq *iq;
JabberBytestreamsStreamhost *sh;
@@ -524,8 +524,10 @@ jabber_disco_server_info_result_cb(Jabbe
if(category && type && !strcmp(category, "pubsub") && !strcmp(type,"pep")) {
PurpleConnection *gc = js->gc;
js->pep = TRUE;
- gc->flags |= PURPLE_CONNECTION_SUPPORT_MOODS |
- PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES;
+ purple_connection_set_flags(gc,
+ purple_connection_get_flags(gc)
+ | PURPLE_CONNECTION_SUPPORT_MOODS
+ | PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES);
}
if (!category || strcmp(category, "server"))
continue;
============================================================
--- libpurple/protocols/novell/novell.c d097789b4e526ebaedd1f5a09838145baa483c19
+++ libpurple/protocols/novell/novell.c 4756c5e9d33f0a4b0c486c90a60fef9add24f33d
@@ -131,8 +131,8 @@ _login_resp_cb(NMUser * user, NMERR_T re
/* Don't attempt to auto-reconnect if our
* password was invalid.
*/
- if (!purple_account_get_remember_password(gc->account))
- purple_account_set_password(gc->account, NULL);
+ if (!purple_account_get_remember_password(purple_connection_get_account(gc)))
+ purple_account_set_password(purple_connection_get_account(gc), NULL);
reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
break;
default:
@@ -741,16 +741,16 @@ _get_details_resp_add_privacy_item(NMUse
if (allowed) {
- if (!g_slist_find_custom(gc->account->permit,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->permit,
display_id, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_permit_add(gc->account, display_id, TRUE);
+ purple_privacy_permit_add(purple_connection_get_account(gc), display_id, TRUE);
}
} else {
- if (!g_slist_find_custom(gc->account->permit,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->permit,
display_id, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_deny_add(gc->account, display_id, TRUE);
+ purple_privacy_deny_add(purple_connection_get_account(gc), display_id, TRUE);
}
}
@@ -789,10 +789,10 @@ _create_privacy_item_deny_resp_cb(NMUser
if (display_id) {
- if (!g_slist_find_custom(gc->account->deny,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->deny,
display_id, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_deny_add(gc->account, display_id, TRUE);
+ purple_privacy_deny_add(purple_connection_get_account(gc), display_id, TRUE);
}
} else {
@@ -840,11 +840,11 @@ _create_privacy_item_permit_resp_cb(NMUs
if (display_id) {
- if (!g_slist_find_custom(gc->account->permit,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->permit,
display_id,
(GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_permit_add(gc->account, display_id, TRUE);
+ purple_privacy_permit_add(purple_connection_get_account(gc), display_id, TRUE);
}
} else {
@@ -1404,15 +1404,15 @@ _sync_privacy_lists(NMUser *user)
/* Set the Purple privacy setting */
if (user->default_deny) {
if (user->allow_list == NULL) {
- purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_DENY_ALL);
+ purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_DENY_ALL);
} else {
- purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_ALLOW_USERS);
+ purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_ALLOW_USERS);
}
} else {
if (user->deny_list == NULL) {
- purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_ALLOW_ALL);
+ purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_ALLOW_ALL);
} else {
- purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_DENY_USERS);
+ purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_DENY_USERS);
}
}
@@ -1424,9 +1424,9 @@ _sync_privacy_lists(NMUser *user)
else
name =(char *)node->data;
- if (!g_slist_find_custom(gc->account->permit,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->permit,
name, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_permit_add(gc->account, name , TRUE);
+ purple_privacy_permit_add(purple_connection_get_account(gc), name , TRUE);
}
}
@@ -1437,15 +1437,15 @@ _sync_privacy_lists(NMUser *user)
else
name =(char *)node->data;
- if (!g_slist_find_custom(gc->account->deny,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->deny,
name, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_deny_add(gc->account, name, TRUE);
+ purple_privacy_deny_add(purple_connection_get_account(gc), name, TRUE);
}
}
/* Remove stuff */
- for (node = gc->account->permit; node; node = node->next) {
+ for (node = purple_connection_get_account(gc)->permit; node; node = node->next) {
dn = nm_lookup_dn(user, (char *)node->data);
if (dn != NULL &&
!g_slist_find_custom(user->allow_list,
@@ -1456,13 +1456,13 @@ _sync_privacy_lists(NMUser *user)
if (rem_list) {
for (node = rem_list; node; node = node->next) {
- purple_privacy_permit_remove(gc->account, (char *)node->data, TRUE);
+ purple_privacy_permit_remove(purple_connection_get_account(gc), (char *)node->data, TRUE);
}
g_slist_free(rem_list);
rem_list = NULL;
}
- for (node = gc->account->deny; node; node = node->next) {
+ for (node = purple_connection_get_account(gc)->deny; node; node = node->next) {
dn = nm_lookup_dn(user, (char *)node->data);
if (dn != NULL &&
!g_slist_find_custom(user->deny_list,
@@ -1473,7 +1473,7 @@ _sync_privacy_lists(NMUser *user)
if (rem_list) {
for (node = rem_list; node; node = node->next) {
- purple_privacy_deny_remove(gc->account, (char *)node->data, TRUE);
+ purple_privacy_deny_remove(purple_connection_get_account(gc), (char *)node->data, TRUE);
}
g_slist_free(rem_list);
}
@@ -3091,7 +3091,7 @@ novell_add_permit(PurpleConnection *gc,
/* Remove first -- we will add it back in when we get
* the okay from the server
*/
- purple_privacy_permit_remove(gc->account, who, TRUE);
+ purple_privacy_permit_remove(purple_connection_get_account(gc), who, TRUE);
if (nm_user_is_privacy_locked(user)) {
_show_privacy_locked_error(gc, user);
@@ -3135,7 +3135,7 @@ novell_add_deny(PurpleConnection *gc, co
/* Remove first -- we will add it back in when we get
* the okay from the server
*/
- purple_privacy_deny_remove(gc->account, who, TRUE);
+ purple_privacy_deny_remove(purple_connection_get_account(gc), who, TRUE);
if (nm_user_is_privacy_locked(user)) {
_show_privacy_locked_error(gc, user);
@@ -3253,7 +3253,7 @@ novell_set_permit_deny(PurpleConnection
return;
}
- switch (purple_account_get_privacy_type(gc->account)) {
+ switch (purple_account_get_privacy_type(purple_connection_get_account(gc))) {
case PURPLE_PRIVACY_ALLOW_ALL:
rc = nm_send_set_privacy_default(user, FALSE,
@@ -3309,14 +3309,14 @@ novell_set_permit_deny(PurpleConnection
if (user_record) {
name = nm_user_record_get_display_id(user_record);
- if (!g_slist_find_custom(gc->account->permit,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->permit,
name, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_permit_add(gc->account, name , TRUE);
+ purple_privacy_permit_add(purple_connection_get_account(gc), name , TRUE);
}
}
}
- for (node = gc->account->permit; node; node = node->next) {
+ for (node = purple_connection_get_account(gc)->permit; node; node = node->next) {
name = NULL;
dn = nm_lookup_dn(user, (char *)node->data);
if (dn) {
@@ -3330,7 +3330,7 @@ novell_set_permit_deny(PurpleConnection
g_strdup(dn));
}
} else {
- purple_privacy_permit_remove(gc->account, (char *)node->data, TRUE);
+ purple_privacy_permit_remove(purple_connection_get_account(gc), (char *)node->data, TRUE);
}
}
}
@@ -3351,14 +3351,14 @@ novell_set_permit_deny(PurpleConnection
if (user_record) {
name = nm_user_record_get_display_id(user_record);
- if (!g_slist_find_custom(gc->account->deny,
+ if (!g_slist_find_custom(purple_connection_get_account(gc)->deny,
name, (GCompareFunc)purple_utf8_strcasecmp)) {
- purple_privacy_deny_add(gc->account, name , TRUE);
+ purple_privacy_deny_add(purple_connection_get_account(gc), name , TRUE);
}
}
}
- for (node = gc->account->deny; node; node = node->next) {
+ for (node = purple_connection_get_account(gc)->deny; node; node = node->next) {
name = NULL;
dn = nm_lookup_dn(user, (char *)node->data);
@@ -3373,7 +3373,7 @@ novell_set_permit_deny(PurpleConnection
g_strdup(name));
}
} else {
- purple_privacy_deny_remove(gc->account, (char *)node->data, TRUE);
+ purple_privacy_deny_remove(purple_connection_get_account(gc), (char *)node->data, TRUE);
}
}
============================================================
--- libpurple/protocols/silc/buddy.c 2f9065820e233bcf1fa920c3f37cc962132e6548
+++ libpurple/protocols/silc/buddy.c d60f89c7dc3a8ea189662509b32d4424937d55cb
@@ -314,7 +314,7 @@ void silcpurple_buddy_keyagr_request(Sil
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));
}
@@ -457,7 +457,7 @@ silcpurple_buddy_privkey(PurpleConnectio
_("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);
}
@@ -686,7 +686,7 @@ void silcpurple_get_info(PurpleConnectio
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. */
============================================================
--- libpurple/protocols/silc/silc.c 6ed985aab444b003fca699035914a52540901bfa
+++ libpurple/protocols/silc/silc.c b233f2caf5e9b676eba0503c067ec0a5aab947e8
@@ -1061,7 +1061,7 @@ silcpurple_attrs(PurplePluginAction *act
fields,
_("OK"), G_CALLBACK(silcpurple_attrs_cb),
_("Cancel"), G_CALLBACK(silcpurple_attrs_cancel),
- gc->account, NULL, NULL, gc);
+ purple_connection_get_account(gc), NULL, NULL, gc);
}
static void
@@ -1226,9 +1226,9 @@ silcpurple_create_keypair(PurplePluginAc
g_snprintf(pkd2, sizeof(pkd2), "%s" G_DIR_SEPARATOR_S"public_key.pub", silcpurple_silcdir());
g_snprintf(prd2, sizeof(prd2), "%s" G_DIR_SEPARATOR_S"private_key.prv", silcpurple_silcdir());
g_snprintf(pkd, sizeof(pkd) - 1, "%s",
- purple_account_get_string(gc->account, "public-key", pkd2));
+ purple_account_get_string(purple_connection_get_account(gc), "public-key", pkd2));
g_snprintf(prd, sizeof(prd) - 1, "%s",
- purple_account_get_string(gc->account, "private-key", prd2));
+ purple_account_get_string(purple_connection_get_account(gc), "private-key", prd2));
fields = purple_request_fields_new();
@@ -1269,7 +1269,7 @@ silcpurple_create_keypair(PurplePluginAc
_("Create New SILC Key Pair"), NULL, fields,
_("Generate Key Pair"), G_CALLBACK(silcpurple_create_keypair_cb),
_("Cancel"), G_CALLBACK(silcpurple_create_keypair_cancel),
- gc->account, NULL, NULL, gc);
+ purple_connection_get_account(gc), NULL, NULL, gc);
g_strfreev(u);
silc_free(hostname);
@@ -1287,7 +1287,7 @@ silcpurple_change_passwd(PurpleConnectio
{
char prd[256];
g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.pub", silcpurple_silcdir());
- silc_change_private_key_passphrase(purple_account_get_string(gc->account,
+ silc_change_private_key_passphrase(purple_account_get_string(purple_connection_get_account(gc),
"private-key",
prd), old ? old : "", new ? new : "");
}
@@ -1555,7 +1555,7 @@ static PurpleCmdRet silcpurple_cmd_chat_
if(args && args[0])
convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, args[0],
- gc->account);
+ purple_connection_get_account(gc));
if (convo != NULL)
id = purple_conv_chat_get_id(PURPLE_CONV_CHAT(convo));
@@ -1593,7 +1593,7 @@ static PurpleCmdRet silcpurple_cmd_chat_
g_free(tmp2);
} else
buf = g_strdup(_("No topic is set"));
- purple_conv_chat_write(PURPLE_CONV_CHAT(conv), purple_account_get_username(gc->account), buf,
+ purple_conv_chat_write(PURPLE_CONV_CHAT(conv), purple_account_get_username(purple_connection_get_account(gc)), buf,
PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NO_LOG, time(NULL));
g_free(buf);
============================================================
--- libpurple/protocols/silc/util.c 4462ecbaa7259da78c059e9633985232fd41fec1
+++ libpurple/protocols/silc/util.c f75c9de61ff9240d1c510ec3a815a5d407951e14
@@ -198,9 +198,9 @@ gboolean silcpurple_check_silc_dir(Purpl
g_snprintf(pkd, sizeof(pkd), "%s" G_DIR_SEPARATOR_S "public_key.pub", silcpurple_silcdir());
g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcpurple_silcdir());
g_snprintf(file_public_key, sizeof(file_public_key) - 1, "%s",
- purple_account_get_string(gc->account, "public-key", pkd));
+ purple_account_get_string(purple_connection_get_account(gc), "public-key", pkd));
g_snprintf(file_private_key, sizeof(file_public_key) - 1, "%s",
- purple_account_get_string(gc->account, "private-key", prd));
+ purple_account_get_string(purple_connection_get_account(gc), "private-key", prd));
if ((g_stat(file_public_key, &st)) == -1) {
/* If file doesn't exist */
============================================================
--- ChangeLog.API dae8829c0531207174568e78a0d4d79e4bde08f5
+++ ChangeLog.API 3a8646ece102ff70172e3185f85d4f8a844a79d9
@@ -11,6 +11,8 @@ version 3.0.0 (??/??/????):
* purple_conv_chat_cb_is_buddy
* purple_conv_chat_cb_get_ui_data
* purple_conv_chat_cb_set_ui_data
+ * purple_connection_get_flags
+ * purple_connection_set_flags
* purple_conversation_get_ui_data
* purple_conversation_set_ui_data
* purple_notify_searchresult_column_is_visible
============================================================
--- libpurple/protocols/yahoo/yahoo_picture.c 61e630b731cb279b56189fac6ef62aeb4068ba2e
+++ libpurple/protocols/yahoo/yahoo_picture.c bf6a28c006da60144f4a308518c579a64d348e7a
@@ -170,7 +170,7 @@ void yahoo_process_picture_checksum(Purp
}
if (who) {
- PurpleBuddy *b = purple_find_buddy(gc->account, who);
+ PurpleBuddy *b = purple_find_buddy(purple_connection_get_account(gc), who);
const char *locksum = NULL;
/* FIXME: Cleanup this strtol() stuff if possible. */
@@ -251,7 +251,7 @@ void yahoo_process_avatar_update(PurpleC
yahoo_send_picture_request(gc, who);
else if ((avatar == 0) || (avatar == 1)) {
YahooFriend *f;
- purple_buddy_icons_set_for_user(gc->account, who, NULL, 0, NULL);
+ purple_buddy_icons_set_for_user(purple_connection_get_account(gc), who, NULL, 0, NULL);
if ((f = yahoo_friend_find(gc, who)))
yahoo_friend_set_buddy_icon_need_request(f, TRUE);
purple_debug_misc("yahoo", "Setting user %s's icon to NULL.\n", who);
@@ -536,7 +536,7 @@ void yahoo_set_buddy_icon(PurpleConnecti
void yahoo_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img)
{
YahooData *yd = purple_connection_get_protocol_data(gc);
- PurpleAccount *account = gc->account;
+ PurpleAccount *account = purple_connection_get_account(gc);
if (img == NULL) {
g_free(yd->picture_url);
============================================================
--- libpurple/protocols/sametime/sametime.c 0189440cce4e9b629d72c4b663b7c476bac3a59b
+++ libpurple/protocols/sametime/sametime.c 01b88f1ea6d2acdc09affd957c78da5cb553dcc3
@@ -2531,7 +2531,7 @@ static void convo_nofeatures(struct mwCo
gc = purple_conversation_get_gc(gconv);
if(! gc) return;
- purple_conversation_set_features(gconv, gc->flags);
+ purple_conversation_set_features(gconv, purple_connection_get_flags(gc));
}
@@ -3701,7 +3701,7 @@ static void mw_prpl_login(PurpleAccount
pd = mwPurplePluginData_new(gc);
/* while we do support images, the default is to not offer it */
- gc->flags |= PURPLE_CONNECTION_NO_IMAGES;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_NO_IMAGES);
user = g_strdup(purple_account_get_username(account));
============================================================
--- libpurple/protocols/simple/simple.c a84a57e583a309f3c9465226de323d0ccc57ffb0
+++ libpurple/protocols/simple/simple.c 989eaa58120255ad49c2dbd8f543e83d6f2050e0
@@ -1121,8 +1121,8 @@ gboolean process_register_response(struc
if(sip->registerstatus != SIMPLE_REGISTER_RETRY) {
purple_debug_info("simple", "REGISTER retries %d\n", sip->registrar.retries);
if(sip->registrar.retries > SIMPLE_REGISTER_RETRY_MAX) {
- if (!purple_account_get_remember_password(sip->gc->account))
- purple_account_set_password(sip->gc->account, NULL);
+ if (!purple_account_get_remember_password(purple_connection_get_account(sip->gc)))
+ purple_account_set_password(purple_connection_get_account(sip->gc), NULL);
purple_connection_error(sip->gc,
PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED,
_("Incorrect password"));
============================================================
--- libpurple/protocols/yahoo/yahoo_doodle.c 3b344a61eeb99f4568d529ab1207493e4f766355
+++ libpurple/protocols/yahoo/yahoo_doodle.c 09a8b3f663e4e5c90efdcafca3ee9866b5ea410e
@@ -394,7 +394,7 @@ static void yahoo_doodle_command_send_ge
/* Make and send an acknowledge (ready) Doodle packet */
pkt = yahoo_packet_new(YAHOO_SERVICE_P2PFILEXFER, YAHOO_STATUS_AVAILABLE, yd->session_id);
yahoo_packet_hash_str(pkt, 49, "IMVIRONMENT");
- yahoo_packet_hash_str(pkt, 1, purple_account_get_username(gc->account));
+ yahoo_packet_hash_str(pkt, 1, purple_account_get_username(purple_connection_get_account(gc)));
yahoo_packet_hash_str(pkt, 14, message);
yahoo_packet_hash_int(pkt, 13, command);
yahoo_packet_hash_str(pkt, 5, to);
============================================================
--- libpurple/protocols/bonjour/bonjour.c 9f813028d6110417afc4ad797896eed95b947881
+++ libpurple/protocols/bonjour/bonjour.c 20d08bfffae6d5d3119fb70a405854c8b0e09662
@@ -102,7 +102,7 @@ bonjour_login(PurpleAccount *account)
}
#endif /* _WIN32 */
- gc->flags |= PURPLE_CONNECTION_HTML;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_HTML);
bd = g_new0(BonjourData, 1);
purple_connection_set_protocol_data(gc, bd);
@@ -309,7 +309,7 @@ bonjour_convo_closed(PurpleConnection *c
static void
bonjour_convo_closed(PurpleConnection *connection, const char *who)
{
- PurpleBuddy *buddy = purple_find_buddy(connection->account, who);
+ PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who);
BonjourBuddy *bb;
if (buddy == NULL || (bb = purple_buddy_get_protocol_data(buddy)) == NULL)
@@ -439,7 +439,7 @@ bonjour_group_buddy(PurpleConnection *co
static void
bonjour_group_buddy(PurpleConnection *connection, const char *who, const char *old_group, const char *new_group)
{
- PurpleBuddy *buddy = purple_find_buddy(connection->account, who);
+ PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who);
bonjour_do_group_change(buddy, new_group);
@@ -464,7 +464,7 @@ bonjour_can_receive_file(PurpleConnectio
static gboolean
bonjour_can_receive_file(PurpleConnection *connection, const char *who)
{
- PurpleBuddy *buddy = purple_find_buddy(connection->account, who);
+ PurpleBuddy *buddy = purple_find_buddy(purple_connection_get_account(connection), who);
return (buddy != NULL && purple_buddy_get_protocol_data(buddy) != NULL);
}
============================================================
--- finch/gntconv.c 98aff9b4030d0024b30284b7234049f7d135a8b3
+++ finch/gntconv.c 57f9659eb07dc1876e832e03d93bb4048b63a917
@@ -683,7 +683,7 @@ create_conv_from_userlist(GntWidget *wid
name = gnt_tree_get_selection_data(GNT_TREE(widget));
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_cb_real_name))
realname = prpl_info->get_cb_real_name(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(fc->active_conv)), name);
else
============================================================
--- pidgin/gtkdocklet.c c663c0d1dbf37dde4c0cb01766504ad7ca12b3d7
+++ pidgin/gtkdocklet.c 955acba569d4ade062eea3e27a1306a26cd89d9e
@@ -272,7 +272,7 @@ online_account_supports_chat(void)
while(c != NULL) {
PurpleConnection *gc = c->data;
- PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (prpl_info != NULL && prpl_info->chat_info != NULL)
return TRUE;
c = c->next;
@@ -309,7 +309,7 @@ docklet_signed_on_cb(PurpleConnection *g
docklet_signed_on_cb(PurpleConnection *gc)
{
if (!enable_join_chat) {
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info != NULL)
enable_join_chat = TRUE;
}
docklet_update_status();
@@ -319,7 +319,7 @@ docklet_signed_off_cb(PurpleConnection *
docklet_signed_off_cb(PurpleConnection *gc)
{
if (enable_join_chat) {
- if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
+ if (PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))->chat_info != NULL)
enable_join_chat = online_account_supports_chat();
}
docklet_update_status();
============================================================
--- pidgin/plugins/xmppconsole.c 479fbed8e1b986efd0b809952f684dc6c3d2f42b
+++ pidgin/plugins/xmppconsole.c 40060ff6566b3b0a82c754ca90ca6b0402a95d00
@@ -190,7 +190,7 @@ static void message_send_cb(GtkWidget *w
gc = console->gc;
if (gc)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(console->entry));
gtk_text_buffer_get_start_iter(buffer, &start);
@@ -643,7 +643,7 @@ signing_on_cb(PurpleConnection *gc)
if (!console)
return;
- gtk_combo_box_append_text(GTK_COMBO_BOX(console->dropdown), purple_account_get_username(gc->account));
+ gtk_combo_box_append_text(GTK_COMBO_BOX(console->dropdown), purple_account_get_username(purple_connection_get_account(gc)));
console->accounts = g_list_append(console->accounts, gc);
console->count++;
============================================================
--- libpurple/protocols/myspace/myspace.c b79382e6706dac93900f75d37e4ccdf08ec20596
+++ libpurple/protocols/myspace/myspace.c 4a4b86fb10abe648db6c81a4e6a7afdbc7e7f9a5
@@ -2190,7 +2190,7 @@ msim_login(PurpleAccount *acct)
gc = purple_account_get_connection(acct);
purple_connection_set_protocol_data(gc, msim_session_new(acct));
- gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_URLDESC;
+ purple_connection_set_flags(gc, PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_URLDESC);
/*
* Lets wipe out our local list of blocked buddies. We'll get a
============================================================
--- libpurple/protocols/null/nullprpl.c 42ae7f5ee4621e23102d5b871240efd09b152e04
+++ libpurple/protocols/null/nullprpl.c 88706b2138257271af530fdb111f5974804b7401
@@ -113,7 +113,7 @@ static void call_if_nullprpl(gpointer da
PurpleConnection *gc = (PurpleConnection *)(data);
GcFuncData *gcfdata = (GcFuncData *)userdata;
- if (!strcmp(purple_account_get_protocol_id(gc->account), NULLPRPL_ID))
+ if (!strcmp(purple_account_get_protocol_id(purple_connection_get_account(gc)), NULLPRPL_ID))
gcfdata->fn(gcfdata->from, gc, gcfdata->userdata);
}
@@ -160,11 +160,11 @@ static void discover_status(PurpleConnec
static void discover_status(PurpleConnection *from, PurpleConnection *to,
gpointer userdata) {
- const char *from_username = purple_account_get_username(from->account);
- const char *to_username = purple_account_get_username(to->account);
+ const char *from_username = purple_account_get_username(purple_connection_get_account(from));
+ const char *to_username = purple_account_get_username(purple_connection_get_account(to));
- if (purple_find_buddy(from->account, to_username)) {
- PurpleStatus *status = purple_account_get_active_status(to->account);
+ if (purple_find_buddy(purple_connection_get_account(from), to_username)) {
+ PurpleStatus *status = purple_account_get_active_status(purple_connection_get_account(to));
const char *status_id = purple_status_get_id(status);
const char *message = purple_status_get_attr_string(status, "message");
@@ -173,7 +173,7 @@ static void discover_status(PurpleConnec
!strcmp(status_id, NULL_STATUS_OFFLINE)) {
purple_debug_info("nullprpl", "%s sees that %s is %s: %s\n",
from_username, to_username, status_id, message);
- purple_prpl_got_user_status(from->account, to_username, status_id,
+ purple_prpl_got_user_status(purple_connection_get_account(from), to_username, status_id,
(message) ? "message" : NULL, message, NULL);
} else {
purple_debug_error("nullprpl",
@@ -186,7 +186,7 @@ static void report_status_change(PurpleC
static void report_status_change(PurpleConnection *from, PurpleConnection *to,
gpointer userdata) {
purple_debug_info("nullprpl", "notifying %s that %s changed status\n",
- purple_account_get_username(to->account), purple_account_get_username(from->account));
+ purple_account_get_username(purple_connection_get_account(to)), purple_account_get_username(purple_connection_get_account(from)));
discover_status(to, from, NULL);
}
@@ -265,7 +265,7 @@ static void nullprpl_tooltip_text(Purple
g_free(msg);
if (full) {
- const char *user_info = purple_account_get_user_info(gc->account);
+ const char *user_info = purple_account_get_user_info(purple_connection_get_account(gc));
if (user_info)
/* TODO: Check whether it's correct to call add_pair_html,
or if we should be using add_pair_plaintext */
@@ -413,7 +413,7 @@ static int nullprpl_send_im(PurpleConnec
static int nullprpl_send_im(PurpleConnection *gc, const char *who,
const char *message, PurpleMessageFlags flags)
{
- const char *from_username = purple_account_get_username(gc->account);
+ const char *from_username = purple_account_get_username(purple_connection_get_account(gc));
PurpleMessageFlags receive_flags = ((flags & ~PURPLE_MESSAGE_SEND)
| PURPLE_MESSAGE_RECV);
PurpleAccount *to_acct = purple_accounts_find(who, NULLPRPL_ID);
@@ -423,13 +423,13 @@ static int nullprpl_send_im(PurpleConnec
from_username, who, message);
/* is the sender blocked by the recipient's privacy settings? */
- if (to_acct && !purple_privacy_check(to_acct, purple_account_get_username(gc->account))) {
+ if (to_acct && !purple_privacy_check(to_acct, purple_account_get_username(purple_connection_get_account(gc)))) {
char *msg = g_strdup_printf(
_("Your message was blocked by %s's privacy settings."), who);
purple_debug_info("nullprpl",
"discarding; %s is blocked by %s's privacy settings\n",
from_username, who);
- purple_conv_present_error(who, gc->account, msg);
+ purple_conv_present_error(who, purple_connection_get_account(gc), msg);
g_free(msg);
return 0;
}
@@ -461,7 +461,7 @@ static void nullprpl_set_info(PurpleConn
static void nullprpl_set_info(PurpleConnection *gc, const char *info) {
purple_debug_info("nullprpl", "setting %s's user info to %s\n",
- purple_account_get_username(gc->account), info);
+ purple_account_get_username(purple_connection_get_account(gc)), info);
}
static const char *typing_state_to_string(PurpleTypingState typing) {
@@ -475,10 +475,10 @@ static void notify_typing(PurpleConnecti
static void notify_typing(PurpleConnection *from, PurpleConnection *to,
gpointer typing) {
- const char *from_username = purple_account_get_username(from->account);
+ const char *from_username = purple_account_get_username(purple_connection_get_account(from));
const char *action = typing_state_to_string((PurpleTypingState)typing);
purple_debug_info("nullprpl", "notifying %s that %s %s\n",
- purple_account_get_username(to->account), from_username, action);
+ purple_account_get_username(purple_connection_get_account(to)), from_username, action);
serv_got_typing(to,
from_username,
@@ -489,7 +489,7 @@ static unsigned int nullprpl_send_typing
static unsigned int nullprpl_send_typing(PurpleConnection *gc, const char *name,
PurpleTypingState typing) {
- purple_debug_info("nullprpl", "%s %s\n", purple_account_get_username(gc->account),
+ purple_debug_info("nullprpl", "%s %s\n", purple_account_get_username(purple_connection_get_account(gc)),
typing_state_to_string(typing));
foreach_nullprpl_gc(notify_typing, gc, (gpointer)typing);
return 0;
@@ -501,7 +501,7 @@ static void nullprpl_get_info(PurpleConn
PurpleAccount *acct;
purple_debug_info("nullprpl", "Fetching %s's user info for %s\n", username,
- purple_account_get_username(gc->account));
+ purple_account_get_username(purple_connection_get_account(gc)));
if (!get_nullprpl_gc(username)) {
char *msg = g_strdup_printf(_("%s is not logged in."), username);
@@ -538,26 +538,26 @@ static void nullprpl_set_idle(PurpleConn
static void nullprpl_set_idle(PurpleConnection *gc, int idletime) {
purple_debug_info("nullprpl",
"purple reports that %s has been idle for %d seconds\n",
- purple_account_get_username(gc->account), idletime);
+ purple_account_get_username(purple_connection_get_account(gc)), idletime);
}
static void nullprpl_change_passwd(PurpleConnection *gc, const char *old_pass,
const char *new_pass) {
purple_debug_info("nullprpl", "%s wants to change their password\n",
- purple_account_get_username(gc->account));
+ purple_account_get_username(purple_connection_get_account(gc)));
}
static void nullprpl_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy,
PurpleGroup *group, const char *message)
{
- const char *username = purple_account_get_username(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
PurpleConnection *buddy_gc = get_nullprpl_gc(buddy->name);
purple_debug_info("nullprpl", "adding %s to %s's buddy list\n", buddy->name,
username);
if (buddy_gc) {
- PurpleAccount *buddy_acct = buddy_gc->account;
+ PurpleAccount *buddy_acct = purple_connection_get_account(buddy_gc);
discover_status(gc, buddy_gc, NULL);
@@ -594,7 +594,7 @@ static void nullprpl_remove_buddy(Purple
PurpleGroup *group)
{
purple_debug_info("nullprpl", "removing %s from %s's buddy list\n",
- buddy->name, purple_account_get_username(gc->account));
+ buddy->name, purple_account_get_username(purple_connection_get_account(gc)));
}
static void nullprpl_remove_buddies(PurpleConnection *gc, GList *buddies,
@@ -620,22 +620,22 @@ static void nullprpl_add_permit(PurpleCo
*/
static void nullprpl_add_permit(PurpleConnection *gc, const char *name) {
purple_debug_info("nullprpl", "%s adds %s to their allowed list\n",
- purple_account_get_username(gc->account), name);
+ purple_account_get_username(purple_connection_get_account(gc)), name);
}
static void nullprpl_add_deny(PurpleConnection *gc, const char *name) {
purple_debug_info("nullprpl", "%s adds %s to their blocked list\n",
- purple_account_get_username(gc->account), name);
+ purple_account_get_username(purple_connection_get_account(gc)), name);
}
static void nullprpl_rem_permit(PurpleConnection *gc, const char *name) {
purple_debug_info("nullprpl", "%s removes %s from their allowed list\n",
- purple_account_get_username(gc->account), name);
+ purple_account_get_username(purple_connection_get_account(gc)), name);
}
static void nullprpl_rem_deny(PurpleConnection *gc, const char *name) {
purple_debug_info("nullprpl", "%s removes %s from their blocked list\n",
- purple_account_get_username(gc->account), name);
+ purple_account_get_username(purple_connection_get_account(gc)), name);
}
static void nullprpl_set_permit_deny(PurpleConnection *gc) {
@@ -668,7 +668,7 @@ static void nullprpl_join_chat(PurpleCon
}
static void nullprpl_join_chat(PurpleConnection *gc, GHashTable *components) {
- const char *username = purple_account_get_username(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
const char *room = g_hash_table_lookup(components, "room");
int chat_id = g_str_hash(room);
purple_debug_info("nullprpl", "%s is joining chat room %s\n", username, room);
@@ -692,7 +692,7 @@ static void nullprpl_reject_chat(PurpleC
static void nullprpl_reject_chat(PurpleConnection *gc, GHashTable *components) {
const char *invited_by = g_hash_table_lookup(components, "invited_by");
const char *room = g_hash_table_lookup(components, "room");
- const char *username = purple_account_get_username(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
PurpleConnection *invited_by_gc = get_nullprpl_gc(invited_by);
char *message = g_strdup_printf(
"%s %s %s.",
@@ -719,7 +719,7 @@ static void nullprpl_chat_invite(PurpleC
static void nullprpl_chat_invite(PurpleConnection *gc, int id,
const char *message, const char *who) {
- const char *username = purple_account_get_username(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
PurpleConversation *conv = purple_find_chat(gc, id);
const char *room = purple_conversation_get_name(conv);
PurpleAccount *to_acct = purple_accounts_find(who, NULLPRPL_ID);
@@ -762,7 +762,7 @@ static void nullprpl_chat_leave(PurpleCo
static void nullprpl_chat_leave(PurpleConnection *gc, int id) {
PurpleConversation *conv = purple_find_chat(gc, id);
purple_debug_info("nullprpl", "%s is leaving chat room %s\n",
- purple_account_get_username(gc->account), purple_conversation_get_name(conv));
+ purple_account_get_username(purple_connection_get_account(gc)), purple_conversation_get_name(conv));
/* tell everyone that we left */
foreach_gc_in_chat(left_chat_room, gc, id, NULL);
@@ -821,7 +821,7 @@ static void nullprpl_chat_whisper(Purple
static void nullprpl_chat_whisper(PurpleConnection *gc, int id, const char *who,
const char *message) {
- const char *username = purple_account_get_username(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
PurpleConversation *conv = purple_find_chat(gc, id);
purple_debug_info("nullprpl",
"%s receives whisper from %s in chat room %s: %s\n",
@@ -846,7 +846,7 @@ static int nullprpl_chat_send(PurpleConn
static int nullprpl_chat_send(PurpleConnection *gc, int id, const char *message,
PurpleMessageFlags flags) {
- const char *username = purple_account_get_username(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
PurpleConversation *conv = purple_find_chat(gc, id);
if (conv) {
@@ -875,7 +875,7 @@ static void nullprpl_get_cb_info(PurpleC
PurpleConversation *conv = purple_find_chat(gc, id);
purple_debug_info("nullprpl",
"retrieving %s's info for %s in chat room %s\n", who,
- purple_account_get_username(gc->account), purple_conversation_get_name(conv));
+ purple_account_get_username(purple_connection_get_account(gc)), purple_conversation_get_name(conv));
nullprpl_get_info(gc, who);
}
@@ -883,25 +883,25 @@ static void nullprpl_alias_buddy(PurpleC
static void nullprpl_alias_buddy(PurpleConnection *gc, const char *who,
const char *alias) {
purple_debug_info("nullprpl", "%s sets %s's alias to %s\n",
- purple_account_get_username(gc->account), who, alias);
+ purple_account_get_username(purple_connection_get_account(gc)), who, alias);
}
static void nullprpl_group_buddy(PurpleConnection *gc, const char *who,
const char *old_group,
const char *new_group) {
purple_debug_info("nullprpl", "%s has moved %s from group %s to group %s\n",
- purple_account_get_username(gc->account), who, old_group, new_group);
+ purple_account_get_username(purple_connection_get_account(gc)), who, old_group, new_group);
}
static void nullprpl_rename_group(PurpleConnection *gc, const char *old_name,
PurpleGroup *group, GList *moved_buddies) {
purple_debug_info("nullprpl", "%s has renamed group %s to %s\n",
- purple_account_get_username(gc->account), old_name, group->name);
+ purple_account_get_username(purple_connection_get_account(gc)), old_name, group->name);
}
static void nullprpl_convo_closed(PurpleConnection *gc, const char *who) {
purple_debug_info("nullprpl", "%s's conversation with %s was closed\n",
- purple_account_get_username(gc->account), who);
+ purple_account_get_username(purple_connection_get_account(gc)), who);
}
/* normalize a username (e.g. remove whitespace, add default domain, etc.)
@@ -915,13 +915,13 @@ static void nullprpl_set_buddy_icon(Purp
static void nullprpl_set_buddy_icon(PurpleConnection *gc,
PurpleStoredImage *img) {
purple_debug_info("nullprpl", "setting %s's buddy icon to %s\n",
- purple_account_get_username(gc->account),
+ purple_account_get_username(purple_connection_get_account(gc)),
img ? purple_imgstore_get_filename(img) : "(null)");
}
static void nullprpl_remove_group(PurpleConnection *gc, PurpleGroup *group) {
purple_debug_info("nullprpl", "%s has removed group %s\n",
- purple_account_get_username(gc->account), group->name);
+ purple_account_get_username(purple_connection_get_account(gc)), group->name);
}
@@ -954,7 +954,7 @@ static void nullprpl_set_chat_topic(Purp
return;
purple_debug_info("nullprpl", "%s sets topic of chat room '%s' to '%s'\n",
- purple_account_get_username(gc->account), purple_conversation_get_name(conv), topic);
+ purple_account_get_username(purple_connection_get_account(gc)), purple_conversation_get_name(conv), topic);
last_topic = purple_conv_chat_get_topic(chat);
if ((!topic && !last_topic) ||
@@ -970,8 +970,8 @@ static PurpleRoomlist *nullprpl_roomlist
}
static PurpleRoomlist *nullprpl_roomlist_get_list(PurpleConnection *gc) {
- const char *username = purple_account_get_username(gc->account);
- PurpleRoomlist *roomlist = purple_roomlist_new(gc->account);
+ const char *username = purple_account_get_username(purple_connection_get_account(gc));
+ PurpleRoomlist *roomlist = purple_roomlist_new(purple_connection_get_account(gc));
GList *fields = NULL;
PurpleRoomlistField *field;
GList *chats;
============================================================
--- libpurple/protocols/jabber/usermood.c 8cde198e54f822942f383ebb74f344dd36f8f4b2
+++ libpurple/protocols/jabber/usermood.c 892cc11f7a3655233ee93f88e22ab9f251880681
@@ -155,12 +155,12 @@ static void jabber_mood_cb(JabberStream
break;
}
if (newmood != NULL) {
- purple_prpl_got_user_status(js->gc->account, from, "mood",
+ purple_prpl_got_user_status(purple_connection_get_account(js->gc), from, "mood",
PURPLE_MOOD_NAME, newmood,
PURPLE_MOOD_COMMENT, moodtext,
NULL);
} else {
- purple_prpl_got_user_status_deactive(js->gc->account, from, "mood");
+ purple_prpl_got_user_status_deactive(purple_connection_get_account(js->gc), from, "mood");
}
g_free(moodtext);
}
============================================================
--- libpurple/protocols/jabber/usertune.c 1029198d93a16464bfac2880c822433eeede1868
+++ libpurple/protocols/jabber/usertune.c 528cb1aad7ef0cab6a91d67731126b9463b1e4d3
@@ -92,7 +92,7 @@ static void jabber_tune_cb(JabberStream
}
if (valid) {
- purple_prpl_got_user_status(js->gc->account, from, "tune",
+ purple_prpl_got_user_status(purple_connection_get_account(js->gc), from, "tune",
PURPLE_TUNE_ARTIST, tuneinfodata.artist,
PURPLE_TUNE_TITLE, tuneinfodata.title,
PURPLE_TUNE_ALBUM, tuneinfodata.album,
@@ -100,7 +100,7 @@ static void jabber_tune_cb(JabberStream
PURPLE_TUNE_TIME, tuneinfodata.time,
PURPLE_TUNE_URL, tuneinfodata.url, NULL);
} else {
- purple_prpl_got_user_status_deactive(js->gc->account, from, "tune");
+ purple_prpl_got_user_status_deactive(purple_connection_get_account(js->gc), from, "tune");
}
g_free(tuneinfodata.artist);
============================================================
--- libpurple/protocols/yahoo/yahoo_aliases.c d713171455673e9fcb72a713ef03e98eb7f7c8f1
+++ libpurple/protocols/yahoo/yahoo_aliases.c e35d62c46291e5b99d8f934ce38cb8cfc83722d2
@@ -331,7 +331,7 @@ yahoo_update_alias(PurpleConnection *gc,
gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp);
content = g_strdup_printf("<ab k=\"%s\" cc=\"9\">\n"
"<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n",
- purple_account_get_username(gc->account),
+ purple_account_get_username(purple_connection_get_account(gc)),
who, converted_alias_jp);
g_free(converted_alias_jp);
g_free(alias_jp);
@@ -339,7 +339,7 @@ yahoo_update_alias(PurpleConnection *gc,
gchar *escaped_alias = g_markup_escape_text(alias, -1);
content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"9\">\n"
"<ct a=\"1\" yi='%s' nn='%s' />\n</ab>\r\n",
- purple_account_get_username(gc->account),
+ purple_account_get_username(purple_connection_get_account(gc)),
who, escaped_alias);
g_free(escaped_alias);
}
@@ -351,7 +351,7 @@ yahoo_update_alias(PurpleConnection *gc,
gchar *converted_alias_jp = yahoo_convert_to_numeric(alias_jp);
content = g_strdup_printf("<ab k=\"%s\" cc=\"1\">\n"
"<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
- purple_account_get_username(gc->account),
+ purple_account_get_username(purple_connection_get_account(gc)),
who, cb->id, converted_alias_jp);
g_free(converted_alias_jp);
g_free(alias_jp);
@@ -359,7 +359,7 @@ yahoo_update_alias(PurpleConnection *gc,
gchar *escaped_alias = g_markup_escape_text(alias, -1);
content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n"
"<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
- purple_account_get_username(gc->account),
+ purple_account_get_username(purple_connection_get_account(gc)),
who, cb->id, escaped_alias);
g_free(escaped_alias);
}
============================================================
--- libpurple/protocols/myspace/zap.c aa407ae973da2b8f08cb39fc63986ed5b8143213
+++ libpurple/protocols/myspace/zap.c 38bff3f6d6b192c92648ce6e48160dea92ae3504
@@ -135,7 +135,7 @@ msim_send_attention(PurpleConnection *gc
session = purple_connection_get_protocol_data(gc);
/* Look for this attention type, by the code index given. */
- types = msim_attention_types(gc->account);
+ types = msim_attention_types(purple_connection_get_account(gc));
attn = (PurpleAttentionType *)g_list_nth_data(types, code);
if (!attn) {
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c c1c0667e92e2c3d7fb576ced836140404cdc13fe
+++ libpurple/protocols/bonjour/bonjour_ft.c 51692642d601a94d6bb0edff8d296482502f9931
@@ -333,7 +333,7 @@ bonjour_new_xfer(PurpleConnection *gc, c
return NULL;
/* Build the file transfer handle */
- xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who);
+ xfer = purple_xfer_new(purple_connection_get_account(gc), PURPLE_XFER_SEND, who);
xep_xfer = g_new0(XepXfer, 1);
purple_xfer_set_protocol_data(xfer, xep_xfer);
xep_xfer->data = bd;
@@ -592,7 +592,7 @@ bonjour_xfer_receive(PurpleConnection *p
purple_debug_info("bonjour", "bonjour-xfer-receive.\n");
/* Build the file transfer handle */
- xfer = purple_xfer_new(pc->account, PURPLE_XFER_RECEIVE, from);
+ xfer = purple_xfer_new(purple_connection_get_account(pc), PURPLE_XFER_RECEIVE, from);
xf = g_new0(XepXfer, 1);
purple_xfer_set_protocol_data(xfer, xf);
xf->data = bd;
============================================================
--- libpurple/protocols/mxit/login.c f80af7e4d3e842e62fff3aebdabc6719855c5c06
+++ libpurple/protocols/mxit/login.c 6abe6ee1940cf02e506c0d154e2e9a2d1766e86d
@@ -69,7 +69,12 @@ static struct MXitSession* mxit_create_o
/* configure the connection (reference: "libpurple/connection.h") */
purple_connection_set_protocol_data( con, session );
- con->flags |= PURPLE_CONNECTION_NO_BGCOLOR | PURPLE_CONNECTION_NO_URLDESC | PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_SUPPORT_MOODS;
+ purple_connection_set_flags( con,
+ PURPLE_CONNECTION_NO_BGCOLOR
+ | PURPLE_CONNECTION_NO_URLDESC
+ | PURPLE_CONNECTION_HTML
+ | PURPLE_CONNECTION_SUPPORT_MOODS
+ );
/* configure the session (reference: "libpurple/account.h") */
g_strlcpy( session->server, purple_account_get_string( account, MXIT_CONFIG_SERVER_ADDR, DEFAULT_SERVER ), sizeof( session->server ) );
============================================================
--- libpurple/protocols/jabber/google/gmail.c 43f78321281c20551cafab655e875153fa25bfff
+++ libpurple/protocols/jabber/google/gmail.c 2fac522ac20c1793ea76750257e758e6f419e047
@@ -150,7 +150,7 @@ jabber_gmail_poke(JabberStream *js, cons
JabberIq *iq;
/* bail if the user isn't interested */
- if (!purple_account_get_check_mail(js->gc->account))
+ if (!purple_account_get_check_mail(purple_connection_get_account(js->gc)))
return;
/* Is this an initial incoming mail notification? If so, send a request for more info */
============================================================
--- libpurple/protocols/jabber/google/google_presence.c cd0481a083e3568c8f489d260045bba8a28aac14
+++ libpurple/protocols/jabber/google/google_presence.c e2c6cdce51495e427307a812d02f82b390f23c76
@@ -27,12 +27,12 @@ void jabber_google_presence_incoming(Jab
if (!js->googletalk)
return;
if (jbr->status && purple_str_has_prefix(jbr->status, "? ")) {
- purple_prpl_got_user_status(js->gc->account, user, "tune",
+ purple_prpl_got_user_status(purple_connection_get_account(js->gc), user, "tune",
PURPLE_TUNE_TITLE, jbr->status + strlen("? "), NULL);
g_free(jbr->status);
jbr->status = NULL;
} else {
- purple_prpl_got_user_status_deactive(js->gc->account, user, "tune");
+ purple_prpl_got_user_status_deactive(purple_connection_get_account(js->gc), user, "tune");
}
}
More information about the Commits
mailing list