summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Vani <a@nevitus.org>2014-02-10 00:56:22 +0530
committerAnkit Vani <a@nevitus.org>2014-02-10 00:56:22 +0530
commitfb3b6d70be9f1d0e0f623fc8249bde9749918ef6 (patch)
treef3ab09ec96282b5d0e832ae7edef7f0b6e0f6f3d
parentf83b009cc5d62a820859cece95fcd0e5fd67e6a2 (diff)
downloadpidgin-fb3b6d70be9f1d0e0f623fc8249bde9749918ef6.tar.gz
Fix namespaces issues in libpurple.
Renamed: 'empty_to_null' to 'purple_emptystr_to_null' 'null_to_empty' to 'purple_null_to_emptystr' 'DBUS_SERVICE_PURPLE' to 'PURPLE_DBUS_SERVICE' 'DBUS_PATH_PURPLE' to 'PURPLE_DBUS_PATH' 'DBUS_INTERFACE_PURPLE' to 'PURPLE_DBUS_INTERFACE' 'serv_*' to 'purple_serv_*' 'StunCallback' to 'PurpleStunCallback' 'PTFunc' to 'PurpleThemeFunc' 'UPnPMappingAddRemove' to 'PurpleUPnPMappingAddRemove'
-rw-r--r--ChangeLog.API4
-rw-r--r--finch/gntblist.c14
-rw-r--r--finch/gntconv.c8
-rw-r--r--finch/gntpounce.c2
-rw-r--r--libpurple/account.c14
-rw-r--r--libpurple/buddylist.c4
-rw-r--r--libpurple/connection.c2
-rw-r--r--libpurple/conversation.c4
-rw-r--r--libpurple/conversationtypes.c22
-rw-r--r--libpurple/conversationtypes.h2
-rw-r--r--libpurple/core.c2
-rw-r--r--libpurple/dbus-bindings.h6
-rw-r--r--libpurple/dbus-purple.h6
-rw-r--r--libpurple/dbus-server.c24
-rw-r--r--libpurple/internal.h4
-rw-r--r--libpurple/network.c2
-rw-r--r--libpurple/plugins/filectl.c2
-rw-r--r--libpurple/plugins/perl/common/Server.xs58
-rw-r--r--libpurple/plugins/tcl/tcl_cmds.c6
-rw-r--r--libpurple/protocols/bonjour/buddy.c4
-rw-r--r--libpurple/protocols/bonjour/jabber.c2
-rw-r--r--libpurple/protocols/gg/chat.c8
-rw-r--r--libpurple/protocols/gg/gg.c4
-rw-r--r--libpurple/protocols/gg/message-prpl.c2
-rw-r--r--libpurple/protocols/gg/pubdir-prpl.c2
-rw-r--r--libpurple/protocols/irc/cmds.c2
-rw-r--r--libpurple/protocols/irc/irc.c4
-rw-r--r--libpurple/protocols/irc/msgs.c14
-rw-r--r--libpurple/protocols/jabber/buddy.c4
-rw-r--r--libpurple/protocols/jabber/message.c14
-rw-r--r--libpurple/protocols/jabber/presence.c10
-rw-r--r--libpurple/protocols/jabber/roster.c2
-rw-r--r--libpurple/protocols/jabber/usernick.c2
-rw-r--r--libpurple/protocols/msn/msg.c14
-rw-r--r--libpurple/protocols/msn/msn.c10
-rw-r--r--libpurple/protocols/msn/notification.c2
-rw-r--r--libpurple/protocols/msn/oim.c2
-rw-r--r--libpurple/protocols/msn/switchboard.c8
-rw-r--r--libpurple/protocols/msn/user.c2
-rw-r--r--libpurple/protocols/msn/userlist.c2
-rw-r--r--libpurple/protocols/mxit/markup.c6
-rw-r--r--libpurple/protocols/mxit/multimx.c12
-rw-r--r--libpurple/protocols/mxit/mxit.c2
-rw-r--r--libpurple/protocols/mxit/protocol.c6
-rw-r--r--libpurple/protocols/myspace/myspace.c14
-rw-r--r--libpurple/protocols/novell/novell.c20
-rw-r--r--libpurple/protocols/null/nullprpl.c16
-rw-r--r--libpurple/protocols/oscar/family_icq.c2
-rw-r--r--libpurple/protocols/oscar/odc.c8
-rw-r--r--libpurple/protocols/oscar/oscar.c36
-rw-r--r--libpurple/protocols/sametime/sametime.c22
-rw-r--r--libpurple/protocols/silc/chat.c12
-rw-r--r--libpurple/protocols/silc/ops.c20
-rw-r--r--libpurple/protocols/simple/simple.c8
-rw-r--r--libpurple/protocols/yahoo/libyahoo.c2
-rw-r--r--libpurple/protocols/yahoo/libymsg.c14
-rw-r--r--libpurple/protocols/yahoo/yahoo_aliases.c4
-rw-r--r--libpurple/protocols/yahoo/yahoochat.c22
-rw-r--r--libpurple/protocols/yahoo/ycht.c6
-rw-r--r--libpurple/protocols/zephyr/zephyr.c14
-rw-r--r--libpurple/prpl.c6
-rw-r--r--libpurple/prpl.h6
-rw-r--r--libpurple/purple-client.c6
-rw-r--r--libpurple/roomlist.c2
-rw-r--r--libpurple/server.c62
-rw-r--r--libpurple/server.h80
-rw-r--r--libpurple/stun.c6
-rw-r--r--libpurple/stun.h4
-rw-r--r--libpurple/theme-manager.c4
-rw-r--r--libpurple/theme-manager.h6
-rw-r--r--libpurple/upnp.c24
-rw-r--r--libpurple/upnp.h8
-rw-r--r--libpurple/xfer.c2
-rw-r--r--pidgin/gtkblist.c10
-rw-r--r--pidgin/gtkconv.c14
-rw-r--r--pidgin/gtkdialogs.c2
-rw-r--r--pidgin/gtkpounce.c2
-rw-r--r--pidgin/gtkprivacy.c2
-rw-r--r--pidgin/gtkutils.c6
-rw-r--r--pidgin/libpidgin.c4
-rw-r--r--pidgin/plugins/musicmessaging/musicmessaging.c8
81 files changed, 407 insertions, 403 deletions
diff --git a/ChangeLog.API b/ChangeLog.API
index 1fb2bf4a7d..3314a169da 100644
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -244,6 +244,7 @@ version 3.0.0 (??/??/????):
purple_savedstatus_set_primitive_type
* purple_savedstatus_substatus_get_type renamed to
purple_savedstatus_substatus_get_status_type
+ * serv_* functions are now purple_serv_*
* purple_srv_resolve now takes a PurpleAccount as the first parameter
* purple_srv_txt_query_get_type renamed to
purple_srv_txt_query_get_query_type
@@ -255,8 +256,11 @@ version 3.0.0 (??/??/????):
the documentation for details.
* update_idle method has been added to PurplePresenceClass to update the
idle state of a presence
+ * StunCallback renamed to PurpleStunCallback
* purple_str_size_to_units now takes a goffset as the size parameter
+ * PTFunc renamed to PurpleThemeFunc
* purple_txt_resolve now takes a PurpleAccount as the first parameter
+ * UPnPMappingAddRemove renamed to PurpleUPnPMappingAddRemove
* purple_util_fetch_url_request now takes a PurpleAccount as
the first parameter
* purple_util_fetch_url_request now takes a length as the eighth
diff --git a/finch/gntblist.c b/finch/gntblist.c
index 3272f7b578..90712152d6 100644
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -705,7 +705,7 @@ join_chat(PurpleChat *chat)
conv = purple_conversations_find_chat_with_account(name, account);
if (!conv || purple_chat_conversation_has_left(conv)) {
- serv_join_chat(purple_account_get_connection(account),
+ purple_serv_join_chat(purple_account_get_connection(account),
purple_chat_get_components(chat));
} else if (conv) {
purple_conversation_present(PURPLE_CONVERSATION(conv));
@@ -1211,7 +1211,7 @@ gpointer finch_retrieve_user_info(PurpleConnection *conn, const char *name)
uihandle = purple_notify_userinfo(conn, name, info, NULL, NULL);
purple_notify_user_info_destroy(info);
- serv_get_info(conn, name);
+ purple_serv_get_info(conn, name);
return uihandle;
}
@@ -1224,7 +1224,7 @@ finch_blist_get_buddy_info_cb(PurpleBlistNode *selected, PurpleBuddy *buddy)
static void
finch_blist_menu_send_file_cb(PurpleBlistNode *selected, PurpleBuddy *buddy)
{
- serv_send_file(purple_account_get_connection(purple_buddy_get_account(buddy)), purple_buddy_get_name(buddy), NULL);
+ purple_serv_send_file(purple_account_get_connection(purple_buddy_get_account(buddy)), purple_buddy_get_name(buddy), NULL);
}
static void
@@ -1348,10 +1348,10 @@ rename_blist_node(PurpleBlistNode *node, const char *newname)
PurpleBuddy *buddy = purple_contact_get_priority_buddy(contact);
purple_contact_set_alias(contact, name);
purple_buddy_set_local_alias(buddy, name);
- serv_alias_buddy(buddy);
+ purple_serv_alias_buddy(buddy);
} else if (PURPLE_IS_BUDDY(node)) {
purple_buddy_set_local_alias((PurpleBuddy*)node, name);
- serv_alias_buddy((PurpleBuddy*)node);
+ purple_serv_alias_buddy((PurpleBuddy*)node);
} else if (PURPLE_IS_CHAT(node))
purple_chat_set_alias((PurpleChat*)node, name);
else if (PURPLE_IS_GROUP(node) && (name != NULL))
@@ -2617,7 +2617,7 @@ auto_join_chats(gpointer data)
PurpleChat *chat = (PurpleChat*)node;
if (purple_chat_get_account(chat) == account &&
purple_blist_node_get_bool(node, "gnt-autojoin"))
- serv_join_chat(purple_account_get_connection(account), purple_chat_get_components(chat));
+ purple_serv_join_chat(purple_account_get_connection(account), purple_chat_get_components(chat));
}
}
return FALSE;
@@ -2779,7 +2779,7 @@ join_chat_select_cb(gpointer data, PurpleRequestFields *fields)
} else {
hash = purple_chat_get_components(chat);
}
- serv_join_chat(gc, hash);
+ purple_serv_join_chat(gc, hash);
if (chat == NULL && hash != NULL)
g_hash_table_destroy(hash);
}
diff --git a/finch/gntconv.c b/finch/gntconv.c
index 07dc6663e8..d03aa83147 100644
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -115,7 +115,7 @@ send_typing_notification(GntWidget *w, FinchConv *ggconv)
if (send || (purple_im_conversation_get_type_again(im) != 0 &&
time(NULL) > purple_im_conversation_get_type_again(im))) {
unsigned int timeout;
- timeout = serv_send_typing(purple_conversation_get_connection(conv),
+ timeout = purple_serv_send_typing(purple_conversation_get_connection(conv),
purple_conversation_get_name(conv),
PURPLE_IM_TYPING);
purple_im_conversation_set_type_again(im, timeout);
@@ -123,7 +123,7 @@ send_typing_notification(GntWidget *w, FinchConv *ggconv)
} else {
purple_im_conversation_stop_send_typed_timeout(im);
- serv_send_typing(purple_conversation_get_connection(conv),
+ purple_serv_send_typing(purple_conversation_get_connection(conv),
purple_conversation_get_name(conv),
PURPLE_IM_NOT_TYPING);
}
@@ -340,7 +340,7 @@ account_signed_on_off(PurpleConnection *gc, gpointer null)
} else {
comps = purple_chat_get_components(chat);
}
- serv_join_chat(gc, comps);
+ purple_serv_join_chat(gc, comps);
if (chat == NULL && comps != NULL)
g_hash_table_destroy(comps);
}
@@ -419,7 +419,7 @@ static void
send_file_cb(GntMenuItem *item, gpointer ggconv)
{
FinchConv *ggc = ggconv;
- serv_send_file(purple_conversation_get_connection(ggc->active_conv),
+ purple_serv_send_file(purple_conversation_get_connection(ggc->active_conv),
purple_conversation_get_name(ggc->active_conv), NULL);
}
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
index 3ea3a4e244..ee71d17f7a 100644
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -876,7 +876,7 @@ pounce_cb(PurplePounce *pounce, PurplePounceEvent events, void *data)
purple_conversation_write(PURPLE_CONVERSATION(im), NULL, message,
PURPLE_MESSAGE_SEND, time(NULL));
- serv_send_im(purple_account_get_connection(account), (char *)pouncee, (char *)message, 0);
+ purple_serv_send_im(purple_account_get_connection(account), (char *)pouncee, (char *)message, 0);
}
}
diff --git a/libpurple/account.c b/libpurple/account.c
index 7082283fbe..b6f1bb831e 100644
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -695,7 +695,7 @@ set_user_info_cb(PurpleAccount *account, const char *user_info)
purple_account_set_user_info(account, user_info);
gc = purple_account_get_connection(account);
- serv_set_info(gc, user_info);
+ purple_serv_set_info(gc, user_info);
}
void
@@ -1606,7 +1606,7 @@ purple_account_privacy_permit_add(PurpleAccount *account, const char *who,
priv->permit = g_slist_append(priv->permit, name);
if (!local_only && purple_account_is_connected(account))
- serv_add_permit(purple_account_get_connection(account), who);
+ purple_serv_add_permit(purple_account_get_connection(account), who);
if (ui_ops != NULL && ui_ops->permit_added != NULL)
ui_ops->permit_added(account, who);
@@ -1659,7 +1659,7 @@ purple_account_privacy_permit_remove(PurpleAccount *account, const char *who,
priv->permit = g_slist_delete_link(priv->permit, l);
if (!local_only && purple_account_is_connected(account))
- serv_rem_permit(purple_account_get_connection(account), who);
+ purple_serv_rem_permit(purple_account_get_connection(account), who);
if (ui_ops != NULL && ui_ops->permit_removed != NULL)
ui_ops->permit_removed(account, who);
@@ -1710,7 +1710,7 @@ purple_account_privacy_deny_add(PurpleAccount *account, const char *who,
priv->deny = g_slist_append(priv->deny, name);
if (!local_only && purple_account_is_connected(account))
- serv_add_deny(purple_account_get_connection(account), who);
+ purple_serv_add_deny(purple_account_get_connection(account), who);
if (ui_ops != NULL && ui_ops->deny_added != NULL)
ui_ops->deny_added(account, who);
@@ -1761,7 +1761,7 @@ purple_account_privacy_deny_remove(PurpleAccount *account, const char *who,
priv->deny = g_slist_delete_link(priv->deny, l);
if (!local_only && purple_account_is_connected(account))
- serv_rem_deny(purple_account_get_connection(account), name);
+ purple_serv_rem_deny(purple_account_get_connection(account), name);
if (ui_ops != NULL && ui_ops->deny_removed != NULL)
ui_ops->deny_removed(account, who);
@@ -1854,7 +1854,7 @@ purple_account_privacy_allow(PurpleAccount *account, const char *who)
/* Notify the server if the privacy setting was changed */
if (type != purple_account_get_privacy_type(account) && purple_account_is_connected(account))
- serv_set_permit_deny(purple_account_get_connection(account));
+ purple_serv_set_permit_deny(purple_account_get_connection(account));
}
void
@@ -1900,7 +1900,7 @@ purple_account_privacy_deny(PurpleAccount *account, const char *who)
/* Notify the server if the privacy setting was changed */
if (type != purple_account_get_privacy_type(account) && purple_account_is_connected(account))
- serv_set_permit_deny(purple_account_get_connection(account));
+ purple_serv_set_permit_deny(purple_account_get_connection(account));
}
GSList *
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
index f6af83bc77..92c55fd4d0 100644
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -961,7 +961,7 @@ void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGr
/* the group totalsize will be taken care of by remove_contact below */
if (bnode->parent->parent != (PurpleBlistNode*)g)
- serv_move_buddy(buddy, (PurpleGroup *)bnode->parent->parent, g);
+ purple_serv_move_buddy(buddy, (PurpleGroup *)bnode->parent->parent, g);
if (bnode->next)
bnode->next->prev = bnode->prev;
@@ -1126,7 +1126,7 @@ void purple_blist_add_contact(PurpleContact *contact, PurpleGroup *group, Purple
g_hash_table_replace(account_buddies, hb2, b);
if (purple_account_get_connection(account))
- serv_move_buddy(b, (PurpleGroup *)cnode->parent, g);
+ purple_serv_move_buddy(b, (PurpleGroup *)cnode->parent, g);
} else {
gboolean empty_contact = FALSE;
diff --git a/libpurple/connection.c b/libpurple/connection.c
index 1d41661e6d..d63f0a29dc 100644
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -225,7 +225,7 @@ purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state)
purple_signal_emit(purple_connections_get_handle(), "signed-on", gc);
purple_signal_emit_return_1(purple_connections_get_handle(), "autojoin", gc);
- serv_set_permit_deny(gc);
+ purple_serv_set_permit_deny(gc);
update_keepalive(gc, TRUE);
}
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
index 40c9eacc6d..9e79e5c656 100644
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -134,7 +134,7 @@ common_send(PurpleConversation *conv, const char *message, PurpleMessageFlags ms
if (sent != NULL && sent[0] != '\0') {
- err = serv_send_im(gc, purple_conversation_get_name(conv),
+ err = purple_serv_send_im(gc, purple_conversation_get_name(conv),
sent, msgflags);
if ((err > 0) && (displayed != NULL))
@@ -151,7 +151,7 @@ common_send(PurpleConversation *conv, const char *message, PurpleMessageFlags ms
account, &sent, id);
if (sent != NULL && sent[0] != '\0') {
- err = serv_chat_send(gc, id, sent, msgflags);
+ err = purple_serv_chat_send(gc, id, sent, msgflags);
purple_signal_emit(purple_conversations_get_handle(), "sent-chat-msg",
account, sent, id);
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
index 8ecfe24b85..cbc9bb4490 100644
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -163,7 +163,7 @@ send_typed_cb(gpointer data)
*/
purple_im_conversation_set_type_again(im, 1);
- serv_send_typing(gc, name, PURPLE_IM_TYPED);
+ purple_serv_send_typing(gc, name, PURPLE_IM_TYPED);
purple_debug(PURPLE_DEBUG_MISC, "conversationtypes", "typed...\n");
}
@@ -486,7 +486,7 @@ purple_im_conversation_finalize(GObject *object)
prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
if (purple_prefs_get_bool("/purple/conversations/im/send_typing"))
- serv_send_typing(gc, name, PURPLE_IM_NOT_TYPING);
+ purple_serv_send_typing(gc, name, PURPLE_IM_NOT_TYPING);
if (gc && prpl_info->convo_closed != NULL)
prpl_info->convo_closed(gc, name);
@@ -1241,7 +1241,7 @@ invite_user_to_chat(gpointer data, PurpleRequestFields *fields)
user = purple_request_fields_get_string(fields, "screenname");
message = purple_request_fields_get_string(fields, "message");
- serv_chat_invite(purple_conversation_get_connection(conv), priv->id, message, user);
+ purple_serv_chat_invite(purple_conversation_get_connection(conv), priv->id, message, user);
}
void purple_chat_conversation_invite_user(PurpleChatConversation *chat, const char *user,
@@ -1260,7 +1260,7 @@ void purple_chat_conversation_invite_user(PurpleChatConversation *chat, const ch
account = purple_conversation_get_account(PURPLE_CONVERSATION(chat));
if (!confirm) {
- serv_chat_invite(purple_account_get_connection(account),
+ purple_serv_chat_invite(purple_account_get_connection(account),
purple_chat_conversation_get_id(chat), message, user);
return;
}
@@ -1491,11 +1491,11 @@ purple_chat_conversation_finalize(GObject *object)
#if 0
/*
* This is unfortunately necessary, because calling
- * serv_chat_leave() calls this purple_conversation_destroy(),
+ * purple_serv_chat_leave() calls this purple_conversation_destroy(),
* which leads to two calls here.. We can't just return after
* this, because then it'll return on the next pass. So, since
- * serv_got_chat_left(), which is eventually called from the
- * prpl that serv_chat_leave() calls, removes this conversation
+ * purple_serv_got_chat_left(), which is eventually called from the
+ * prpl that purple_serv_chat_leave() calls, removes this conversation
* from the gc's buddy_chats list, we're going to check to see
* if this exists in the list. If so, we want to return after
* calling this, because it'll be called again. If not, fall
@@ -1508,7 +1508,7 @@ purple_chat_conversation_finalize(GObject *object)
*/
if (gc && g_slist_find(gc->buddy_chats, conv) != NULL) {
- serv_chat_leave(gc, chat_id);
+ purple_serv_chat_leave(gc, chat_id);
return;
}
@@ -1520,14 +1520,14 @@ purple_chat_conversation_finalize(GObject *object)
* knows it left the chat.
*/
if (!purple_chat_conversation_has_left(chat))
- serv_chat_leave(gc, chat_id);
+ purple_serv_chat_leave(gc, chat_id);
/*
- * If they didn't call serv_got_chat_left by now, it's too late.
+ * If they didn't call purple_serv_got_chat_left by now, it's too late.
* So we better do it for them before we destroy the thing.
*/
if (!purple_chat_conversation_has_left(chat))
- serv_got_chat_left(gc, chat_id);
+ purple_serv_got_chat_left(gc, chat_id);
}
g_hash_table_destroy(priv->users);
diff --git a/libpurple/conversationtypes.h b/libpurple/conversationtypes.h
index 286d39df88..cc9dbf32ac 100644
--- a/libpurple/conversationtypes.h
+++ b/libpurple/conversationtypes.h
@@ -618,7 +618,7 @@ const char *purple_chat_conversation_get_nick(PurpleChatConversation *chat);
* @chat: The chat.
*
* Lets the core know we left a chat, without destroying it.
- * Called from serv_got_chat_left().
+ * Called from purple_serv_got_chat_left().
*/
void purple_chat_conversation_leave(PurpleChatConversation *chat);
diff --git a/libpurple/core.c b/libpurple/core.c
index 283e6b87bf..e6795abc7f 100644
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -363,7 +363,7 @@ static char *purple_dbus_owner_user_dir(void)
if ((dbus_connection = purple_dbus_get_connection()) == NULL)
return NULL;
- if ((msg = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, "PurpleUserDir")) == NULL)
+ if ((msg = dbus_message_new_method_call(PURPLE_DBUS_SERVICE, PURPLE_DBUS_PATH, PURPLE_DBUS_INTERFACE, "PurpleUserDir")) == NULL)
return NULL;
dbus_error_init(&dbus_error);
diff --git a/libpurple/dbus-bindings.h b/libpurple/dbus-bindings.h
index ea5e390ddd..3fa179eb2c 100644
--- a/libpurple/dbus-bindings.h
+++ b/libpurple/dbus-bindings.h
@@ -41,7 +41,7 @@ gint purple_dbus_pointer_to_id_error(gconstpointer ptr, DBusError *error);
gpointer purple_dbus_id_to_pointer_error(gint id, PurpleDBusType *type,
const char *typename, DBusError *error);
-#define NULLIFY(id) id = empty_to_null(id)
+#define NULLIFY(id) id = purple_emptystr_to_null(id)
#define CHECK_ERROR(error) if (dbus_error_is_set(error)) return NULL;
@@ -89,8 +89,8 @@ gpointer* purple_GList_to_array(GList *list, dbus_int32_t *len);
gpointer* purple_GSList_to_array(GSList *list, dbus_int32_t *len);
GHashTable *purple_dbus_iter_hash_table(DBusMessageIter *iter, DBusError *error);
-const char* empty_to_null(const char *str);
-const char* null_to_empty(const char *s);
+const char* purple_emptystr_to_null(const char *str);
+const char* purple_null_to_emptystr(const char *s);
typedef struct {
const char *name;
diff --git a/libpurple/dbus-purple.h b/libpurple/dbus-purple.h
index 30811d7762..436ba638ca 100644
--- a/libpurple/dbus-purple.h
+++ b/libpurple/dbus-purple.h
@@ -30,8 +30,8 @@
* @title: DBUS Purple defines
*/
-#define DBUS_SERVICE_PURPLE "im.pidgin.purple.PurpleService"
-#define DBUS_PATH_PURPLE "/im/pidgin/purple/PurpleObject"
-#define DBUS_INTERFACE_PURPLE "im.pidgin.purple.PurpleInterface"
+#define PURPLE_DBUS_SERVICE "im.pidgin.purple.PurpleService"
+#define PURPLE_DBUS_PATH "/im/pidgin/purple/PurpleObject"
+#define PURPLE_DBUS_INTERFACE "im.pidgin.purple.PurpleInterface"
#endif /* _DBUS_PURPLE_H_ */
diff --git a/libpurple/dbus-server.c b/libpurple/dbus-server.c
index d04615c4f1..9469035045 100644
--- a/libpurple/dbus-server.c
+++ b/libpurple/dbus-server.c
@@ -281,7 +281,7 @@ purple_dbus_message_iter_get_args_valist(DBusMessageIter *iter,
/* Useful functions */
/**************************************************************************/
-const char *empty_to_null(const char *str)
+const char *purple_emptystr_to_null(const char *str)
{
if (str == NULL || str[0] == 0)
return NULL;
@@ -290,7 +290,7 @@ const char *empty_to_null(const char *str)
}
const char *
-null_to_empty(const char *s)
+purple_null_to_emptystr(const char *s)
{
if (s)
return s;
@@ -423,7 +423,7 @@ purple_dbus_dispatch_cb(DBusConnection *connection,
bindings = (PurpleDBusBinding*) user_data;
- if (!dbus_message_has_path(message, DBUS_PATH_PURPLE))
+ if (!dbus_message_has_path(message, PURPLE_DBUS_PATH))
return FALSE;
name = dbus_message_get_member(message);
@@ -487,10 +487,10 @@ static DBusMessage *purple_dbus_introspect(DBusMessage *message)
str = g_string_sized_new(0x1000); /* TODO: why this size? */
g_string_append(str, "<!DOCTYPE node PUBLIC '-//freedesktop//DTD D-BUS Object Introspection 1.0//EN' 'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>\n");
- g_string_append_printf(str, "<node name='%s'>\n", DBUS_PATH_PURPLE);
+ g_string_append_printf(str, "<node name='%s'>\n", PURPLE_DBUS_PATH);
g_string_append(str, " <interface name='org.freedesktop.DBus.Introspectable'>\n <method name='Introspect'>\n <arg name='data' direction='out' type='s'/>\n </method>\n </interface>\n\n");
- g_string_append_printf(str, " <interface name='%s'>\n", DBUS_INTERFACE_PURPLE);
+ g_string_append_printf(str, " <interface name='%s'>\n", PURPLE_DBUS_INTERFACE);
bindings_list = NULL;
purple_signal_emit(purple_dbus_get_handle(), "dbus-introspect", &bindings_list);
@@ -558,7 +558,7 @@ purple_dbus_dispatch(DBusConnection *connection,
return DBUS_HANDLER_RESULT_HANDLED;
if (dbus_message_is_method_call(message, DBUS_INTERFACE_INTROSPECTABLE, "Introspect") &&
- dbus_message_has_path(message, DBUS_PATH_PURPLE))
+ dbus_message_has_path(message, PURPLE_DBUS_PATH))
{
DBusMessage *reply;
reply = purple_dbus_introspect(message);
@@ -604,7 +604,7 @@ purple_dbus_dispatch_init(void)
dbus_connection_set_exit_on_disconnect (purple_dbus_connection, FALSE);
if (!dbus_connection_register_object_path(purple_dbus_connection,
- DBUS_PATH_PURPLE, &vtable, NULL))
+ PURPLE_DBUS_PATH, &vtable, NULL))
{
init_error = g_strdup_printf(N_("Failed to get name: %s"), error.name);
dbus_error_free(&error);
@@ -612,7 +612,7 @@ purple_dbus_dispatch_init(void)
}
dbus_request_name_reply = dbus_bus_request_name(purple_dbus_connection,
- DBUS_SERVICE_PURPLE, 0, &error);
+ PURPLE_DBUS_SERVICE, 0, &error);
if (dbus_error_is_set(&error))
{
@@ -720,7 +720,7 @@ purple_dbus_message_append_values(DBusMessageIter *iter,
dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &xboolean);
break;
case G_TYPE_STRING:
- str = null_to_empty(my_arg(char*));
+ str = purple_null_to_emptystr(my_arg(char*));
if (!g_utf8_validate(str, -1, NULL)) {
gchar *tmp;
purple_debug_error("dbus", "Invalid UTF-8 string passed to signal, emitting salvaged string!\n");
@@ -785,7 +785,7 @@ purple_dbus_signal_emit_purple(const char *name, int num_values,
return;
newname = purple_dbus_convert_signal_name(name);
- signal = dbus_message_new_signal(DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, newname);
+ signal = dbus_message_new_signal(PURPLE_DBUS_PATH, PURPLE_DBUS_INTERFACE, newname);
dbus_message_iter_init_append(signal, &iter);
if (purple_dbus_message_append_values(&iter, num_values, types, vargs))
@@ -838,8 +838,8 @@ purple_dbus_uninit(void)
return;
dbus_error_init(&error);
- dbus_connection_unregister_object_path(purple_dbus_connection, DBUS_PATH_PURPLE);
- dbus_bus_release_name(purple_dbus_connection, DBUS_SERVICE_PURPLE, &error);
+ dbus_connection_unregister_object_path(purple_dbus_connection, PURPLE_DBUS_PATH);
+ dbus_bus_release_name(purple_dbus_connection, PURPLE_DBUS_SERVICE, &error);
dbus_error_free(&error);
dbus_connection_unref(purple_dbus_connection);
purple_dbus_connection = NULL;
diff --git a/libpurple/internal.h b/libpurple/internal.h
index c0367a05c7..435bbd6926 100644
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -246,7 +246,7 @@ gboolean _purple_connection_wants_to_die(const PurpleConnection *gc);
*
* Adds a chat to the active chats list of a connection
*
- * Note: This function should only be called by serv_got_joined_chat()
+ * Note: This function should only be called by purple_serv_got_joined_chat()
* in server.c.
*/
void _purple_connection_add_active_chat(PurpleConnection *gc,
@@ -258,7 +258,7 @@ void _purple_connection_add_active_chat(PurpleConnection *gc,
*
* Removes a chat from the active chats list of a connection
*
- * Note: This function should only be called by serv_got_chat_left()
+ * Note: This function should only be called by purple_serv_got_chat_left()
* in server.c.
*/
void _purple_connection_remove_active_chat(PurpleConnection *gc,
diff --git a/libpurple/network.c b/libpurple/network.c
index 97e06b8669..99e6579bd5 100644
--- a/libpurple/network.c
+++ b/libpurple/network.c
@@ -101,7 +101,7 @@ struct _PurpleNetworkListenData {
gboolean adding;
PurpleNetworkListenCallback cb;
gpointer cb_data;
- UPnPMappingAddRemove *mapping_data;
+ PurpleUPnPMappingAddRemove *mapping_data;
int timer;
};
diff --git a/libpurple/plugins/filectl.c b/libpurple/plugins/filectl.c
index dcf0a0489d..a8bebcd014 100644
--- a/libpurple/plugins/filectl.c
+++ b/libpurple/plugins/filectl.c
@@ -99,7 +99,7 @@ run_commands()
{
/*
purple_conversation_write(conv, arg2, WFLAG_SEND, NULL, time(NULL), -1);
- serv_send_im(conv->gc, arg1, arg2, 0);
+ purple_serv_send_im(conv->gc, arg1, arg2, 0);
*/
}
diff --git a/libpurple/plugins/perl/common/Server.xs b/libpurple/plugins/perl/common/Server.xs
index a354029619..ebebafe019 100644
--- a/libpurple/plugins/perl/common/Server.xs
+++ b/libpurple/plugins/perl/common/Server.xs
@@ -5,58 +5,58 @@ PROTOTYPES: ENABLE
void
-serv_add_deny(con, a)
+purple_serv_add_deny(con, a)
Purple::Connection con
const char * a
void
-serv_add_permit(a, b)
+purple_serv_add_permit(a, b)
Purple::Connection a
const char * b
void
-serv_alias_buddy(buddy)
+purple_serv_alias_buddy(buddy)
Purple::BuddyList::Buddy buddy
void
-serv_chat_invite(con, a, b, c)
+purple_serv_chat_invite(con, a, b, c)
Purple::Connection con
int a
const char * b
const char * c
void
-serv_chat_leave(a, b)
+purple_serv_chat_leave(a, b)
Purple::Connection a
int b
int
-serv_chat_send(con, a, b, flags)
+purple_serv_chat_send(con, a, b, flags)
Purple::Connection con
int a
const char * b
Purple::MessageFlags flags
void
-serv_chat_whisper(con, a, b, c)
+purple_serv_chat_whisper(con, a, b, c)
Purple::Connection con
int a
const char * b
const char * c
void
-serv_get_info(con, a)
+purple_serv_get_info(con, a)
Purple::Connection con
const char * a
void
-serv_got_alias(gc, who, alias)
+purple_serv_got_alias(gc, who, alias)
Purple::Connection gc
const char *who
const char *alias
void
-serv_got_chat_in(g, id, who, chatflags, message, mtime)
+purple_serv_got_chat_in(g, id, who, chatflags, message, mtime)
Purple::Connection g
int id
const char *who
@@ -65,7 +65,7 @@ serv_got_chat_in(g, id, who, chatflags, message, mtime)
time_t mtime
void
-serv_got_chat_invite(gc, name, who, message, components)
+purple_purple_serv_got_chat_invite(gc, name, who, message, components)
Purple::Connection gc
const char *name
const char *who
@@ -89,15 +89,15 @@ CODE:
g_hash_table_insert(t_GHash, t_key, t_value);
}
- serv_got_chat_invite(gc, name, who, message, t_GHash);
+ purple_purple_serv_got_chat_invite(gc, name, who, message, t_GHash);
void
-serv_got_chat_left(g, id)
+purple_serv_got_chat_left(g, id)
Purple::Connection g
int id
void
-serv_got_im(gc, who, msg, imflags, mtime)
+purple_serv_got_im(gc, who, msg, imflags, mtime)
Purple::Connection gc
const char *who
const char *msg
@@ -105,25 +105,25 @@ serv_got_im(gc, who, msg, imflags, mtime)
time_t mtime
Purple::ChatConversation
-serv_got_joined_chat(gc, id, name)
+purple_serv_got_joined_chat(gc, id, name)
Purple::Connection gc
int id
const char *name
void
-serv_got_typing(gc, name, timeout, state)
+purple_serv_got_typing(gc, name, timeout, state)
Purple::Connection gc
const char *name
int timeout
Purple::IMTypingState state
void
-serv_got_typing_stopped(gc, name)
+purple_purple_serv_got_typing_stopped(gc, name)
Purple::Connection gc
const char *name
void
-serv_join_chat(conn, components)
+purple_serv_join_chat(conn, components)
Purple::Connection conn
HV * components
PREINIT:
@@ -143,17 +143,17 @@ CODE:
g_hash_table_insert(t_GHash, t_key, t_value);
}
- serv_join_chat(conn, t_GHash);
+ purple_serv_join_chat(conn, t_GHash);
g_hash_table_destroy(t_GHash);
void
-serv_move_buddy(buddy, group1, group2)
+purple_serv_move_buddy(buddy, group1, group2)
Purple::BuddyList::Buddy buddy
Purple::BuddyList::Group group1
Purple::BuddyList::Group group2
void
-serv_reject_chat(con, components)
+purple_serv_reject_chat(con, components)
Purple::Connection con
SV * components
INIT:
@@ -174,43 +174,43 @@ CODE:
g_hash_table_insert(t_GHash, t_key, t_value);
}
- serv_reject_chat(con, t_GHash);
+ purple_serv_reject_chat(con, t_GHash);
void
-serv_rem_deny(con, a)
+purple_serv_rem_deny(con, a)
Purple::Connection con
const char * a
void
-serv_rem_permit(con, a)
+purple_serv_rem_permit(con, a)
Purple::Connection con
const char * a
void
-serv_send_file(gc, who, file)
+purple_serv_send_file(gc, who, file)
Purple::Connection gc
const char *who
const char *file
int
-serv_send_im(con, a, b, flags )
+purple_serv_send_im(con, a, b, flags )
Purple::Connection con
const char * a
const char * b
Purple::MessageFlags flags
int
-serv_send_typing(con, a, state)
+purple_serv_send_typing(con, a, state)
Purple::Connection con
const char * a
Purple::IMTypingState state
void
-serv_set_info(con, a)
+purple_serv_set_info(con, a)
Purple::Connection con
const char * a
void
-serv_set_permit_deny(con)
+purple_serv_set_permit_deny(con)
Purple::Connection con
diff --git a/libpurple/plugins/tcl/tcl_cmds.c b/libpurple/plugins/tcl/tcl_cmds.c
index b6630e1f81..4d36d3a99c 100644
--- a/libpurple/plugins/tcl/tcl_cmds.c
+++ b/libpurple/plugins/tcl/tcl_cmds.c
@@ -475,11 +475,11 @@ int tcl_cmd_buddy(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONS
}
if ((account = tcl_validate_account(elems[2], interp)) == NULL)
return TCL_ERROR;
- serv_get_info(purple_account_get_connection(account), Tcl_GetString(elems[1]));
+ purple_serv_get_info(purple_account_get_connection(account), Tcl_GetString(elems[1]));
} else {
if ((account = tcl_validate_account(objv[2], interp)) == NULL)
return TCL_ERROR;
- serv_get_info(purple_account_get_connection(account), Tcl_GetString(objv[3]));
+ purple_serv_get_info(purple_account_get_connection(account), Tcl_GetString(objv[3]));
}
break;
case CMD_BUDDY_LIST:
@@ -1410,7 +1410,7 @@ int tcl_cmd_send_im(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CO
who = Tcl_GetString(objv[2]);
text = Tcl_GetString(objv[3]);
- serv_send_im(gc, who, text, 0);
+ purple_serv_send_im(gc, who, text, 0);
return TCL_OK;
}
diff --git a/libpurple/protocols/bonjour/buddy.c b/libpurple/protocols/bonjour/buddy.c
index 36eb17caca..efa8f1b6f7 100644
--- a/libpurple/protocols/bonjour/buddy.c
+++ b/libpurple/protocols/bonjour/buddy.c
@@ -162,7 +162,7 @@ bonjour_buddy_add_to_purple(BonjourBuddy *bonjour_buddy, PurpleBuddy *buddy)
/* Create the alias for the buddy using the first and the last name */
if (bonjour_buddy->nick && *bonjour_buddy->nick)
- serv_got_alias(purple_account_get_connection(account), name, bonjour_buddy->nick);
+ purple_serv_got_alias(purple_account_get_connection(account), name, bonjour_buddy->nick);
else {
gchar *alias = NULL;
const char *first, *last;
@@ -173,7 +173,7 @@ bonjour_buddy_add_to_purple(BonjourBuddy *bonjour_buddy, PurpleBuddy *buddy)
(first && *first ? first : ""),
(first && *first && last && *last ? " " : ""),
(last && *last ? last : ""));
- serv_got_alias(purple_account_get_connection(account), name, alias);
+ purple_serv_got_alias(purple_account_get_connection(account), name, alias);
g_free(alias);
}
diff --git a/libpurple/protocols/bonjour/jabber.c b/libpurple/protocols/bonjour/jabber.c
index 8c036f2eaa..ba2cda3105 100644
--- a/libpurple/protocols/bonjour/jabber.c
+++ b/libpurple/protocols/bonjour/jabber.c
@@ -233,7 +233,7 @@ _jabber_parse_and_write_message_to_ui(PurpleXmlNode *message_node, PurpleBuddy *
}
/* Send the message to the UI */
- serv_got_im(gc, purple_buddy_get_name(pb), body, 0, time(NULL));
+ purple_serv_got_im(gc, purple_buddy_get_name(pb), body, 0, time(NULL));
g_free(body);
}
diff --git a/libpurple/protocols/gg/chat.c b/libpurple/protocols/gg/chat.c
index 27cfa2e4ad..083eb21c12 100644
--- a/libpurple/protocols/gg/chat.c
+++ b/libpurple/protocols/gg/chat.c
@@ -145,7 +145,7 @@ static void ggp_chat_open_conv(ggp_chat_local_info *chat)
if (chat->conv != NULL)
return;
- chat->conv = serv_got_joined_chat(chat->gc, chat->local_id,
+ chat->conv = purple_serv_got_joined_chat(chat->gc, chat->local_id,
ggp_chat_get_name_from_id(chat->id));
if (chat->previously_joined) {
purple_conversation_write(PURPLE_CONVERSATION(chat->conv), NULL,
@@ -286,7 +286,7 @@ static void ggp_chat_left(ggp_chat_local_info *chat, uin_t uin)
purple_conversation_write(PURPLE_CONVERSATION(chat->conv), NULL,
_("You have left the chat"), PURPLE_MESSAGE_SYSTEM,
time(NULL));
- serv_got_chat_left(chat->gc, chat->local_id);
+ purple_serv_got_chat_left(chat->gc, chat->local_id);
chat->conv = NULL;
chat->left = TRUE;
}
@@ -498,7 +498,7 @@ int ggp_chat_send(PurpleConnection *gc, int local_id, const char *message,
g_free(gg_msg);
me = purple_account_get_username(purple_connection_get_account(gc));
- serv_got_chat_in(gc, chat->local_id, me, flags, message, time(NULL));
+ purple_serv_got_chat_in(gc, chat->local_id, me, flags, message, time(NULL));
return succ ? 0 : -1;
}
@@ -524,7 +524,7 @@ void ggp_chat_got_message(PurpleConnection *gc, uint64_t chat_id,
purple_conversation_write(PURPLE_CONVERSATION(chat->conv),
ggp_uin_to_str(who), message, PURPLE_MESSAGE_SEND, time);
} else {
- serv_got_chat_in(gc, chat->local_id, ggp_uin_to_str(who),
+ purple_serv_got_chat_in(gc, chat->local_id, ggp_uin_to_str(who),
PURPLE_MESSAGE_RECV, message, time);
}
}
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
index f4291bd1cb..50b3254573 100644
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -226,9 +226,9 @@ static void ggp_typing_notification_handler(PurpleConnection *gc, uin_t uin, int
from = g_strdup_printf("%u", uin);
if (length)
- serv_got_typing(gc, from, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc, from, 0, PURPLE_IM_TYPING);
else
- serv_got_typing_stopped(gc, from);
+ purple_purple_serv_got_typing_stopped(gc, from);
g_free(from);
}
diff --git a/libpurple/protocols/gg/message-prpl.c b/libpurple/protocols/gg/message-prpl.c
index ad860c4fae..e1ee50c787 100644
--- a/libpurple/protocols/gg/message-prpl.c
+++ b/libpurple/protocols/gg/message-prpl.c
@@ -315,7 +315,7 @@ static void ggp_message_got_display(PurpleConnection *gc,
ggp_message_got_data *msg)
{
if (msg->type == GGP_MESSAGE_GOT_TYPE_IM) {
- serv_got_im(gc, ggp_uin_to_str(msg->user), msg->text,
+ purple_serv_got_im(gc, ggp_uin_to_str(msg->user), msg->text,
PURPLE_MESSAGE_RECV, msg->time);
}
#if GGP_ENABLE_GG11
diff --git a/libpurple/protocols/gg/pubdir-prpl.c b/libpurple/protocols/gg/pubdir-prpl.c
index b2b78aa6c4..e2434ff8c5 100644
--- a/libpurple/protocols/gg/pubdir-prpl.c
+++ b/libpurple/protocols/gg/pubdir-prpl.c
@@ -476,7 +476,7 @@ static void ggp_pubdir_request_buddy_alias_got(PurpleConnection *gc,
purple_debug_info("gg", "ggp_pubdir_request_buddy_alias_got: "
"public alias for %u is \"%s\"\n", uin, alias);
- serv_got_alias(gc, ggp_uin_to_str(uin), alias);
+ purple_serv_got_alias(gc, ggp_uin_to_str(uin), alias);
}
/*******************************************************************************
diff --git a/libpurple/protocols/irc/cmds.c b/libpurple/protocols/irc/cmds.c
index be88b8519f..0123691632 100644
--- a/libpurple/protocols/irc/cmds.c
+++ b/libpurple/protocols/irc/cmds.c
@@ -137,7 +137,7 @@ int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *targe
if (action[strlen(action) - 1] == '\n')
action[strlen(action) - 1] = '\0';
if (PURPLE_IS_CHAT_CONVERSATION(convo))
- serv_got_chat_in(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(convo)),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(convo)),
purple_connection_get_display_name(gc),
PURPLE_MESSAGE_SEND, action, time(NULL));
else
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c
index 017e1b48fe..0fd1658089 100644
--- a/libpurple/protocols/irc/irc.c
+++ b/libpurple/protocols/irc/irc.c
@@ -788,7 +788,7 @@ static void irc_chat_leave (PurpleConnection *gc, int id)
args[0] = purple_conversation_get_name(convo);
args[1] = NULL;
irc_cmd_part(irc, "part", purple_conversation_get_name(convo), args);
- serv_got_chat_left(gc, id);
+ purple_serv_got_chat_left(gc, id);
}
static int irc_chat_send(PurpleConnection *gc, int id, const char *what, PurpleMessageFlags flags)
@@ -813,7 +813,7 @@ static int irc_chat_send(PurpleConnection *gc, int id, const char *what, PurpleM
irc_cmd_privmsg(irc, "msg", NULL, args);
- serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), flags, what, time(NULL));
+ purple_serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), flags, what, time(NULL));
g_free(tmp);
return 0;
}
diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c
index e99e01b278..6bcfeff5e7 100644
--- a/libpurple/protocols/irc/msgs.c
+++ b/libpurple/protocols/irc/msgs.c
@@ -245,7 +245,7 @@ void irc_msg_away(struct irc_conn *irc, const char *name, const char *from, char
gc = purple_account_get_connection(irc->account);
if (gc) {
msg = g_markup_escape_text(args[2], -1);
- serv_got_im(gc, args[1], msg, PURPLE_MESSAGE_AUTO_RESP, time(NULL));
+ purple_serv_got_im(gc, args[1], msg, PURPLE_MESSAGE_AUTO_RESP, time(NULL));
g_free(msg);
}
}
@@ -875,7 +875,7 @@ void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, ch
g_hash_table_insert(components, g_strdup("channel"), g_strdup(args[1]));
- serv_got_chat_invite(gc, args[1], nick, NULL, components);
+ purple_purple_serv_got_chat_invite(gc, args[1], nick, NULL, components);
g_free(nick);
}
@@ -947,7 +947,7 @@ void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char
if (!purple_utf8_strcasecmp(nick, purple_connection_get_display_name(gc))) {
/* We are joining a channel for the first time */
- serv_got_joined_chat(gc, id++, args[0]);
+ purple_serv_got_joined_chat(gc, id++, args[0]);
g_free(nick);
chat = purple_conversations_find_chat_with_account(args[0], irc->account);
@@ -1015,7 +1015,7 @@ void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char
buf = g_strdup_printf(_("You have been kicked by %s: (%s)"), nick, args[2]);
purple_conversation_write_message(PURPLE_CONVERSATION(chat), args[0], buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(buf);
- serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
} else {
buf = g_strdup_printf(_("Kicked by %s (%s)"), nick, args[2]);
purple_chat_conversation_remove_user(chat, args[1], buf);
@@ -1228,7 +1228,7 @@ void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char
g_free(escaped);
purple_conversation_write_message(PURPLE_CONVERSATION(chat), channel, msg, PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(msg);
- serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
} else {
msg = args[1] ? irc_mirc2txt(args[1]) : NULL;
purple_chat_conversation_remove_user(chat, nick, msg);
@@ -1318,11 +1318,11 @@ static void irc_msg_handle_privmsg(struct irc_conn *irc, const char *name, const
}
if (!purple_utf8_strcasecmp(to, purple_connection_get_display_name(gc))) {
- serv_got_im(gc, nick, msg, 0, time(NULL));
+ purple_serv_got_im(gc, nick, msg, 0, time(NULL));
} else {
chat = purple_conversations_find_chat_with_account(irc_nick_skip_mode(irc, to), irc->account);
if (chat)
- serv_got_chat_in(gc, purple_chat_conversation_get_id(chat), nick, 0, msg, time(NULL));
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat), nick, 0, msg, time(NULL));
else
purple_debug_error("irc", "Got a %s on %s, which does not exist\n",
notice ? "NOTICE" : "PRIVMSG", to);
diff --git a/libpurple/protocols/jabber/buddy.c b/libpurple/protocols/jabber/buddy.c
index d0f439fd6a..c85bb65b1f 100644
--- a/libpurple/protocols/jabber/buddy.c
+++ b/libpurple/protocols/jabber/buddy.c
@@ -612,7 +612,7 @@ jabber_format_info(PurpleConnection *gc, PurpleRequestFields *fields)
purple_xmlnode_free(vc_node);
purple_account_set_user_info(purple_connection_get_account(gc), p);
- serv_set_info(gc, p);
+ purple_serv_set_info(gc, p);
g_free(p);
}
@@ -1224,7 +1224,7 @@ static void jabber_vcard_parse(JabberStream *js, const char *from,
if (serverside_alias) {
PurpleBuddy *b;
/* If we found a serverside alias, set it and tell the core */
- serv_got_alias(js->gc, bare_jid, serverside_alias);
+ purple_serv_got_alias(js->gc, bare_jid, serverside_alias);
b = purple_blist_find_buddy(account, bare_jid);
if (b) {
purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", serverside_alias);
diff --git a/libpurple/protocols/jabber/message.c b/libpurple/protocols/jabber/message.c
index a330a03eae..986ade8aed 100644
--- a/libpurple/protocols/jabber/message.c
+++ b/libpurple/protocols/jabber/message.c
@@ -79,9 +79,9 @@ static void handle_chat(JabberMessage *jm)
jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED;
if(JM_STATE_COMPOSING == jm->chat_state) {
- serv_got_typing(gc, jm->from, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc, jm->from, 0, PURPLE_IM_TYPING);
} else if(JM_STATE_PAUSED == jm->chat_state) {
- serv_got_typing(gc, jm->from, 0, PURPLE_IM_TYPED);
+ purple_serv_got_typing(gc, jm->from, 0, PURPLE_IM_TYPED);
} else if(JM_STATE_GONE == jm->chat_state) {
PurpleIMConversation *im = purple_conversations_find_im_with_account(
jm->from, account);
@@ -109,10 +109,10 @@ static void handle_chat(JabberMessage *jm)
PURPLE_MESSAGE_SYSTEM, time(NULL));
}
}
- serv_got_typing_stopped(gc, jm->from);
+ purple_purple_serv_got_typing_stopped(gc, jm->from);
} else {
- serv_got_typing_stopped(gc, jm->from);
+ purple_purple_serv_got_typing_stopped(gc, jm->from);
}
} else {
if (jid->resource) {
@@ -155,7 +155,7 @@ static void handle_chat(JabberMessage *jm)
jm->body = jabber_google_format_to_html(jm->body);
g_free(tmp);
}
- serv_got_im(gc, jm->from, jm->xhtml ? jm->xhtml : jm->body, 0, jm->sent);
+ purple_serv_got_im(gc, jm->from, jm->xhtml ? jm->xhtml : jm->body, 0, jm->sent);
}
jabber_id_free(jid);
@@ -249,7 +249,7 @@ static void handle_groupchat(JabberMessage *jm)
if(jm->xhtml || jm->body) {
if(jid->resource)
- serv_got_chat_in(jm->js->gc, chat->id, jid->resource,
+ purple_serv_got_chat_in(jm->js->gc, chat->id, jid->resource,
messageFlags | (jm->delayed ? PURPLE_MESSAGE_DELAYED : 0),
jm->xhtml ? jm->xhtml : jm->body, jm->sent);
else if(chat->muc)
@@ -277,7 +277,7 @@ static void handle_groupchat_invite(JabberMessage *jm)
g_hash_table_replace(components, "password", g_strdup(jm->password));
jabber_id_free(jid);
- serv_got_chat_invite(jm->js->gc, jm->to, jm->from, jm->body, components);
+ purple_purple_serv_got_chat_invite(jm->js->gc, jm->to, jm->from, jm->body, components);
}
static void handle_error(JabberMessage *jm)
diff --git a/libpurple/protocols/jabber/presence.c b/libpurple/protocols/jabber/presence.c
index b30f766293..cc1f4470ef 100644
--- a/libpurple/protocols/jabber/presence.c
+++ b/libpurple/protocols/jabber/presence.c
@@ -441,7 +441,7 @@ jabber_vcard_parse_avatar(JabberStream *js, const char *from,
}
if (nickname) {
- serv_got_alias(js->gc, from, nickname);
+ purple_serv_got_alias(js->gc, from, nickname);
g_free(nickname);
}
@@ -552,7 +552,7 @@ handle_presence_chat(JabberStream *js, JabberPresence *presence, PurpleXmlNode *
} else {
title = g_strdup_printf(_("Error in chat %s"), presence->from);
if (g_hash_table_size(chat->members) == 0)
- serv_got_chat_left(js->gc, chat->id);
+ purple_serv_got_chat_left(js->gc, chat->id);
}
purple_notify_error(js->gc, title, title, msg,
purple_request_cpar_from_connection(js->gc));
@@ -625,7 +625,7 @@ handle_presence_chat(JabberStream *js, JabberPresence *presence, PurpleXmlNode *
if(!chat->conv) {
char *room_jid = g_strdup_printf("%s@%s", presence->jid_from->node, presence->jid_from->domain);
chat->id = i++;
- chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid);
+ chat->conv = purple_serv_got_joined_chat(js->gc, chat->id, room_jid);
purple_chat_conversation_set_nick(chat->conv, chat->handle);
jabber_chat_disco_traffic(chat);
@@ -787,7 +787,7 @@ handle_presence_chat(JabberStream *js, JabberPresence *presence, PurpleXmlNode *
purple_conversation_write_message(PURPLE_CONVERSATION(chat->conv), presence->jid_from->resource,
presence->status, PURPLE_MESSAGE_SYSTEM, time(NULL));
- serv_got_chat_left(js->gc, chat->id);
+ purple_serv_got_chat_left(js->gc, chat->id);
jabber_chat_destroy(chat);
} else {
purple_chat_conversation_remove_user(chat->conv, presence->jid_from->resource,
@@ -887,7 +887,7 @@ handle_presence_contact(JabberStream *js, JabberPresence *presence)
purple_prpl_got_user_idle(account, buddy_name,
jbr->idle, jbr->idle);
if (presence->nickname)
- serv_got_alias(js->gc, buddy_name, presence->nickname);
+ purple_serv_got_alias(js->gc, buddy_name, presence->nickname);
} else {
purple_prpl_got_user_status(account, buddy_name,
jabber_buddy_state_get_status_id(JABBER_BUDDY_STATE_UNAVAILABLE),
diff --git a/libpurple/protocols/jabber/roster.c b/libpurple/protocols/jabber/roster.c
index 71d17acb59..1129130e48 100644
--- a/libpurple/protocols/jabber/roster.c
+++ b/libpurple/protocols/jabber/roster.c
@@ -143,7 +143,7 @@ static void add_purple_buddy_to_groups(JabberStream *js, const char *jid,
/* Previously stored serverside / buddy-supplied alias */
if((servernick = purple_blist_node_get_string((PurpleBlistNode*)b, "servernick")))
- serv_got_alias(js->gc, jid, servernick);
+ purple_serv_got_alias(js->gc, jid, servernick);
/* Alias from our roster retrieval */
balias = purple_buddy_get_local_alias(b);
diff --git a/libpurple/protocols/jabber/usernick.c b/libpurple/protocols/jabber/usernick.c
index 76be58a9e1..92f64d7302 100644
--- a/libpurple/protocols/jabber/usernick.c
+++ b/libpurple/protocols/jabber/usernick.c
@@ -45,7 +45,7 @@ static void jabber_nick_cb(JabberStream *js, const char *from, PurpleXmlNode *it
if (!nick)
return;
nickname = purple_xmlnode_get_data(nick);
- serv_got_alias(js->gc, from, nickname);
+ purple_serv_got_alias(js->gc, from, nickname);
g_free(nickname);
}
diff --git a/libpurple/protocols/msn/msg.c b/libpurple/protocols/msn/msg.c
index e5b154bfcd..334706aeda 100644
--- a/libpurple/protocols/msn/msg.c
+++ b/libpurple/protocols/msn/msg.c
@@ -702,7 +702,7 @@ msn_plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
purple_debug_misc("msn", "plain_msg: current_users(%d)\n",
swboard->current_users);
- serv_got_chat_in(gc, swboard->chat_id, passport, 0, body_final,
+ purple_serv_got_chat_in(gc, swboard->chat_id, passport, 0, body_final,
time(NULL));
if (swboard->conv == NULL)
{
@@ -713,7 +713,7 @@ msn_plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
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));
+ purple_serv_got_im(gc, passport, body_final, 0, time(NULL));
if (swboard->conv == NULL)
{
swboard->conv = PURPLE_CONVERSATION(purple_conversations_find_im_with_account(
@@ -723,7 +723,7 @@ msn_plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
}
} else {
- serv_got_im(gc, passport, body_final, 0, time(NULL));
+ purple_serv_got_im(gc, passport, body_final, 0, time(NULL));
}
g_free(body_final);
@@ -746,12 +746,12 @@ msn_control_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
if (swboard->current_users == 1)
{
- serv_got_typing(gc, passport, MSN_TYPING_RECV_TIMEOUT,
+ purple_serv_got_typing(gc, passport, MSN_TYPING_RECV_TIMEOUT,
PURPLE_IM_TYPING);
}
} else {
- serv_got_typing(gc, passport, MSN_TYPING_RECV_TIMEOUT,
+ purple_serv_got_typing(gc, passport, MSN_TYPING_RECV_TIMEOUT,
PURPLE_IM_TYPING);
}
}
@@ -795,12 +795,12 @@ datacast_inform_user(MsnSwitchBoard *swboard, const char *who,
}
if (chat)
- serv_got_chat_in(pc,
+ purple_serv_got_chat_in(pc,
purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(swboard->conv)),
who, PURPLE_MESSAGE_RECV|PURPLE_MESSAGE_SYSTEM, str,
time(NULL));
else
- serv_got_im(pc, who, str, PURPLE_MESSAGE_RECV|PURPLE_MESSAGE_SYSTEM,
+ purple_serv_got_im(pc, who, str, PURPLE_MESSAGE_RECV|PURPLE_MESSAGE_SYSTEM,
time(NULL));
g_free(str);
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
index cd8ed96367..030c4c6bc3 100644
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -851,7 +851,7 @@ initiate_chat_cb(PurpleBlistNode *node, gpointer data)
/* TODO: This might move somewhere else, after USR might be */
swboard->chat_id = msn_switchboard_get_chat_id();
- swboard->conv = PURPLE_CONVERSATION(serv_got_joined_chat(gc,
+ swboard->conv = PURPLE_CONVERSATION(purple_serv_got_joined_chat(gc,
swboard->chat_id, "MSN Chat"));
swboard->flag = MSN_SB_FLAG_IM;
@@ -1405,7 +1405,7 @@ static gboolean
msn_send_me_im(gpointer data)
{
MsnIMData *imdata = data;
- serv_got_im(imdata->gc, imdata->who, imdata->msg, imdata->flags, imdata->when);
+ purple_serv_got_im(imdata->gc, imdata->who, imdata->msg, imdata->flags, imdata->when);
g_object_unref(imdata->gc);
g_free(imdata->msg);
@@ -1630,7 +1630,7 @@ msn_send_im(PurpleConnection *gc, const char *who, const char *message,
g_free(pre);
g_free(post);
- serv_got_typing_stopped(gc, who);
+ purple_purple_serv_got_typing_stopped(gc, who);
imdata->gc = g_object_ref(gc);
imdata->who = who;
imdata->msg = body_str;
@@ -1666,7 +1666,7 @@ msn_send_typing(PurpleConnection *gc, const char *who, PurpleIMTypingState state
if (!g_ascii_strcasecmp(who, purple_account_get_username(account)))
{
/* We'll just fake it, since we're sending to ourself. */
- serv_got_typing(gc, who, MSN_TYPING_RECV_TIMEOUT, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc, who, MSN_TYPING_RECV_TIMEOUT, PURPLE_IM_TYPING);
return MSN_TYPING_SEND_TIMEOUT;
}
@@ -2084,7 +2084,7 @@ msn_chat_send(PurpleConnection *gc, int id, const char *message, PurpleMessageFl
g_free(msgformat);
g_free(msgtext);
- serv_got_chat_in(gc, id, purple_account_get_username(account), flags,
+ purple_serv_got_chat_in(gc, id, purple_account_get_username(account), flags,
message, time(NULL));
return 0;
diff --git a/libpurple/protocols/msn/notification.c b/libpurple/protocols/msn/notification.c
index 1a3eb55f95..322fcebc6d 100644
--- a/libpurple/protocols/msn/notification.c
+++ b/libpurple/protocols/msn/notification.c
@@ -1241,7 +1241,7 @@ ipg_cmd_post(MsnCmdProc *cmdproc, MsnCommand *cmd, char *payload, size_t len)
}
}
} else {
- serv_got_im(gc, who, text, 0, time(NULL));
+ purple_serv_got_im(gc, who, text, 0, time(NULL));
}
g_free(text);
diff --git a/libpurple/protocols/msn/oim.c b/libpurple/protocols/msn/oim.c
index 3293ef43b5..8007bb190e 100644
--- a/libpurple/protocols/msn/oim.c
+++ b/libpurple/protocols/msn/oim.c
@@ -738,7 +738,7 @@ msn_oim_report_to_user(MsnOimRecvData *rdata, const char *msg_str)
purple_debug_info("msn", "oim Date:{%s},passport{%s}\n",
date, passport);
- serv_got_im(purple_account_get_connection(rdata->oim->session->account), passport, clean_msg, 0,
+ purple_serv_got_im(purple_account_get_connection(rdata->oim->session->account), passport, clean_msg, 0,
stamp);
/*Now get the oim message ID from the oim_list.
diff --git a/libpurple/protocols/msn/switchboard.c b/libpurple/protocols/msn/switchboard.c
index 7352a11e72..238492d2b3 100644
--- a/libpurple/protocols/msn/switchboard.c
+++ b/libpurple/protocols/msn/switchboard.c
@@ -311,7 +311,7 @@ msn_switchboard_add_user(MsnSwitchBoard *swboard, const char *user)
swboard->chat_id = msn_switchboard_get_chat_id();
swboard->flag |= MSN_SB_FLAG_IM;
- swboard->conv = PURPLE_CONVERSATION(serv_got_joined_chat(purple_account_get_connection(account),
+ swboard->conv = PURPLE_CONVERSATION(purple_serv_got_joined_chat(purple_account_get_connection(account),
swboard->chat_id,
"MSN Chat"));
@@ -750,7 +750,7 @@ out_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
swboard = cmdproc->data;
if (swboard->current_users > 1)
- serv_got_chat_left(gc, swboard->chat_id);
+ purple_serv_got_chat_left(gc, swboard->chat_id);
msn_switchboard_disconnect(swboard);
}
@@ -833,10 +833,10 @@ msn_switchboard_show_ink(MsnSwitchBoard *swboard, const char *passport,
if (swboard->current_users > 1 ||
((swboard->conv != NULL) &&
PURPLE_IS_CHAT_CONVERSATION(swboard->conv)))
- serv_got_chat_in(gc, swboard->chat_id, passport, 0, image_msg,
+ purple_serv_got_chat_in(gc, swboard->chat_id, passport, 0, image_msg,
time(NULL));
else
- serv_got_im(gc, passport, image_msg, 0, time(NULL));
+ purple_serv_got_im(gc, passport, image_msg, 0, time(NULL));
purple_imgstore_unref_by_id(imgid);
g_free(image_msg);
diff --git a/libpurple/protocols/msn/user.c b/libpurple/protocols/msn/user.c
index 70ab08b8c9..efb0d90381 100644
--- a/libpurple/protocols/msn/user.c
+++ b/libpurple/protocols/msn/user.c
@@ -233,7 +233,7 @@ msn_user_set_friendly_name(MsnUser *user, const char *name)
g_free(user->friendly_name);
user->friendly_name = g_strdup(name);
- serv_got_alias(purple_account_get_connection(user->userlist->session->account),
+ purple_serv_got_alias(purple_account_get_connection(user->userlist->session->account),
user->passport, name);
return TRUE;
}
diff --git a/libpurple/protocols/msn/userlist.c b/libpurple/protocols/msn/userlist.c
index f25f8a565e..b9a4453d0b 100644
--- a/libpurple/protocols/msn/userlist.c
+++ b/libpurple/protocols/msn/userlist.c
@@ -146,7 +146,7 @@ msn_got_lst_user(MsnSession *session, MsnUser *user,
/* FIXME: It might be a real alias */
/* Umm, what? This might fix bug #1385130 */
- serv_got_alias(gc, passport, store);
+ purple_serv_got_alias(gc, passport, store);
}
if (list_op & MSN_LIST_AL_OP)
diff --git a/libpurple/protocols/mxit/markup.c b/libpurple/protocols/mxit/markup.c
index 58e526668e..c3322f87d3 100644
--- a/libpurple/protocols/mxit/markup.c
+++ b/libpurple/protocols/mxit/markup.c
@@ -333,7 +333,7 @@ static void mxit_show_split_message( struct RXMsgData* mx )
}
/* push message to pidgin */
- serv_got_im( mx->session->con, mx->from, msg->str, mx->flags, mx->timestamp );
+ purple_serv_got_im( mx->session->con, mx->from, msg->str, mx->flags, mx->timestamp );
g_string_free( msg, TRUE );
msg = NULL;
@@ -357,7 +357,7 @@ static void mxit_show_split_message( struct RXMsgData* mx )
ch[pos] = '\n';
/* push message to pidgin */
- serv_got_im( mx->session->con, mx->from, msg->str, mx->flags, mx->timestamp );
+ purple_serv_got_im( mx->session->con, mx->from, msg->str, mx->flags, mx->timestamp );
g_string_free( msg, TRUE );
msg = NULL;
}
@@ -430,7 +430,7 @@ void mxit_show_message( struct RXMsgData* mx )
}
else {
/* this is a multimx message */
- serv_got_chat_in( mx->session->con, mx->chatid, mx->from, mx->flags, mx->msg->str, mx->timestamp);
+ purple_serv_got_chat_in( mx->session->con, mx->chatid, mx->from, mx->flags, mx->msg->str, mx->timestamp);
}
/* freeup resource */
diff --git a/libpurple/protocols/mxit/multimx.c b/libpurple/protocols/mxit/multimx.c
index b259a14d57..c499d45994 100644
--- a/libpurple/protocols/mxit/multimx.c
+++ b/libpurple/protocols/mxit/multimx.c
@@ -228,7 +228,7 @@ static void you_kicked(PurpleChatConversation* chat, struct MXitSession* session
purple_conversation_write_message(PURPLE_CONVERSATION(chat), "MXit", _("You have been kicked from this MultiMX."), PURPLE_MESSAGE_SYSTEM, time(NULL));
purple_chat_conversation_clear_users(chat);
- serv_got_chat_left(session->con, multimx->chatid);
+ purple_serv_got_chat_left(session->con, multimx->chatid);
}
@@ -288,7 +288,7 @@ void multimx_invite(struct MXitSession* session, struct contact* contact, const
g_hash_table_insert(components, g_strdup("room"), g_strdup(contact->alias));
/* Call libpurple - will trigger either 'mxit_chat_join' or 'mxit_chat_reject' */
- serv_got_chat_invite(session->con, contact->alias, creator, NULL, components);
+ purple_purple_serv_got_chat_invite(session->con, contact->alias, creator, NULL, components);
}
@@ -316,7 +316,7 @@ void multimx_created(struct MXitSession* session, struct contact* contact)
}
/* Call libpurple - will trigger 'mxit_chat_join' */
- serv_got_joined_chat(gc, multimx->chatid, multimx->roomname);
+ purple_serv_got_joined_chat(gc, multimx->chatid, multimx->roomname);
/* Send ".list" command to GroupChat server to retrieve current member-list */
mxit_send_message(session, multimx->roomid, ".list", FALSE, FALSE);
@@ -413,7 +413,7 @@ void multimx_message_received(struct RXMsgData* mx, char* msg, int msglen, short
}
else {
/* Display server message in chat window */
- serv_got_chat_in(mx->session->con, multimx->chatid, "MXit", PURPLE_MESSAGE_SYSTEM, msg, mx->timestamp);
+ purple_serv_got_chat_in(mx->session->con, multimx->chatid, "MXit", PURPLE_MESSAGE_SYSTEM, msg, mx->timestamp);
mx->processed = TRUE;
}
}
@@ -480,7 +480,7 @@ void mxit_chat_join(PurpleConnection *gc, GHashTable *components)
/* Join existing room */
purple_debug_info(MXIT_PLUGIN_ID, "Groupchat %i rejoined\n", multimx->chatid);
- serv_got_joined_chat(gc, multimx->chatid, multimx->roomname);
+ purple_serv_got_joined_chat(gc, multimx->chatid, multimx->roomname);
}
}
else {
@@ -641,7 +641,7 @@ int mxit_chat_send(PurpleConnection *gc, int id, const char *message, PurpleMess
nickname = purple_account_get_private_alias(purple_connection_get_account(gc)); /* local alias */
/* Display message in chat window */
- serv_got_chat_in(gc, id, nickname, flags, message, time(NULL));
+ purple_serv_got_chat_in(gc, id, nickname, flags, message, time(NULL));
return 0;
}
diff --git a/libpurple/protocols/mxit/mxit.c b/libpurple/protocols/mxit/mxit.c
index 5f6eaf0383..9c2a651124 100644
--- a/libpurple/protocols/mxit/mxit.c
+++ b/libpurple/protocols/mxit/mxit.c
@@ -212,7 +212,7 @@ static void mxit_cb_chat_created( PurpleConversation* conv, struct MXitSession*
case MXIT_TYPE_GALLERY :
case MXIT_TYPE_INFO :
tmp = g_strdup_printf("<font color=\"#999999\">%s</font>\n", _( "Loading menu..." ));
- serv_got_im( session->con, who, tmp, PURPLE_MESSAGE_NOTIFY, time( NULL ) );
+ purple_serv_got_im( session->con, who, tmp, PURPLE_MESSAGE_NOTIFY, time( NULL ) );
g_free( tmp );
mxit_send_message( session, who, " ", FALSE, FALSE );
default :
diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
index cb3557e9aa..19ab24640e 100644
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -1549,7 +1549,7 @@ static void mxit_parse_cmd_message( struct MXitSession* session, struct record**
message = mxit_decrypt_message( session, message );
if ( !message ) {
/* could not be decrypted */
- serv_got_im( session->con, sender, _( "An encrypted message was received which could not be decrypted." ), PURPLE_MESSAGE_ERROR, time( NULL ) );
+ purple_serv_got_im( session->con, sender, _( "An encrypted message was received which could not be decrypted." ), PURPLE_MESSAGE_ERROR, time( NULL ) );
return;
}
}
@@ -2068,11 +2068,11 @@ static void mxit_parse_cmd_msgevent( struct MXitSession* session, struct record*
switch ( event ) {
case CP_MSGEVENT_TYPING : /* user is typing */
case CP_MSGEVENT_ANGRY : /* user is typing angrily */
- serv_got_typing( session->con, records[0]->fields[0]->data, 0, PURPLE_IM_TYPING );
+ purple_serv_got_typing( session->con, records[0]->fields[0]->data, 0, PURPLE_IM_TYPING );
break;
case CP_MSGEVENT_STOPPED : /* user has stopped typing */
- serv_got_typing_stopped( session->con, records[0]->fields[0]->data );
+ purple_purple_serv_got_typing_stopped( session->con, records[0]->fields[0]->data );
break;
case CP_MSGEVENT_ERASING : /* user is erasing text */
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
index ba116d0cdd..c5a93aea9b 100644
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -1040,9 +1040,9 @@ msim_add_contact_from_server_cb(MsimSession *session, const MsimMessage *user_lo
*/
if (display_name != NULL) {
purple_blist_node_set_string(PURPLE_BLIST_NODE(buddy), "DisplayName", display_name);
- serv_got_alias(session->gc, username, display_name);
+ purple_serv_got_alias(session->gc, username, display_name);
} else {
- serv_got_alias(session->gc, username,
+ purple_serv_got_alias(session->gc, username,
purple_blist_node_get_string(PURPLE_BLIST_NODE(buddy), "DisplayName"));
}
}
@@ -1521,7 +1521,7 @@ msim_incoming_im(MsimSession *session, MsimMessage *msg, const gchar *username)
time_received = time(NULL);
}
- serv_got_im(session->gc, username, msg_purple_markup, PURPLE_MESSAGE_RECV, time_received);
+ purple_serv_got_im(session->gc, username, msg_purple_markup, PURPLE_MESSAGE_RECV, time_received);
g_free(msg_purple_markup);
@@ -1555,10 +1555,10 @@ msim_incoming_action_or_im(MsimSession *session, MsimMessage *msg)
msg_text, username);
if (g_str_equal(msg_text, "%typing%")) {
- serv_got_typing(session->gc, username, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(session->gc, username, 0, PURPLE_IM_TYPING);
rc = TRUE;
} else if (g_str_equal(msg_text, "%stoptyping%")) {
- serv_got_typing_stopped(session->gc, username);
+ purple_purple_serv_got_typing_stopped(session->gc, username);
rc = TRUE;
} else if (strstr(msg_text, "!!!ZAP_SEND!!!=RTE_BTN_ZAPS_")) {
rc = msim_incoming_zap(session, msg);
@@ -1613,8 +1613,8 @@ msim_incoming_media(MsimSession *session, MsimMessage *msg)
/* Media messages are sent when the user opens a window to someone.
* Tell libpurple they started typing and stopped typing, to inform the Psychic
* Mode plugin so it too can open a window to the user. */
- serv_got_typing(session->gc, username, 0, PURPLE_IM_TYPING);
- serv_got_typing_stopped(session->gc, username);
+ purple_serv_got_typing(session->gc, username, 0, PURPLE_IM_TYPING);
+ purple_purple_serv_got_typing_stopped(session->gc, username);
g_free(username);
diff --git a/libpurple/protocols/novell/novell.c b/libpurple/protocols/novell/novell.c
index 106113a006..f7e60167c8 100644
--- a/libpurple/protocols/novell/novell.c
+++ b/libpurple/protocols/novell/novell.c
@@ -673,7 +673,7 @@ _join_conf_resp_cb(NMUser * user, NMERR_T ret_code,
if (ret_code == NM_OK) {
conf_name = _get_conference_name(++user->conference_count);
- chat = serv_got_joined_chat(gc, user->conference_count, conf_name);
+ chat = purple_serv_got_joined_chat(gc, user->conference_count, conf_name);
if (chat) {
nm_conference_set_data(conference, (gpointer) chat);
@@ -1657,7 +1657,7 @@ _initiate_conference_cb(PurpleBlistNode *node, gpointer ignored)
return;
conf_name = _get_conference_name(++user->conference_count);
- chat = serv_got_joined_chat(gc, user->conference_count, conf_name);
+ chat = purple_serv_got_joined_chat(gc, user->conference_count, conf_name);
if (chat) {
conference = nm_create_conference(NULL);
@@ -1813,7 +1813,7 @@ _evt_receive_message(NMUser * user, NMEvent * event)
if (nm_event_get_type(event) == NMEVT_RECEIVE_AUTOREPLY)
flags |= PURPLE_MESSAGE_AUTO_RESP;
- serv_got_im(purple_account_get_connection(user->client_data),
+ purple_serv_got_im(purple_account_get_connection(user->client_data),
nm_user_record_get_display_id(user_record),
text, flags,
nm_event_get_gmt(event));
@@ -1868,7 +1868,7 @@ _evt_receive_message(NMUser * user, NMEvent * event)
name = nm_user_record_get_display_id(user_record);
}
- serv_got_chat_in(purple_account_get_connection(user->client_data),
+ purple_serv_got_chat_in(purple_account_get_connection(user->client_data),
purple_chat_conversation_get_id(chat),
name, 0, text, nm_event_get_gmt(event));
}
@@ -1953,7 +1953,7 @@ _evt_conference_invite(NMUser * user, NMEvent * event)
parms = g_slist_append(parms, nm_event_get_conference(event));
/* Prompt the user */
- /* TODO: Would it be better to use serv_got_chat_invite() here? */
+ /* TODO: Would it be better to use purple_purple_serv_got_chat_invite() here? */
gc = purple_account_get_connection(user->client_data);
purple_request_action(gc, title, primary, secondary,
PURPLE_DEFAULT_ACTION_NONE,
@@ -1988,7 +1988,7 @@ _evt_conference_joined(NMUser * user, NMEvent * event)
if (ur) {
conf_name = _get_conference_name(++user->conference_count);
chat =
- serv_got_joined_chat(gc, user->conference_count, conf_name);
+ purple_serv_got_joined_chat(gc, user->conference_count, conf_name);
if (chat) {
nm_conference_set_data(conference, (gpointer) chat);
@@ -2072,7 +2072,7 @@ _evt_user_typing(NMUser * user, NMEvent * event)
if (gc) {
user_record = nm_find_user_record(user, nm_event_get_source(event));
if (user_record) {
- serv_got_typing(gc, nm_user_record_get_display_id(user_record),
+ purple_serv_got_typing(gc, nm_user_record_get_display_id(user_record),
30, PURPLE_IM_TYPING);
}
}
@@ -2088,7 +2088,7 @@ _evt_user_not_typing(NMUser * user, NMEvent * event)
if (gc) {
user_record = nm_find_user_record(user, nm_event_get_source(event));
if (user_record) {
- serv_got_typing_stopped(gc,
+ purple_purple_serv_got_typing_stopped(gc,
nm_user_record_get_display_id(user_record));
}
}
@@ -2441,7 +2441,7 @@ novell_chat_leave(PurpleConnection * gc, int id)
}
}
- serv_got_chat_left(gc, id);
+ purple_serv_got_chat_left(gc, id);
}
static void
@@ -2537,7 +2537,7 @@ novell_chat_send(PurpleConnection * gc, int id, const char *text, PurpleMessageF
}
}
- serv_got_chat_in(gc, id, name, flags, text, time(NULL));
+ purple_serv_got_chat_in(gc, id, name, flags, text, time(NULL));
return 0;
} else
return -1;
diff --git a/libpurple/protocols/null/nullprpl.c b/libpurple/protocols/null/nullprpl.c
index 7f46f6e5b3..b4ad3a1a84 100644
--- a/libpurple/protocols/null/nullprpl.c
+++ b/libpurple/protocols/null/nullprpl.c
@@ -392,7 +392,7 @@ static void nullprpl_login(PurpleAccount *acct)
GOfflineMessage *message = (GOfflineMessage *)offline_messages->data;
purple_debug_info("nullprpl", "delivering offline message to %s: %s\n",
purple_account_get_username(acct), message->message);
- serv_got_im(gc, message->from, message->message, message->flags,
+ purple_serv_got_im(gc, message->from, message->message, message->flags,
message->mtime);
offline_messages = g_list_next(offline_messages);
@@ -439,7 +439,7 @@ static int nullprpl_send_im(PurpleConnection *gc, const char *who,
/* is the recipient online? */
to = get_nullprpl_gc(who);
if (to) { /* yes, send */
- serv_got_im(to, from_username, message, receive_flags, time(NULL));
+ purple_serv_got_im(to, from_username, message, receive_flags, time(NULL));
} else { /* nope, store as an offline message */
GOfflineMessage *offline_message;
@@ -482,7 +482,7 @@ static void notify_typing(PurpleConnection *from, PurpleConnection *to,
purple_debug_info("nullprpl", "notifying %s that %s %s\n",
purple_account_get_username(purple_connection_get_account(to)), from_username, action);
- serv_got_typing(to,
+ purple_serv_got_typing(to,
from_username,
0, /* if non-zero, a timeout in seconds after which to
* reset the typing status to PURPLE_IM_NOT_TYPING */
@@ -679,7 +679,7 @@ static void nullprpl_join_chat(PurpleConnection *gc, GHashTable *components) {
purple_debug_info("nullprpl", "%s is joining chat room %s\n", username, room);
if (!purple_conversations_find_chat(gc, chat_id)) {
- serv_got_joined_chat(gc, chat_id, room);
+ purple_serv_got_joined_chat(gc, chat_id, room);
/* tell everyone that we joined, and add them if they're already there */
foreach_gc_in_chat(joined_chat, gc, chat_id, NULL);
@@ -750,7 +750,7 @@ static void nullprpl_chat_invite(PurpleConnection *gc, int id,
components = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
g_hash_table_replace(components, "room", g_strdup(room));
g_hash_table_replace(components, "invited_by", g_strdup(username));
- serv_got_chat_invite(purple_account_get_connection(to_acct), room, username, message, components);
+ purple_purple_serv_got_chat_invite(purple_account_get_connection(to_acct), room, username, message, components);
}
}
}
@@ -821,7 +821,7 @@ static PurpleCmdRet send_whisper(PurpleConversation *conv, const gchar *cmd,
g_free(message_to);
/* send the whisper */
- serv_chat_whisper(to, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(conv)),
+ purple_serv_chat_whisper(to, purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(conv)),
from_username, message);
return PURPLE_CMD_RET_OK;
@@ -838,7 +838,7 @@ static void nullprpl_chat_whisper(PurpleConnection *gc, int id, const char *who,
message);
/* receive whisper on recipient's account */
- serv_got_chat_in(gc, id, who, PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_WHISPER,
+ purple_serv_got_chat_in(gc, id, who, PURPLE_MESSAGE_RECV | PURPLE_MESSAGE_WHISPER,
message, time(NULL));
}
@@ -850,7 +850,7 @@ static void receive_chat_message(PurpleChatConversation *from, PurpleChatConvers
purple_debug_info("nullprpl",
"%s receives message from %s in chat room %s: %s\n",
purple_chat_conversation_get_nick(to), purple_chat_conversation_get_nick(from), room, message);
- serv_got_chat_in(to_gc, id, purple_chat_conversation_get_nick(from), PURPLE_MESSAGE_RECV, message,
+ purple_serv_got_chat_in(to_gc, id, purple_chat_conversation_get_nick(from), PURPLE_MESSAGE_RECV, message,
time(NULL));
}
diff --git a/libpurple/protocols/oscar/family_icq.c b/libpurple/protocols/oscar/family_icq.c
index a2b52c109d..fc84019872 100644
--- a/libpurple/protocols/oscar/family_icq.c
+++ b/libpurple/protocols/oscar/family_icq.c
@@ -425,7 +425,7 @@ gotalias(OscarData *od, struct aim_icq_info *info)
if (utf8 && *utf8) {
gchar who[16];
g_snprintf(who, sizeof(who), "%u", info->uin);
- serv_got_alias(gc, who, utf8);
+ purple_serv_got_alias(gc, who, utf8);
if ((b = purple_blist_find_buddy(account, who))) {
purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", utf8);
}
diff --git a/libpurple/protocols/oscar/odc.c b/libpurple/protocols/oscar/odc.c
index e2ba1ff9b8..8d947fdfbd 100644
--- a/libpurple/protocols/oscar/odc.c
+++ b/libpurple/protocols/oscar/odc.c
@@ -406,7 +406,7 @@ peer_odc_handle_payload(PeerConnection *conn, const char *msg, size_t len, int e
imflags |= PURPLE_MESSAGE_IMAGES;
if (autoreply)
imflags |= PURPLE_MESSAGE_AUTO_RESP;
- serv_got_im(gc, conn->bn, newmsg->str, imflags, time(NULL));
+ purple_serv_got_im(gc, conn->bn, newmsg->str, imflags, time(NULL));
g_string_free(newmsg, TRUE);
/* unref any images we allocated */
@@ -587,15 +587,15 @@ peer_odc_recv_frame(PeerConnection *conn, ByteStream *bs)
purple_debug_info("oscar", "ohmigod! %s has started typing "
"(DirectIM). He's going to send you a message! "
"*squeal*\n", conn->bn);
- serv_got_typing(gc, conn->bn, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc, conn->bn, 0, PURPLE_IM_TYPING);
}
else if (frame->flags & 0x0004)
{
- serv_got_typing(gc, conn->bn, 0, PURPLE_IM_TYPED);
+ purple_serv_got_typing(gc, conn->bn, 0, PURPLE_IM_TYPED);
}
else
{
- serv_got_typing_stopped(gc, conn->bn);
+ purple_purple_serv_got_typing_stopped(gc, conn->bn);
}
if (frame->payload.len > 0)
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
index cdb82cceb9..9d9e2a9081 100644
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -272,7 +272,7 @@ oscar_chat_kill(PurpleConnection *gc, struct chat_connection *cc)
OscarData *od = purple_connection_get_protocol_data(gc);
/* Notify the conversation window that we've left the chat */
- serv_got_chat_left(gc, purple_chat_conversation_get_id(cc->conv));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(cc->conv));
/* Destroy the chat_connection */
od->oscar_chats = g_slist_remove(od->oscar_chats, cc);
@@ -507,7 +507,7 @@ flap_connection_established_chat(OscarData *od, FlapConnection *conn)
chatcon = find_oscar_chat_by_conn(gc, conn);
if (chatcon) {
chatcon->id = id;
- chatcon->conv = serv_got_joined_chat(gc, id++, chatcon->show);
+ chatcon->conv = purple_serv_got_joined_chat(gc, id++, chatcon->show);
}
}
@@ -1193,7 +1193,7 @@ static int purple_parse_oncoming(OscarData *od, FlapConnection *conn, FlapFrame
break;
}
}
- serv_got_alias(gc, info->bn,
+ purple_serv_got_alias(gc, info->bn,
bn_has_formatting ? info->bn : NULL);
}
@@ -1478,7 +1478,7 @@ static int incomingim_chan1(OscarData *od, FlapConnection *conn, aim_userinfo_t
tmp = tmp2;
}
- serv_got_im(gc, userinfo->bn, tmp, flags, (args->icbmflags & AIM_IMFLAGS_OFFLINE) ? args->timestamp : time(NULL));
+ purple_serv_got_im(gc, userinfo->bn, tmp, flags, (args->icbmflags & AIM_IMFLAGS_OFFLINE) ? args->timestamp : time(NULL));
g_free(tmp);
return 1;
@@ -1533,7 +1533,7 @@ incomingim_chan2(OscarData *od, FlapConnection *conn, aim_userinfo_t *userinfo,
g_hash_table_replace(components, g_strdup("room"), utf8name);
g_hash_table_replace(components, g_strdup("exchange"),
g_strdup_printf("%d", args->info.chat.roominfo.exchange));
- serv_got_chat_invite(gc,
+ purple_purple_serv_got_chat_invite(gc,
utf8name,
userinfo->bn,
message,
@@ -1620,7 +1620,7 @@ incomingim_chan2(OscarData *od, FlapConnection *conn, aim_userinfo_t *userinfo,
tmp2 = purple_strreplace(tmp, "\r\n", "<br>");
g_free(tmp);
- serv_got_im(gc, userinfo->bn, tmp2, flags, time(NULL));
+ purple_serv_got_im(gc, userinfo->bn, tmp2, flags, time(NULL));
aim_im_send_icq_confirmation(od, userinfo->bn, args->cookie);
g_free(tmp2);
}
@@ -1711,9 +1711,9 @@ incomingim_chan4(OscarData *od, FlapConnection *conn, aim_userinfo_t *userinfo,
t -= timezone;
# endif
#endif
- serv_got_im(gc, uin, tmp, 0, t);
+ purple_serv_got_im(gc, uin, tmp, 0, t);
} else { /* This is a message from MacICQ/Miranda */
- serv_got_im(gc, uin, tmp, 0, time(NULL));
+ purple_serv_got_im(gc, uin, tmp, 0, time(NULL));
}
g_free(uin);
g_free(tmp);
@@ -1727,7 +1727,7 @@ incomingim_chan4(OscarData *od, FlapConnection *conn, aim_userinfo_t *userinfo,
gchar *message = g_strdup_printf("<A HREF=\"%s\">%s</A>",
msg2[1],
(msg2[0] && msg2[0][0]) ? msg2[0] : msg2[1]);
- serv_got_im(gc, uin, message, 0, time(NULL));
+ purple_serv_got_im(gc, uin, message, 0, time(NULL));
g_free(uin);
g_free(message);
}
@@ -1895,7 +1895,7 @@ incomingim_chan4(OscarData *od, FlapConnection *conn, aim_userinfo_t *userinfo,
message = purple_xmlnode_get_data(xmltmp);
if ((uin != NULL) && (message != NULL))
- serv_got_im(gc, uin, message, 0, time(NULL));
+ purple_serv_got_im(gc, uin, message, 0, time(NULL));
g_free(uin);
g_free(message);
@@ -2194,19 +2194,19 @@ static int purple_parse_mtn(OscarData *od, FlapConnection *conn, FlapFrame *fr,
switch (event) {
case 0x0000: { /* Text has been cleared */
- serv_got_typing_stopped(gc, bn);
+ purple_purple_serv_got_typing_stopped(gc, bn);
} break;
case 0x0001: { /* Paused typing */
- serv_got_typing(gc, bn, 0, PURPLE_IM_TYPED);
+ purple_serv_got_typing(gc, bn, 0, PURPLE_IM_TYPED);
} break;
case 0x0002: { /* Typing */
- serv_got_typing(gc, bn, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc, bn, 0, PURPLE_IM_TYPING);
} break;
case 0x000f: { /* Closed IM window */
- serv_got_typing_stopped(gc, bn);
+ purple_purple_serv_got_typing_stopped(gc, bn);
} break;
default: {
@@ -2409,7 +2409,7 @@ static int purple_chat_conversation_incoming_msg(OscarData *od, FlapConnection *
va_end(ap);
utf8 = oscar_encoding_to_utf8(charset, msg, len);
- serv_got_chat_in(gc, ccon->id, info->bn, 0, utf8, time(NULL));
+ purple_serv_got_chat_in(gc, ccon->id, info->bn, 0, utf8, time(NULL));
g_free(utf8);
return 1;
@@ -2702,7 +2702,7 @@ static int purple_bosrights(OscarData *od, FlapConnection *conn, FlapFrame *fr,
purple_debug_info("oscar", "buddy list loaded\n");
if (purple_account_get_user_info(account) != NULL)
- serv_set_info(gc, purple_account_get_user_info(account));
+ purple_serv_set_info(gc, purple_account_get_user_info(account));
username = purple_account_get_username(account);
if (!od->icq && strcmp(username, purple_connection_get_display_name(gc)) != 0) {
@@ -3740,7 +3740,7 @@ static int purple_ssi_parselist(OscarData *od, FlapConnection *conn, FlapFrame *
char *alias;
const char *balias;
if (servernick)
- serv_got_alias(gc, bname, servernick);
+ purple_serv_got_alias(gc, bname, servernick);
/* Store local alias on server */
alias = aim_ssi_getalias(&od->ssi.local, gname, bname);
@@ -5530,7 +5530,7 @@ static gboolean oscar_uri_handler(const char *proto, const char *cmd, GHashTable
/* This is somewhat hacky, but the params aren't useful after this command */
g_hash_table_insert(params, g_strdup("exchange"), g_strdup("4"));
g_hash_table_insert(params, g_strdup("room"), g_strdup(rname));
- serv_join_chat(purple_account_get_connection(acct), params);
+ purple_serv_join_chat(purple_account_get_connection(acct), params);
}
/*else
** Same as above (except that this would have to be re-written using purple_request_*)
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
index c7b9d09c18..88af90163e 100644
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -1935,7 +1935,7 @@ static void mw_conf_invited(struct mwConference *conf,
if(! c_topic) c_topic = "(no title)";
if(! c_invitation) c_invitation = "(no message)";
- serv_got_chat_invite(gc, c_topic, c_inviter, c_invitation, ht);
+ purple_purple_serv_got_chat_invite(gc, c_topic, c_inviter, c_invitation, ht);
}
@@ -1994,7 +1994,7 @@ static void mw_conf_opened(struct mwConference *conf, GList *members) {
gc = pd->gc;
if(! t) t = "(no title)";
- g_conf = serv_got_joined_chat(gc, CONF_TO_ID(conf), t);
+ g_conf = purple_serv_got_joined_chat(gc, CONF_TO_ID(conf), t);
mwConference_setClientData(conf, g_conf, NULL);
@@ -2022,7 +2022,7 @@ static void mw_conf_closed(struct mwConference *conf, guint32 reason) {
pd = mwSession_getClientData(session);
gc = pd->gc;
- serv_got_chat_left(gc, CONF_TO_ID(conf));
+ purple_serv_got_chat_left(gc, CONF_TO_ID(conf));
purple_notify_error(gc, _("Conference Closed"), NULL, msg,
purple_request_cpar_from_connection(gc));
@@ -2080,7 +2080,7 @@ static void mw_conf_text(struct mwConference *conf,
gc = pd->gc;
esc = g_markup_escape_text(text, -1);
- serv_got_chat_in(gc, CONF_TO_ID(conf), who->user_id, 0, esc, time(NULL));
+ purple_serv_got_chat_in(gc, CONF_TO_ID(conf), who->user_id, 0, esc, time(NULL));
g_free(esc);
}
@@ -2638,7 +2638,7 @@ static void im_recv_text(struct mwConversation *conv,
t = txt? txt: msg;
esc = g_markup_escape_text(t, -1);
- serv_got_im(pd->gc, idb->user, esc, 0, time(NULL));
+ purple_serv_got_im(pd->gc, idb->user, esc, 0, time(NULL));
g_free(esc);
g_free(txt);
@@ -2652,7 +2652,7 @@ static void im_recv_typing(struct mwConversation *conv,
struct mwIdBlock *idb;
idb = mwConversation_getTarget(conv);
- serv_got_typing(pd->gc, idb->user, 0,
+ purple_serv_got_typing(pd->gc, idb->user, 0,
typing? PURPLE_IM_TYPING: PURPLE_IM_NOT_TYPING);
}
@@ -2674,7 +2674,7 @@ static void im_recv_html(struct mwConversation *conv,
t2 = purple_utf8_ncr_decode(t);
t = t2? t2: t;
- serv_got_im(pd->gc, idb->user, t, 0, time(NULL));
+ purple_serv_got_im(pd->gc, idb->user, t, 0, time(NULL));
g_free(t1);
g_free(t2);
@@ -2909,7 +2909,7 @@ static void mw_place_invite(struct mwConversation *conv,
if(! title) title = "(no title)";
if(! message) message = "(no message)";
- serv_got_chat_invite(pd->gc, title, idb->user, message, ht);
+ purple_purple_serv_got_chat_invite(pd->gc, title, idb->user, message, ht);
mwConversation_close(conv, ERR_SUCCESS);
mwConversation_free(conv);
@@ -2993,7 +2993,7 @@ static void mw_place_opened(struct mwPlace *place) {
NSTR(n), g_list_length(members));
if(! t) t = "(no title)";
- gconf = serv_got_joined_chat(gc, PLACE_TO_ID(place), t);
+ gconf = purple_serv_got_joined_chat(gc, PLACE_TO_ID(place), t);
mwPlace_setClientData(place, gconf, NULL);
@@ -3022,7 +3022,7 @@ static void mw_place_closed(struct mwPlace *place, guint32 code) {
pd = mwSession_getClientData(session);
gc = pd->gc;
- serv_got_chat_left(gc, PLACE_TO_ID(place));
+ purple_serv_got_chat_left(gc, PLACE_TO_ID(place));
purple_notify_error(gc, _("Place Closed"), NULL, msg,
purple_request_cpar_from_connection(gc));
@@ -3092,7 +3092,7 @@ static void mw_place_message(struct mwPlace *place,
gc = pd->gc;
esc = g_markup_escape_text(msg, -1);
- serv_got_chat_in(gc, PLACE_TO_ID(place), who->user, 0, esc, time(NULL));
+ purple_serv_got_chat_in(gc, PLACE_TO_ID(place), who->user, 0, esc, time(NULL));
g_free(esc);
}
diff --git a/libpurple/protocols/silc/chat.c b/libpurple/protocols/silc/chat.c
index 077c4ad732..2f9c06da24 100644
--- a/libpurple/protocols/silc/chat.c
+++ b/libpurple/protocols/silc/chat.c
@@ -1077,7 +1077,7 @@ void silcpurple_chat_join(PurpleConnection *gc, GHashTable *data)
grp->channel = channel;
grp->key = key;
sg->grps = g_list_append(sg->grps, grp);
- serv_got_joined_chat(gc, grp->id, channel);
+ purple_serv_got_joined_chat(gc, grp->id, channel);
return;
}
@@ -1180,7 +1180,7 @@ void silcpurple_chat_leave(PurpleConnection *gc, int id)
channel, prv->key);
silc_free(prv);
sg->grps = g_list_remove(sg->grps, prv);
- serv_got_chat_left(gc, id);
+ purple_serv_got_chat_left(gc, id);
return;
}
@@ -1200,7 +1200,7 @@ void silcpurple_chat_leave(PurpleConnection *gc, int id)
silc_client_command_call(client, conn, NULL, "LEAVE",
chu->channel->channel_name, NULL);
- serv_got_chat_left(gc, id);
+ purple_serv_got_chat_left(gc, id);
/* Leave from private groups on this channel as well */
for (l = sg->grps; l; l = l->next)
@@ -1209,7 +1209,7 @@ void silcpurple_chat_leave(PurpleConnection *gc, int id)
silc_client_del_channel_private_key(client, conn,
chu->channel,
prv->key);
- serv_got_chat_left(gc, prv->id);
+ purple_serv_got_chat_left(gc, prv->id);
silc_free(prv);
sg->grps = g_list_remove(sg->grps, prv);
if (!sg->grps)
@@ -1323,7 +1323,7 @@ int silcpurple_chat_send(PurpleConnection *gc, int id, const char *msg,
g_free(tmp);
if (ret)
- serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), msgflags, msg, time(NULL));
+ purple_serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), msgflags, msg, time(NULL));
return ret;
}
}
@@ -1334,7 +1334,7 @@ int silcpurple_chat_send(PurpleConnection *gc, int id, const char *msg,
(unsigned char *)msg2,
strlen(msg2));
if (ret) {
- serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), msgflags, msg,
+ purple_serv_got_chat_in(gc, id, purple_connection_get_display_name(gc), msgflags, msg,
time(NULL));
}
g_free(tmp);
diff --git a/libpurple/protocols/silc/ops.c b/libpurple/protocols/silc/ops.c
index 3123db343d..363023decb 100644
--- a/libpurple/protocols/silc/ops.c
+++ b/libpurple/protocols/silc/ops.c
@@ -214,11 +214,11 @@ silcpurple_mime_message(SilcClient client, SilcClientConnection conn,
imgid);
if (channel)
- serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
sender->nickname, cflags,
tmp, time(NULL));
else
- serv_got_im(gc, sender->nickname,
+ purple_serv_got_im(gc, sender->nickname,
tmp, cflags, time(NULL));
purple_imgstore_unref_by_id(imgid);
@@ -308,7 +308,7 @@ silc_channel_message(SilcClient client, SilcClientConnection conn,
tmp = g_markup_escape_text(msg, -1);
/* Send to Purple */
- serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
sender->nickname, 0, tmp, time(NULL));
g_free(tmp);
g_free(msg);
@@ -337,7 +337,7 @@ silc_channel_message(SilcClient client, SilcClientConnection conn,
}
tmp = g_markup_escape_text(msg, -1);
/* Send to Purple */
- serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(chat),
sender->nickname, 0, tmp, time(NULL));
g_free(salvaged);
g_free(tmp);
@@ -391,7 +391,7 @@ silc_private_message(SilcClient client, SilcClientConnection conn,
/* Send to Purple */
tmp = g_markup_escape_text(msg, -1);
- serv_got_im(gc, sender->nickname, tmp, 0, time(NULL));
+ purple_serv_got_im(gc, sender->nickname, tmp, 0, time(NULL));
g_free(msg);
g_free(tmp);
return;
@@ -419,7 +419,7 @@ silc_private_message(SilcClient client, SilcClientConnection conn,
}
tmp = g_markup_escape_text(msg, -1);
/* Send to Purple */
- serv_got_im(gc, sender->nickname, tmp, 0, time(NULL));
+ purple_serv_got_im(gc, sender->nickname, tmp, 0, time(NULL));
g_free(salvaged);
g_free(tmp);
}
@@ -474,7 +474,7 @@ silc_notify(SilcClient client, SilcClientConnection conn,
components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
g_hash_table_insert(components, g_strdup("channel"), g_strdup(name));
- serv_got_chat_invite(gc, name, client_entry->nickname, NULL, components);
+ purple_purple_serv_got_chat_invite(gc, name, client_entry->nickname, NULL, components);
}
break;
@@ -720,7 +720,7 @@ silc_notify(SilcClient client, SilcClientConnection conn,
tmp ? tmp : "");
purple_conversation_write_message(PURPLE_CONVERSATION(chat), client_entry->nickname,
buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
- serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
} else {
/* Remove user from channel */
g_snprintf(buf, sizeof(buf), _("Kicked by %s (%s)"),
@@ -765,7 +765,7 @@ silc_notify(SilcClient client, SilcClientConnection conn,
continue;
purple_conversation_write_message(PURPLE_CONVERSATION(chat), client_entry->nickname,
buf, PURPLE_MESSAGE_SYSTEM, time(NULL));
- serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
+ purple_serv_got_chat_left(gc, purple_chat_conversation_get_id(chat));
}
silc_hash_table_list_reset(&htl);
@@ -1117,7 +1117,7 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
/* Add channel to Purple */
channel->context = SILC_32_TO_PTR(++sg->channel_ids);
- serv_got_joined_chat(gc, sg->channel_ids, channel->channel_name);
+ purple_serv_got_joined_chat(gc, sg->channel_ids, channel->channel_name);
chat = purple_conversations_find_chat_with_account(
channel->channel_name, sg->account);
if (!chat)
diff --git a/libpurple/protocols/simple/simple.c b/libpurple/protocols/simple/simple.c
index ea2e477955..ee399f7063 100644
--- a/libpurple/protocols/simple/simple.c
+++ b/libpurple/protocols/simple/simple.c
@@ -1051,7 +1051,7 @@ static void process_incoming_message(struct simple_account_data *sip, struct sip
contenttype = sipmsg_find_header(msg, "Content-Type");
if(!contenttype || !strncmp(contenttype, "text/plain", 10) || !strncmp(contenttype, "text/html", 9)) {
- serv_got_im(sip->gc, from, msg->body, 0, time(NULL));
+ purple_serv_got_im(sip->gc, from, msg->body, 0, time(NULL));
send_sip_response(sip->gc, msg, 200, "OK", NULL);
found = TRUE;
}
@@ -1078,9 +1078,9 @@ static void process_incoming_message(struct simple_account_data *sip, struct sip
statedata = purple_xmlnode_get_data(state);
if(statedata) {
if(strstr(statedata, "active"))
- serv_got_typing(sip->gc, from, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(sip->gc, from, 0, PURPLE_IM_TYPING);
else
- serv_got_typing_stopped(sip->gc, from);
+ purple_purple_serv_got_typing_stopped(sip->gc, from);
g_free(statedata);
}
@@ -1311,7 +1311,7 @@ static unsigned int simple_typing(PurpleConnection *gc, const char *name, Purple
g_free(recv);
/*
* TODO: Is this right? It will cause the core to call
- * serv_send_typing(gc, who, PURPLE_IM_TYPING) once every second
+ * purple_serv_send_typing(gc, who, PURPLE_IM_TYPING) once every second
* until the user stops typing. If that's not desired,
* then return 0 instead.
*/
diff --git a/libpurple/protocols/yahoo/libyahoo.c b/libpurple/protocols/yahoo/libyahoo.c
index e26d330412..ea4a495429 100644
--- a/libpurple/protocols/yahoo/libyahoo.c
+++ b/libpurple/protocols/yahoo/libyahoo.c
@@ -139,7 +139,7 @@ static gboolean yahoo_uri_handler(const char *proto, const char *cmd, GHashTable
/* This is somewhat hacky, but the params aren't useful after this command */
g_hash_table_insert(params, g_strdup("room"), g_strdup(rname));
g_hash_table_insert(params, g_strdup("type"), g_strdup("Chat"));
- serv_join_chat(purple_account_get_connection(acct), params);
+ purple_serv_join_chat(purple_account_get_connection(acct), params);
}
/* else
** Same as above (except that this would have to be re-written using purple_request_*)
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
index c75abc735b..ebd1135964 100644
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -898,9 +898,9 @@ static void yahoo_process_notify(PurpleConnection *gc, struct yahoo_packet *pkt,
}
if (stat && *stat == '1')
- serv_got_typing(gc, fed_from, 0, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc, fed_from, 0, PURPLE_IM_TYPING);
else
- serv_got_typing_stopped(gc, fed_from);
+ purple_purple_serv_got_typing_stopped(gc, fed_from);
if (fed_from != from)
g_free(fed_from);
@@ -1016,7 +1016,7 @@ static void yahoo_process_sms_message(PurpleConnection *gc, struct yahoo_packet
}
m = yahoo_string_decode(gc, sms->msg, sms->utf8);
- serv_got_im(gc, sms->from, m, 0, sms->time);
+ purple_serv_got_im(gc, sms->from, m, 0, sms->time);
g_free(m);
g_free(sms->from);
@@ -1211,7 +1211,7 @@ static void yahoo_process_message(PurpleConnection *gc, struct yahoo_packet *pkt
m2 = yahoo_codes_to_html(m);
g_free(m);
- serv_got_im(gc, im->fed_from, m2, 0, im->time);
+ purple_serv_got_im(gc, im->fed_from, m2, 0, im->time);
g_free(m2);
/* Official clients don't share buddy images with federated buddies */
@@ -2215,7 +2215,7 @@ static void ignore_buddy(PurpleBuddy *buddy) {
purple_account_remove_buddy(account, buddy, group);
purple_blist_remove_buddy(buddy);
- serv_add_deny(purple_account_get_connection(account), name);
+ purple_serv_add_deny(purple_account_get_connection(account), name);
g_free(name);
}
@@ -3152,10 +3152,10 @@ static void yahoo_process_audible(PurpleConnection *gc, struct yahoo_packet *pkt
char *buf = g_strdup_printf(_("[ Audible %s/%s/%s.swf ] %s"), YAHOO_AUDIBLE_URL, audible_locale[1], id, msg);
g_strfreev(audible_locale);
- serv_got_im(gc, who, buf, 0, time(NULL));
+ purple_serv_got_im(gc, who, buf, 0, time(NULL));
g_free(buf);
} else
- serv_got_im(gc, who, msg, 0, time(NULL));
+ purple_serv_got_im(gc, who, msg, 0, time(NULL));
}
static void yahoo_packet_process(PurpleConnection *gc, struct yahoo_packet *pkt)
diff --git a/libpurple/protocols/yahoo/yahoo_aliases.c b/libpurple/protocols/yahoo/yahoo_aliases.c
index cd13f3faa5..bdf419a159 100644
--- a/libpurple/protocols/yahoo/yahoo_aliases.c
+++ b/libpurple/protocols/yahoo/yahoo_aliases.c
@@ -152,7 +152,7 @@ yahoo_fetch_aliases_cb(PurpleHttpConnection *http_conn,
/* Finally, if we received an alias, we better update the buddy list */
if (alias != NULL) {
- serv_got_alias(gc, yid, alias);
+ purple_serv_got_alias(gc, yid, alias);
purple_debug_info("yahoo", "Fetched alias '%s' (%s)\n", alias, id);
} else if (buddy_alias && *buddy_alias && !g_str_equal(buddy_alias, yid)) {
/* Or if we have an alias that Yahoo doesn't, send it up */
@@ -651,7 +651,7 @@ parse_contact_details(YahooData *yd, const char *who, const char *xml)
}
if (alias) {
- serv_got_alias(yd->gc, yid, alias);
+ purple_serv_got_alias(yd->gc, yid, alias);
if (alias != ypd->names.nick)
g_free(alias);
}
diff --git a/libpurple/protocols/yahoo/yahoochat.c b/libpurple/protocols/yahoo/yahoochat.c
index d720f4cc1b..25bc5ec98a 100644
--- a/libpurple/protocols/yahoo/yahoochat.c
+++ b/libpurple/protocols/yahoo/yahoochat.c
@@ -208,7 +208,7 @@ void yahoo_process_conference_invite(PurpleConnection *gc, struct yahoo_packet *
g_hash_table_replace(components, g_strdup("topic"), msg);
g_hash_table_replace(components, g_strdup("type"), g_strdup("Conference"));
g_hash_table_replace(components, g_strdup("members"), g_string_free(members, FALSE));
- serv_got_chat_invite(gc, room, who, msg, components);
+ purple_purple_serv_got_chat_invite(gc, room, who, msg, components);
}
@@ -261,7 +261,7 @@ void yahoo_process_conference_decline(PurpleConnection *gc, struct yahoo_packet
{
msg_tmp = yahoo_string_decode(gc, msg, utf8);
msg = yahoo_codes_to_html(msg_tmp);
- serv_got_chat_in(gc, purple_chat_conversation_get_id(c), who, 0, msg, time(NULL));
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(c), who, 0, msg, time(NULL));
g_free(msg_tmp);
g_free(msg);
}
@@ -393,7 +393,7 @@ void yahoo_process_conference_message(PurpleConnection *gc, struct yahoo_packet
msg2 = yahoo_string_decode(gc, msg, utf8);
msg = yahoo_codes_to_html(msg2);
- serv_got_chat_in(gc, purple_chat_conversation_get_id(c), who, 0, msg, time(NULL));
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(c), who, 0, msg, time(NULL));
g_free(msg);
g_free(msg2);
}
@@ -599,7 +599,7 @@ void yahoo_process_chat_join(PurpleConnection *gc, struct yahoo_packet *pkt)
purple_conversation_set_name(PURPLE_CONVERSATION(c), room);
- c = serv_got_joined_chat(gc, YAHOO_CHAT_ID, room);
+ c = purple_serv_got_joined_chat(gc, YAHOO_CHAT_ID, room);
if (topic) {
purple_chat_conversation_set_topic(c, NULL, topic);
/* Also print the topic to the backlog so that the captcha link is clickable */
@@ -613,7 +613,7 @@ void yahoo_process_chat_join(PurpleConnection *gc, struct yahoo_packet *pkt)
purple_conversation_write_message(PURPLE_CONVERSATION(c), "", tmpmsg, PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(tmpmsg);
} else {
- c = serv_got_joined_chat(gc, YAHOO_CHAT_ID, room);
+ c = purple_serv_got_joined_chat(gc, YAHOO_CHAT_ID, room);
if (topic) {
purple_chat_conversation_set_topic(c, NULL, topic);
/* Also print the topic to the backlog so that the captcha link is clickable */
@@ -747,7 +747,7 @@ void yahoo_process_chat_message(PurpleConnection *gc, struct yahoo_packet *pkt)
msg = tmp;
}
- serv_got_chat_in(gc, YAHOO_CHAT_ID, who, 0, msg, time(NULL));
+ purple_serv_got_chat_in(gc, YAHOO_CHAT_ID, who, 0, msg, time(NULL));
g_free(msg);
g_free(room);
}
@@ -805,7 +805,7 @@ void yahoo_process_chat_addinvite(PurpleConnection *gc, struct yahoo_packet *pkt
components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
g_hash_table_replace(components, g_strdup("room"), g_strdup(room));
- serv_got_chat_invite(gc, room, who, msg, components);
+ purple_purple_serv_got_chat_invite(gc, room, who, msg, components);
}
g_free(room);
@@ -958,7 +958,7 @@ static void yahoo_chat_leave(PurpleConnection *gc, const char *room, const char
}
if (purple_conversations_find_chat(gc, YAHOO_CHAT_ID) != NULL)
- serv_got_chat_left(gc, YAHOO_CHAT_ID);
+ purple_serv_got_chat_left(gc, YAHOO_CHAT_ID);
if (!logout)
return;
@@ -1103,7 +1103,7 @@ void yahoo_c_leave(PurpleConnection *gc, int id)
purple_connection_get_display_name(gc), TRUE);
}
- serv_got_chat_left(gc, id);
+ purple_serv_got_chat_left(gc, id);
}
int yahoo_c_send(PurpleConnection *gc, int id, const char *what, PurpleMessageFlags flags)
@@ -1128,7 +1128,7 @@ int yahoo_c_send(PurpleConnection *gc, int id, const char *what, PurpleMessageFl
ret = yahoo_chat_send(gc, purple_connection_get_display_name(gc),
purple_conversation_get_name(PURPLE_CONVERSATION(c)), what, flags);
if (!ret)
- serv_got_chat_in(gc, purple_chat_conversation_get_id(c),
+ purple_serv_got_chat_in(gc, purple_chat_conversation_get_id(c),
purple_connection_get_display_name(gc), flags, what, time(NULL));
}
return ret;
@@ -1187,7 +1187,7 @@ void yahoo_c_join(PurpleConnection *gc, GHashTable *data)
int id;
const char *members = g_hash_table_lookup(data, "members");
id = yd->conf_id++;
- c = serv_got_joined_chat(gc, id, room);
+ c = purple_serv_got_joined_chat(gc, id, room);
yd->confs = g_slist_prepend(yd->confs, c);
purple_chat_conversation_set_topic(c, purple_connection_get_display_name(gc), topic);
yahoo_conf_join(yd, c, purple_connection_get_display_name(gc), room, topic, members);
diff --git a/libpurple/protocols/yahoo/ycht.c b/libpurple/protocols/yahoo/ycht.c
index ca11756b14..112457908e 100644
--- a/libpurple/protocols/yahoo/ycht.c
+++ b/libpurple/protocols/yahoo/ycht.c
@@ -101,9 +101,9 @@ static void ycht_process_chatjoin(YchtConn *ycht, YchtPkt *pkt)
new_room = TRUE;
if (new_room && ycht->changing_rooms) {
- serv_got_chat_left(gc, YAHOO_CHAT_ID);
+ purple_serv_got_chat_left(gc, YAHOO_CHAT_ID);
ycht->changing_rooms = FALSE;
- c = serv_got_joined_chat(gc, YAHOO_CHAT_ID, room);
+ c = purple_serv_got_joined_chat(gc, YAHOO_CHAT_ID, room);
} else {
c = purple_conversations_find_chat(gc, YAHOO_CHAT_ID);
}
@@ -165,7 +165,7 @@ static void ycht_progress_chatmsg(YchtConn *ycht, YchtPkt *pkt)
what = tmp;
}
- serv_got_chat_in(gc, YAHOO_CHAT_ID, who, 0, what, time(NULL));
+ purple_serv_got_chat_in(gc, YAHOO_CHAT_ID, who, 0, what, time(NULL));
g_free(what);
}
diff --git a/libpurple/protocols/zephyr/zephyr.c b/libpurple/protocols/zephyr/zephyr.c
index d885ec3500..835256fd4f 100644
--- a/libpurple/protocols/zephyr/zephyr.c
+++ b/libpurple/protocols/zephyr/zephyr.c
@@ -865,9 +865,9 @@ static void handle_message(PurpleConnection *gc,ZNotice_t notice)
flags |= PURPLE_MESSAGE_AUTO_RESP;
if (!g_ascii_strcasecmp(notice.z_opcode,"PING"))
- serv_got_typing(gc,stripped_sender,ZEPHYR_TYPING_RECV_TIMEOUT, PURPLE_IM_TYPING);
+ purple_serv_got_typing(gc,stripped_sender,ZEPHYR_TYPING_RECV_TIMEOUT, PURPLE_IM_TYPING);
else
- serv_got_im(gc, stripped_sender, buf3, flags, time(NULL));
+ purple_serv_got_im(gc, stripped_sender, buf3, flags, time(NULL));
} else {
zephyr_triple *zt1, *zt2;
@@ -883,7 +883,7 @@ static void handle_message(PurpleConnection *gc,ZNotice_t notice)
if (!zt2->open) {
zt2->open = TRUE;
- serv_got_joined_chat(gc, zt2->id, zt2->name);
+ purple_serv_got_joined_chat(gc, zt2->id, zt2->name);
zephyr_chat_set_topic(gc,zt2->id,notice.z_class_inst);
}
@@ -913,7 +913,7 @@ static void handle_message(PurpleConnection *gc,ZNotice_t notice)
#endif
purple_chat_conversation_add_user(gcc, stripped_sender, ipaddr, PURPLE_CHAT_USER_NONE, TRUE);
}
- serv_got_chat_in(gc, zt2->id, send_inst_utf8, 0, buf3, time(NULL));
+ purple_serv_got_chat_in(gc, zt2->id, send_inst_utf8, 0, buf3, time(NULL));
g_free(send_inst_utf8);
free_triple(zt1);
@@ -2456,7 +2456,7 @@ static void zephyr_join_chat(PurpleConnection * gc, GHashTable * data)
if (!zt2->open) {
if (!g_ascii_strcasecmp(instname,"*"))
instname = "PERSONAL";
- serv_got_joined_chat(gc, zt2->id, zt2->name);
+ purple_serv_got_joined_chat(gc, zt2->id, zt2->name);
zephyr_chat_set_topic(gc,zt2->id,instname);
zt2->open = TRUE;
}
@@ -2476,7 +2476,7 @@ static void zephyr_join_chat(PurpleConnection * gc, GHashTable * data)
zephyr->subscrips = g_slist_append(zephyr->subscrips, zt1);
zt1->open = TRUE;
- serv_got_joined_chat(gc, zt1->id, zt1->name);
+ purple_serv_got_joined_chat(gc, zt1->id, zt1->name);
if (!g_ascii_strcasecmp(instname,"*"))
instname = "PERSONAL";
zephyr_chat_set_topic(gc,zt1->id,instname);
@@ -2563,7 +2563,7 @@ static unsigned int zephyr_send_typing(PurpleConnection *gc, const char *who, Pu
/*
* TODO: Is this correct? It means we will call
- * serv_send_typing(gc, who, PURPLE_IM_TYPING) once every 15 seconds
+ * purple_serv_send_typing(gc, who, PURPLE_IM_TYPING) once every 15 seconds
* until the Purple user stops typing.
*/
return ZEPHYR_TYPING_SEND_TIMEOUT;
diff --git a/libpurple/prpl.c b/libpurple/prpl.c
index 4339bd8d77..0154398755 100644
--- a/libpurple/prpl.c
+++ b/libpurple/prpl.c
@@ -300,7 +300,7 @@ purple_prpl_got_user_status(PurpleAccount *account, const char *name,
/* The buddy is no longer online, they are therefore by definition not
* still typing to us. */
if (!purple_status_is_online(status)) {
- serv_got_typing_stopped(purple_account_get_connection(account), name);
+ purple_purple_serv_got_typing_stopped(purple_account_get_connection(account), name);
purple_prpl_got_media_caps(account, name);
}
}
@@ -516,9 +516,9 @@ got_attention(PurpleConnection *gc, int id, const char *who, guint type_code)
description, who);
if (id == -1)
- serv_got_im(gc, who, description, flags, mtime);
+ purple_serv_got_im(gc, who, description, flags, mtime);
else
- serv_got_chat_in(gc, id, who, flags, description, mtime);
+ purple_serv_got_chat_in(gc, id, who, flags, description, mtime);
/* TODO: sounds (depending on PurpleAttentionType), shaking, etc. */
diff --git a/libpurple/prpl.h b/libpurple/prpl.h
index f6a25e05a1..e6cca3404b 100644
--- a/libpurple/prpl.h
+++ b/libpurple/prpl.h
@@ -368,13 +368,13 @@ struct _PurplePluginProtocolInfo
/*
* Called when the user requests joining a chat. Should arrange for
- * #serv_got_joined_chat to be called.
+ * #purple_serv_got_joined_chat to be called.
*
* @components: A hashtable containing information required to
* join the chat as described by the entries returned
* by #chat_info. It may also be called when accepting
* an invitation, in which case this matches the
- * data parameter passed to #serv_got_chat_invite.
+ * data parameter passed to #purple_purple_serv_got_chat_invite.
*/
void (*join_chat)(PurpleConnection *, GHashTable *components);
@@ -382,7 +382,7 @@ struct _PurplePluginProtocolInfo
* Called when the user refuses a chat invitation.
*
* @components: A hashtable containing information required to
- * join the chat as passed to #serv_got_chat_invite.
+ * join the chat as passed to #purple_purple_serv_got_chat_invite.
*/
void (*reject_chat)(PurpleConnection *, GHashTable *components);
diff --git a/libpurple/purple-client.c b/libpurple/purple-client.c
index d52428df7a..a0d4f48372 100644
--- a/libpurple/purple-client.c
+++ b/libpurple/purple-client.c
@@ -76,9 +76,9 @@ void purple_init(void)
lose_gerror ("Couldn't connect to session bus", error);
purple_proxy = dbus_g_proxy_new_for_name (bus,
- DBUS_SERVICE_PURPLE,
- DBUS_PATH_PURPLE,
- DBUS_INTERFACE_PURPLE);
+ PURPLE_DBUS_SERVICE,
+ PURPLE_DBUS_PATH,
+ PURPLE_DBUS_INTERFACE);
if (!purple_proxy)
lose_gerror ("Couldn't connect to the Purple Service", error);
diff --git a/libpurple/roomlist.c b/libpurple/roomlist.c
index 59555961e6..373c2b9607 100644
--- a/libpurple/roomlist.c
+++ b/libpurple/roomlist.c
@@ -495,7 +495,7 @@ void purple_roomlist_room_join(PurpleRoomlist *list, PurpleRoomlistRoom *room)
g_hash_table_replace(components, f->name, j->data);
}
- serv_join_chat(gc, components);
+ purple_serv_join_chat(gc, components);
g_hash_table_destroy(components);
}
diff --git a/libpurple/server.c b/libpurple/server.c
index b617752467..feebf49a1b 100644
--- a/libpurple/server.c
+++ b/libpurple/server.c
@@ -41,7 +41,7 @@
#define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married"
unsigned int
-serv_send_typing(PurpleConnection *gc, const char *name, PurpleIMTypingState state)
+purple_serv_send_typing(PurpleConnection *gc, const char *name, PurpleIMTypingState state)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -116,7 +116,7 @@ get_last_auto_response(PurpleConnection *gc, const char *name)
return lar;
}
-int serv_send_im(PurpleConnection *gc, const char *name, const char *message,
+int purple_serv_send_im(PurpleConnection *gc, const char *name, const char *message,
PurpleMessageFlags flags)
{
PurpleIMConversation *im = NULL;
@@ -163,7 +163,7 @@ int serv_send_im(PurpleConnection *gc, const char *name, const char *message,
return val;
}
-void serv_get_info(PurpleConnection *gc, const char *name)
+void purple_serv_get_info(PurpleConnection *gc, const char *name)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -177,7 +177,7 @@ void serv_get_info(PurpleConnection *gc, const char *name)
}
}
-void serv_set_info(PurpleConnection *gc, const char *info)
+void purple_serv_set_info(PurpleConnection *gc, const char *info)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -204,7 +204,7 @@ void serv_set_info(PurpleConnection *gc, const char *info)
/*
* Set buddy's alias on server roster/list
*/
-void serv_alias_buddy(PurpleBuddy *b)
+void purple_serv_alias_buddy(PurpleBuddy *b)
{
PurpleAccount *account;
PurpleConnection *gc;
@@ -231,7 +231,7 @@ void serv_alias_buddy(PurpleBuddy *b)
}
void
-serv_got_alias(PurpleConnection *gc, const char *who, const char *alias)
+purple_serv_got_alias(PurpleConnection *gc, const char *who, const char *alias)
{
PurpleAccount *account;
GSList *buddies;
@@ -331,7 +331,7 @@ PurpleAttentionType *purple_get_attention_type_from_code(PurpleAccount *account,
* it should be possible. Probably needs to be done, someday. Although,
* the UI for that would be difficult, because groups are Purple-wide.
*/
-void serv_move_buddy(PurpleBuddy *b, PurpleGroup *og, PurpleGroup *ng)
+void purple_serv_move_buddy(PurpleBuddy *b, PurpleGroup *og, PurpleGroup *ng)
{
PurpleAccount *account;
PurpleConnection *gc;
@@ -356,7 +356,7 @@ void serv_move_buddy(PurpleBuddy *b, PurpleGroup *og, PurpleGroup *ng)
}
}
-void serv_add_permit(PurpleConnection *gc, const char *name)
+void purple_serv_add_permit(PurpleConnection *gc, const char *name)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -370,7 +370,7 @@ void serv_add_permit(PurpleConnection *gc, const char *name)
}
}
-void serv_add_deny(PurpleConnection *gc, const char *name)
+void purple_serv_add_deny(PurpleConnection *gc, const char *name)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -384,7 +384,7 @@ void serv_add_deny(PurpleConnection *gc, const char *name)
}
}
-void serv_rem_permit(PurpleConnection *gc, const char *name)
+void purple_serv_rem_permit(PurpleConnection *gc, const char *name)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -398,7 +398,7 @@ void serv_rem_permit(PurpleConnection *gc, const char *name)
}
}
-void serv_rem_deny(PurpleConnection *gc, const char *name)
+void purple_serv_rem_deny(PurpleConnection *gc, const char *name)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -412,7 +412,7 @@ void serv_rem_deny(PurpleConnection *gc, const char *name)
}
}
-void serv_set_permit_deny(PurpleConnection *gc)
+void purple_serv_set_permit_deny(PurpleConnection *gc)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -432,7 +432,7 @@ void serv_set_permit_deny(PurpleConnection *gc)
}
}
-void serv_join_chat(PurpleConnection *gc, GHashTable *data)
+void purple_serv_join_chat(PurpleConnection *gc, GHashTable *data)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -447,7 +447,7 @@ void serv_join_chat(PurpleConnection *gc, GHashTable *data)
}
-void serv_reject_chat(PurpleConnection *gc, GHashTable *data)
+void purple_serv_reject_chat(PurpleConnection *gc, GHashTable *data)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -461,7 +461,7 @@ void serv_reject_chat(PurpleConnection *gc, GHashTable *data)
}
}
-void serv_chat_invite(PurpleConnection *gc, int id, const char *message, const char *name)
+void purple_serv_chat_invite(PurpleConnection *gc, int id, const char *message, const char *name)
{
PurplePlugin *prpl = NULL;
PurplePluginProtocolInfo *prpl_info = NULL;
@@ -496,7 +496,7 @@ void serv_chat_invite(PurpleConnection *gc, int id, const char *message, const c
* Then again, something might want to use this, from outside prpl-land
* to leave a chat without destroying the conversation.
*/
-void serv_chat_leave(PurpleConnection *gc, int id)
+void purple_serv_chat_leave(PurpleConnection *gc, int id)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -508,7 +508,7 @@ void serv_chat_leave(PurpleConnection *gc, int id)
prpl_info->chat_leave(gc, id);
}
-void serv_chat_whisper(PurpleConnection *gc, int id, const char *who, const char *message)
+void purple_serv_chat_whisper(PurpleConnection *gc, int id, const char *who, const char *message)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -522,7 +522,7 @@ void serv_chat_whisper(PurpleConnection *gc, int id, const char *who, const char
}
}
-int serv_chat_send(PurpleConnection *gc, int id, const char *message, PurpleMessageFlags flags)
+int purple_serv_chat_send(PurpleConnection *gc, int id, const char *message, PurpleMessageFlags flags)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
@@ -540,7 +540,7 @@ int serv_chat_send(PurpleConnection *gc, int id, const char *message, PurpleMess
* woo. i'm actually going to comment this function. isn't that fun. make
* sure to follow along, kids
*/
-void serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
+void purple_serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
PurpleMessageFlags flags, time_t mtime)
{
PurpleAccount *account;
@@ -555,7 +555,7 @@ void serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
if (mtime < 0) {
purple_debug_error("server",
- "serv_got_im ignoring negative timestamp\n");
+ "purple_serv_got_im ignoring negative timestamp\n");
/* TODO: Would be more appropriate to use a value that indicates
that the timestamp is unknown, and surface that in the UI. */
mtime = time(NULL);
@@ -676,7 +676,7 @@ void serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
if (!(flags & PURPLE_MESSAGE_AUTO_RESP))
{
- serv_send_im(gc, name, away_msg, PURPLE_MESSAGE_AUTO_RESP);
+ purple_serv_send_im(gc, name, away_msg, PURPLE_MESSAGE_AUTO_RESP);
purple_conversation_write_message(PURPLE_CONVERSATION(im), NULL, away_msg,
PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_AUTO_RESP,
@@ -689,7 +689,7 @@ void serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
g_free(name);
}
-void serv_got_typing(PurpleConnection *gc, const char *name, int timeout,
+void purple_serv_got_typing(PurpleConnection *gc, const char *name, int timeout,
PurpleIMTypingState state) {
PurpleIMConversation *im;
@@ -718,7 +718,7 @@ void serv_got_typing(PurpleConnection *gc, const char *name, int timeout,
purple_im_conversation_start_typing_timeout(im, timeout);
}
-void serv_got_typing_stopped(PurpleConnection *gc, const char *name) {
+void purple_purple_serv_got_typing_stopped(PurpleConnection *gc, const char *name) {
PurpleIMConversation *im;
@@ -753,20 +753,20 @@ static void chat_invite_data_free(struct chat_invite_data *cid)
static void chat_invite_reject(struct chat_invite_data *cid)
{
- serv_reject_chat(cid->gc, cid->components);
+ purple_serv_reject_chat(cid->gc, cid->components);
chat_invite_data_free(cid);
}
static void chat_invite_accept(struct chat_invite_data *cid)
{
- serv_join_chat(cid->gc, cid->components);
+ purple_serv_join_chat(cid->gc, cid->components);
chat_invite_data_free(cid);
}
-void serv_got_chat_invite(PurpleConnection *gc, const char *name,
+void purple_purple_serv_got_chat_invite(PurpleConnection *gc, const char *name,
const char *who, const char *message, GHashTable *data)
{
PurpleAccount *account;
@@ -820,7 +820,7 @@ void serv_got_chat_invite(PurpleConnection *gc, const char *name,
chat_invite_reject(cid);
}
-PurpleChatConversation *serv_got_joined_chat(PurpleConnection *gc,
+PurpleChatConversation *purple_serv_got_joined_chat(PurpleConnection *gc,
int id, const char *name)
{
PurpleChatConversation *chat;
@@ -844,7 +844,7 @@ PurpleChatConversation *serv_got_joined_chat(PurpleConnection *gc,
return chat;
}
-void serv_got_chat_left(PurpleConnection *g, int id)
+void purple_serv_got_chat_left(PurpleConnection *g, int id)
{
GSList *bcs;
PurpleChatConversation *chat = NULL;
@@ -876,7 +876,7 @@ void purple_serv_got_join_chat_failed(PurpleConnection *gc, GHashTable *data)
gc, data);
}
-void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
+void purple_serv_got_chat_in(PurpleConnection *g, int id, const char *who,
PurpleMessageFlags flags, const char *message, time_t mtime)
{
GSList *bcs;
@@ -889,7 +889,7 @@ void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
if (mtime < 0) {
purple_debug_error("server",
- "serv_got_chat_in ignoring negative timestamp\n");
+ "purple_serv_got_chat_in ignoring negative timestamp\n");
/* TODO: Would be more appropriate to use a value that indicates
that the timestamp is unknown, and surface that in the UI. */
mtime = time(NULL);
@@ -946,7 +946,7 @@ void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
g_free(buffy);
}
-void serv_send_file(PurpleConnection *gc, const char *who, const char *file)
+void purple_serv_send_file(PurpleConnection *gc, const char *who, const char *file)
{
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
diff --git a/libpurple/server.h b/libpurple/server.h
index 1fdb6b4ec3..a41de04837 100644
--- a/libpurple/server.h
+++ b/libpurple/server.h
@@ -35,7 +35,7 @@
G_BEGIN_DECLS
/**
- * serv_send_typing:
+ * purple_serv_send_typing:
* @gc: The connection over which to send the typing notification.
* @name: The user to send the typing notification to.
* @state: One of PURPLE_IM_TYPING, PURPLE_IM_TYPED, or PURPLE_IM_NOT_TYPING.
@@ -51,10 +51,10 @@ G_BEGIN_DECLS
* message.
*/
/* TODO Could probably move this into the conversation API. */
-unsigned int serv_send_typing(PurpleConnection *gc, const char *name, PurpleIMTypingState state);
+unsigned int purple_serv_send_typing(PurpleConnection *gc, const char *name, PurpleIMTypingState state);
-void serv_move_buddy(PurpleBuddy *, PurpleGroup *, PurpleGroup *);
-int serv_send_im(PurpleConnection *, const char *, const char *, PurpleMessageFlags flags);
+void purple_serv_move_buddy(PurpleBuddy *, PurpleGroup *, PurpleGroup *);
+int purple_serv_send_im(PurpleConnection *, const char *, const char *, PurpleMessageFlags flags);
/**
* purple_get_attention_type_from_code:
@@ -65,20 +65,20 @@ int serv_send_im(PurpleConnection *, const char *, const char *, PurpleMessageF
*/
PurpleAttentionType *purple_get_attention_type_from_code(PurpleAccount *account, guint type_code);
-void serv_get_info(PurpleConnection *, const char *);
-void serv_set_info(PurpleConnection *, const char *);
-
-void serv_add_permit(PurpleConnection *, const char *);
-void serv_add_deny(PurpleConnection *, const char *);
-void serv_rem_permit(PurpleConnection *, const char *);
-void serv_rem_deny(PurpleConnection *, const char *);
-void serv_set_permit_deny(PurpleConnection *);
-void serv_chat_invite(PurpleConnection *, int, const char *, const char *);
-void serv_chat_leave(PurpleConnection *, int);
-void serv_chat_whisper(PurpleConnection *, int, const char *, const char *);
-int serv_chat_send(PurpleConnection *, int, const char *, PurpleMessageFlags flags);
-void serv_alias_buddy(PurpleBuddy *);
-void serv_got_alias(PurpleConnection *gc, const char *who, const char *alias);
+void purple_serv_get_info(PurpleConnection *, const char *);
+void purple_serv_set_info(PurpleConnection *, const char *);
+
+void purple_serv_add_permit(PurpleConnection *, const char *);
+void purple_serv_add_deny(PurpleConnection *, const char *);
+void purple_serv_rem_permit(PurpleConnection *, const char *);
+void purple_serv_rem_deny(PurpleConnection *, const char *);
+void purple_serv_set_permit_deny(PurpleConnection *);
+void purple_serv_chat_invite(PurpleConnection *, int, const char *, const char *);
+void purple_serv_chat_leave(PurpleConnection *, int);
+void purple_serv_chat_whisper(PurpleConnection *, int, const char *, const char *);
+int purple_serv_chat_send(PurpleConnection *, int, const char *, PurpleMessageFlags flags);
+void purple_serv_alias_buddy(PurpleBuddy *);
+void purple_serv_got_alias(PurpleConnection *gc, const char *who, const char *alias);
/**
* purple_serv_got_private_alias:
@@ -94,7 +94,7 @@ void purple_serv_got_private_alias(PurpleConnection *gc, const char *who, const
/**
- * serv_got_typing:
+ * purple_serv_got_typing:
* @gc: The connection on which the typing message was received.
* @name: The name of the remote user.
* @timeout: If this is a number greater than 0, then
@@ -106,55 +106,55 @@ void purple_serv_got_private_alias(PurpleConnection *gc, const char *who, const
*
* Receive a typing message from a remote user. Either PURPLE_IM_TYPING
* or PURPLE_IM_TYPED. If the user has stopped typing then use
- * serv_got_typing_stopped instead.
+ * purple_purple_serv_got_typing_stopped instead.
*
* @todo Could probably move this into the conversation API.
*/
-void serv_got_typing(PurpleConnection *gc, const char *name, int timeout,
+void purple_serv_got_typing(PurpleConnection *gc, const char *name, int timeout,
PurpleIMTypingState state);
/**
- * serv_got_typing_stopped:
+ * purple_purple_serv_got_typing_stopped:
*
* @todo Could probably move this into the conversation API.
*/
-void serv_got_typing_stopped(PurpleConnection *gc, const char *name);
+void purple_purple_serv_got_typing_stopped(PurpleConnection *gc, const char *name);
-void serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
+void purple_serv_got_im(PurpleConnection *gc, const char *who, const char *msg,
PurpleMessageFlags flags, time_t mtime);
/**
- * serv_join_chat:
+ * purple_serv_join_chat:
* @data: The hash function should be g_str_hash() and the equal
* function should be g_str_equal().
*/
-void serv_join_chat(PurpleConnection *, GHashTable *data);
+void purple_serv_join_chat(PurpleConnection *, GHashTable *data);
/**
- * serv_reject_chat:
+ * purple_serv_reject_chat:
* @data: The hash function should be g_str_hash() and the equal
* function should be g_str_equal().
*/
-void serv_reject_chat(PurpleConnection *, GHashTable *data);
+void purple_serv_reject_chat(PurpleConnection *, GHashTable *data);
/**
- * serv_got_chat_invite:
+ * purple_purple_serv_got_chat_invite:
* @gc: The connection on which the invite arrived.
* @name: The name of the chat you're being invited to.
* @who: The username of the person inviting the account.
* @message: The optional invite message.
- * @data: The components necessary if you want to call serv_join_chat().
+ * @data: The components necessary if you want to call purple_serv_join_chat().
* The hash function should be g_str_hash() and the equal
* function should be g_str_equal().
*
* Called by a protocol when an account is invited into a chat.
*/
-void serv_got_chat_invite(PurpleConnection *gc, const char *name,
+void purple_purple_serv_got_chat_invite(PurpleConnection *gc, const char *name,
const char *who, const char *message,
GHashTable *data);
/**
- * serv_got_joined_chat:
+ * purple_serv_got_joined_chat:
* @gc: The connection on which the chat was joined.
* @id: The id of the chat, assigned by the protocol.
* @name: The name of the chat.
@@ -163,31 +163,31 @@ void serv_got_chat_invite(PurpleConnection *gc, const char *name,
*
* Returns: The resulting conversation
*/
-PurpleChatConversation *serv_got_joined_chat(PurpleConnection *gc,
+PurpleChatConversation *purple_serv_got_joined_chat(PurpleConnection *gc,
int id, const char *name);
/**
* purple_serv_got_join_chat_failed:
* @gc: The connection on which chat joining failed
- * @data: The components passed to serv_join_chat() originally.
+ * @data: The components passed to purple_serv_join_chat() originally.
* The hash function should be g_str_hash() and the equal
* function should be g_str_equal().
*
- * Called by a protocol when an attempt to join a chat via serv_join_chat()
+ * Called by a protocol when an attempt to join a chat via purple_serv_join_chat()
* fails.
*/
void purple_serv_got_join_chat_failed(PurpleConnection *gc, GHashTable *data);
/**
- * serv_got_chat_left:
+ * purple_serv_got_chat_left:
* @g: The connection on which the chat was left.
* @id: The id of the chat, as assigned by the protocol.
*
* Called by a protocol when an account has left a chat.
*/
-void serv_got_chat_left(PurpleConnection *g, int id);
+void purple_serv_got_chat_left(PurpleConnection *g, int id);
/**
- * serv_got_chat_in:
+ * purple_serv_got_chat_in:
* @g: The connection on which the message was received.
* @id: The id of the chat, as assigned by the protocol.
* @who: The name of the user who sent the message.
@@ -197,9 +197,9 @@ void serv_got_chat_left(PurpleConnection *g, int id);
*
* Called by a protocol when a message has been received in a chat.
*/
-void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
+void purple_serv_got_chat_in(PurpleConnection *g, int id, const char *who,
PurpleMessageFlags flags, const char *message, time_t mtime);
-void serv_send_file(PurpleConnection *gc, const char *who, const char *file);
+void purple_serv_send_file(PurpleConnection *gc, const char *who, const char *file);
G_END_DECLS
diff --git a/libpurple/stun.c b/libpurple/stun.c
index b5186d8c2f..f80bb421fd 100644
--- a/libpurple/stun.c
+++ b/libpurple/stun.c
@@ -101,7 +101,7 @@ static void close_stun_conn(struct stun_conn *sc) {
static void do_callbacks(void) {
while (callbacks) {
- StunCallback cb = callbacks->data;
+ PurpleStunCallback cb = callbacks->data;
if (cb)
cb(&nattype);
callbacks = g_slist_delete_link(callbacks, callbacks);
@@ -367,12 +367,12 @@ static void do_test1(PurpleSrvResponse *resp, int results, gpointer sdata) {
}
static gboolean call_callback(gpointer data) {
- StunCallback cb = data;
+ PurpleStunCallback cb = data;
cb(&nattype);
return FALSE;
}
-PurpleStunNatDiscovery *purple_stun_discover(StunCallback cb) {
+PurpleStunNatDiscovery *purple_stun_discover(PurpleStunCallback cb) {
const char *servername = purple_prefs_get_string("/purple/network/stun_server");
purple_debug_info("stun", "using server %s\n", servername);
diff --git a/libpurple/stun.h b/libpurple/stun.h
index 837a56db80..0a45c4954c 100644
--- a/libpurple/stun.h
+++ b/libpurple/stun.h
@@ -62,7 +62,7 @@ struct _PurpleStunNatDiscovery {
time_t lookup_time;
};
-typedef void (*StunCallback) (PurpleStunNatDiscovery *);
+typedef void (*PurpleStunCallback) (PurpleStunNatDiscovery *);
G_BEGIN_DECLS
@@ -79,7 +79,7 @@ G_BEGIN_DECLS
* Returns: a PurpleStunNatDiscovery which includes the public IP and the type
* of NAT or NULL is discovery would block
*/
-PurpleStunNatDiscovery *purple_stun_discover(StunCallback cb);
+PurpleStunNatDiscovery *purple_stun_discover(PurpleStunCallback cb);
void purple_stun_init(void);
diff --git a/libpurple/theme-manager.c b/libpurple/theme-manager.c
index 25d7c42657..db4f987294 100644
--- a/libpurple/theme-manager.c
+++ b/libpurple/theme-manager.c
@@ -93,7 +93,7 @@ check_if_theme_or_loader(gchar *key, gpointer value, GSList **loaders)
static void
purple_theme_manager_function_wrapper(gchar *key,
gpointer value,
- PTFunc user_data)
+ PurpleThemeFunc user_data)
{
if (PURPLE_IS_THEME(value))
(* user_data)(value);
@@ -278,7 +278,7 @@ purple_theme_manager_remove_theme(PurpleTheme *theme)
}
void
-purple_theme_manager_for_each_theme(PTFunc func)
+purple_theme_manager_for_each_theme(PurpleThemeFunc func)
{
g_return_if_fail(func);
diff --git a/libpurple/theme-manager.h b/libpurple/theme-manager.h
index c05899414a..2b05abcc20 100644
--- a/libpurple/theme-manager.h
+++ b/libpurple/theme-manager.h
@@ -34,7 +34,7 @@
#include "theme.h"
#include "theme-loader.h"
-typedef void (*PTFunc) (PurpleTheme *);
+typedef void (*PurpleThemeFunc) (PurpleTheme *);
typedef struct _PurpleThemeManager PurpleThemeManager;
typedef struct _PurpleThemeManagerClass PurpleThemeManagerClass;
@@ -141,11 +141,11 @@ void purple_theme_manager_unregister_type(PurpleThemeLoader *loader);
/**
* purple_theme_manager_for_each_theme:
- * @func: The PTFunc to be applied to each theme.
+ * @func: The PurpleThemeFunc to be applied to each theme.
*
* Calls the given function on each purple theme.
*/
-void purple_theme_manager_for_each_theme(PTFunc func);
+void purple_theme_manager_for_each_theme(PurpleThemeFunc func);
/**
* purple_theme_manager_load_theme:
diff --git a/libpurple/upnp.c b/libpurple/upnp.c
index b3c5c88b9e..d1e2ab397c 100644
--- a/libpurple/upnp.c
+++ b/libpurple/upnp.c
@@ -124,7 +124,7 @@ typedef struct {
gchar *full_url;
} UPnPDiscoveryData;
-struct _UPnPMappingAddRemove
+struct _PurpleUPnPMappingAddRemove
{
unsigned short portmap;
gchar protocol[4];
@@ -149,7 +149,7 @@ static void lookup_internal_ip(void);
static gboolean
fire_ar_cb_async_and_free(gpointer data)
{
- UPnPMappingAddRemove *ar = data;
+ PurpleUPnPMappingAddRemove *ar = data;
if (ar) {
if (ar->cb)
ar->cb(ar->success, ar->cb_data);
@@ -809,7 +809,7 @@ static void
done_port_mapping_cb(PurpleHttpConnection *http_conn,
PurpleHttpResponse *response, gpointer user_data)
{
- UPnPMappingAddRemove *ar = user_data;
+ PurpleUPnPMappingAddRemove *ar = user_data;
gboolean success = TRUE;
@@ -830,7 +830,7 @@ done_port_mapping_cb(PurpleHttpConnection *http_conn,
static void
do_port_mapping_cb(gboolean has_control_mapping, gpointer data)
{
- UPnPMappingAddRemove *ar = data;
+ PurpleUPnPMappingAddRemove *ar = data;
if (has_control_mapping) {
gchar action_name[25];
@@ -872,14 +872,14 @@ do_port_mapping_cb(gboolean has_control_mapping, gpointer data)
static gboolean
fire_port_mapping_failure_cb(gpointer data)
{
- UPnPMappingAddRemove *ar = data;
+ PurpleUPnPMappingAddRemove *ar = data;
ar->tima = 0;
do_port_mapping_cb(FALSE, data);
return FALSE;
}
-void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *ar)
+void purple_upnp_cancel_port_mapping(PurpleUPnPMappingAddRemove *ar)
{
GSList *l;
@@ -908,13 +908,13 @@ void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *ar)
g_free(ar);
}
-UPnPMappingAddRemove *
+PurpleUPnPMappingAddRemove *
purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
PurpleUPnPCallback cb, gpointer cb_data)
{
- UPnPMappingAddRemove *ar;
+ PurpleUPnPMappingAddRemove *ar;
- ar = g_new0(UPnPMappingAddRemove, 1);
+ ar = g_new0(PurpleUPnPMappingAddRemove, 1);
ar->cb = cb;
ar->cb_data = cb_data;
ar->add = TRUE;
@@ -955,13 +955,13 @@ purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
return ar;
}
-UPnPMappingAddRemove *
+PurpleUPnPMappingAddRemove *
purple_upnp_remove_port_mapping(unsigned short portmap, const char* protocol,
PurpleUPnPCallback cb, gpointer cb_data)
{
- UPnPMappingAddRemove *ar;
+ PurpleUPnPMappingAddRemove *ar;
- ar = g_new0(UPnPMappingAddRemove, 1);
+ ar = g_new0(PurpleUPnPMappingAddRemove, 1);
ar->cb = cb;
ar->cb_data = cb_data;
ar->add = FALSE;
diff --git a/libpurple/upnp.h b/libpurple/upnp.h
index 550f4f34d9..8a19177f27 100644
--- a/libpurple/upnp.h
+++ b/libpurple/upnp.h
@@ -28,7 +28,7 @@
* @title: Universal Plug N Play API
*/
-typedef struct _UPnPMappingAddRemove UPnPMappingAddRemove;
+typedef struct _PurpleUPnPMappingAddRemove PurpleUPnPMappingAddRemove;
G_BEGIN_DECLS
@@ -94,7 +94,7 @@ const gchar* purple_upnp_get_public_ip(void);
* Cancel a pending port mapping request initiated with either
* purple_upnp_set_port_mapping() or purple_upnp_remove_port_mapping().
*/
-void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *mapping_data);
+void purple_upnp_cancel_port_mapping(PurpleUPnPMappingAddRemove *mapping_data);
/**
* purple_upnp_set_port_mapping:
@@ -111,7 +111,7 @@ void purple_upnp_cancel_port_mapping(UPnPMappingAddRemove *mapping_data);
* Returns: Data which can be passed to purple_upnp_cancel_port_mapping() to
* cancel
*/
-UPnPMappingAddRemove *purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
+PurpleUPnPMappingAddRemove *purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol,
PurpleUPnPCallback cb, gpointer cb_data);
/**
@@ -130,7 +130,7 @@ UPnPMappingAddRemove *purple_upnp_set_port_mapping(unsigned short portmap, const
* Returns: Data which can be passed to purple_upnp_cancel_port_mapping() to
* cancel
*/
-UPnPMappingAddRemove *purple_upnp_remove_port_mapping(unsigned short portmap,
+PurpleUPnPMappingAddRemove *purple_upnp_remove_port_mapping(unsigned short portmap,
const gchar* protocol, PurpleUPnPCallback cb, gpointer cb_data);
G_END_DECLS
diff --git a/libpurple/xfer.c b/libpurple/xfer.c
index 973315b0c5..bc89d6282e 100644
--- a/libpurple/xfer.c
+++ b/libpurple/xfer.c
@@ -484,7 +484,7 @@ purple_xfer_ask_recv(PurpleXfer *xfer)
}
if (priv->message != NULL)
- serv_got_im(purple_account_get_connection(priv->account),
+ purple_serv_got_im(purple_account_get_connection(priv->account),
priv->who, priv->message, 0, time(NULL));
cpar = purple_request_cpar_from_account(priv->account);
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
index 9784ad35bc..88ede7740c 100644
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -341,7 +341,7 @@ static void gtk_blist_menu_send_file_cb(GtkWidget *w, PurpleBuddy *b)
{
PurpleAccount *account = purple_buddy_get_account(b);
- serv_send_file(purple_account_get_connection(account),
+ purple_serv_send_file(purple_account_get_connection(account),
purple_buddy_get_name(b), NULL);
}
@@ -406,7 +406,7 @@ static void gtk_blist_join_chat(PurpleChat *chat)
purple_conversation_present(conv);
}
- serv_join_chat(purple_account_get_connection(account), components);
+ purple_serv_join_chat(purple_account_get_connection(account), components);
g_free(chat_name);
}
@@ -601,14 +601,14 @@ static void gtk_blist_renderer_edited_cb(GtkCellRendererText *text_rend, char *a
} else {
PurpleBuddy *buddy = purple_contact_get_priority_buddy(contact);
purple_buddy_set_local_alias(buddy, arg2);
- serv_alias_buddy(buddy);
+ purple_serv_alias_buddy(buddy);
gtk_blist_auto_personize(purple_blist_node_get_parent(node), arg2);
}
} else if (PURPLE_IS_BUDDY(node)) {
PurpleGroup *group = purple_buddy_get_group(PURPLE_BUDDY(node));
purple_buddy_set_local_alias(PURPLE_BUDDY(node), arg2);
- serv_alias_buddy(PURPLE_BUDDY(node));
+ purple_serv_alias_buddy(PURPLE_BUDDY(node));
gtk_blist_auto_personize(PURPLE_BLIST_NODE(group), arg2);
} else if (PURPLE_IS_GROUP(node)) {
dest = purple_blist_find_group(arg2);
@@ -7628,7 +7628,7 @@ static gboolean autojoin_cb(PurpleConnection *gc, gpointer data)
continue;
if (purple_blist_node_get_bool(PURPLE_BLIST_NODE(chat), "gtk-autojoin"))
- serv_join_chat(gc, purple_chat_get_components(chat));
+ purple_serv_join_chat(gc, purple_chat_get_components(chat));
}
}
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
index 7dfab134a2..8b359a50e7 100644
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -813,7 +813,7 @@ do_invite(GtkWidget *w, int resp, InviteBuddyInfo *info)
if (!g_ascii_strcasecmp(buddy, ""))
return;
- serv_chat_invite(purple_conversation_get_connection(PURPLE_CONVERSATION(chat)),
+ purple_serv_chat_invite(purple_conversation_get_connection(PURPLE_CONVERSATION(chat)),
purple_chat_conversation_get_id(chat),
message, buddy);
}
@@ -1207,7 +1207,7 @@ menu_send_file_cb(GtkAction *action, gpointer data)
PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
if (PURPLE_IS_IM_CONVERSATION(conv)) {
- serv_send_file(purple_conversation_get_connection(conv), purple_conversation_get_name(conv), NULL);
+ purple_serv_send_file(purple_conversation_get_connection(conv), purple_conversation_get_name(conv), NULL);
}
}
@@ -1550,7 +1550,7 @@ menu_chat_send_file_cb(GtkWidget *w, PidginConversation *gtkconv)
real_who = prpl_info->get_cb_real_name(gc,
purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(conv)), who);
- serv_send_file(gc, real_who ? real_who : who, NULL);
+ purple_serv_send_file(gc, real_who ? real_who : who, NULL);
g_free(real_who);
}
@@ -1963,7 +1963,7 @@ update_typing_deleting_cb(PidginConversation *gtkconv)
/* We deleted all the text, so turn off typing. */
purple_im_conversation_stop_send_typed_timeout(im);
- serv_send_typing(purple_conversation_get_connection(gtkconv->active_conv),
+ purple_serv_send_typing(purple_conversation_get_connection(gtkconv->active_conv),
purple_conversation_get_name(gtkconv->active_conv),
PURPLE_IM_NOT_TYPING);
}
@@ -3755,7 +3755,7 @@ got_typing_keypress(PidginConversation *gtkconv, gboolean first)
time(NULL) > purple_im_conversation_get_type_again(im)))
{
unsigned int timeout;
- timeout = serv_send_typing(purple_conversation_get_connection(conv),
+ timeout = purple_serv_send_typing(purple_conversation_get_connection(conv),
purple_conversation_get_name(conv),
PURPLE_IM_TYPING);
purple_im_conversation_set_type_again(im, timeout);
@@ -8391,7 +8391,7 @@ account_signed_off_cb(PurpleConnection *gc, gpointer event)
} else {
comps = purple_chat_get_components(chat);
}
- serv_join_chat(gc, comps);
+ purple_serv_join_chat(gc, comps);
if (chat == NULL && comps != NULL)
g_hash_table_destroy(comps);
}
@@ -9926,7 +9926,7 @@ alias_cb(GtkEntry *entry, gpointer user_data)
if (buddy != NULL) {
purple_buddy_set_local_alias(buddy, gtk_entry_get_text(entry));
}
- serv_alias_buddy(buddy);
+ purple_serv_alias_buddy(buddy);
} else if (PURPLE_IS_CHAT_CONVERSATION(conv)) {
gtk_entry_set_text(GTK_ENTRY(gtkconv->u.chat->topic_text), gtk_entry_get_text(entry));
topic_callback(NULL, gtkconv);
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
index 6363f553a7..9695748c5e 100644
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -1184,7 +1184,7 @@ static void
pidgin_dialogs_alias_buddy_cb(PurpleBuddy *buddy, const char *new_alias)
{
purple_buddy_set_local_alias(buddy, new_alias);
- serv_alias_buddy(buddy);
+ purple_serv_alias_buddy(buddy);
}
void
diff --git a/pidgin/gtkpounce.c b/pidgin/gtkpounce.c
index e39d68136d..ac46b805b1 100644
--- a/pidgin/gtkpounce.c
+++ b/pidgin/gtkpounce.c
@@ -1487,7 +1487,7 @@ pounce_cb(PurplePounce *pounce, PurplePounceEvent events, void *data)
purple_conversation_write(PURPLE_CONVERSATION(im), NULL, message,
PURPLE_MESSAGE_SEND, time(NULL));
- serv_send_im(purple_account_get_connection(account), (char *)pouncee, (char *)message, 0);
+ purple_serv_send_im(purple_account_get_connection(account), (char *)pouncee, (char *)message, 0);
}
}
diff --git a/pidgin/gtkprivacy.c b/pidgin/gtkprivacy.c
index f1ac451ac2..6bf0b3e7ab 100644
--- a/pidgin/gtkprivacy.c
+++ b/pidgin/gtkprivacy.c
@@ -229,7 +229,7 @@ type_changed_cb(GtkComboBox *combo, PidginPrivacyDialog *dialog)
menu_entries[gtk_combo_box_get_active(combo)].type;
purple_account_set_privacy_type(dialog->account, new_type);
- serv_set_permit_deny(purple_account_get_connection(dialog->account));
+ purple_serv_set_permit_deny(purple_account_get_connection(dialog->account));
gtk_widget_hide(dialog->allow_widget);
gtk_widget_hide(dialog->block_widget);
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
index d49ba85cab..70ba7e418c 100644
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -902,7 +902,7 @@ show_retrieveing_info(PurpleConnection *conn, const char *name)
void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name)
{
show_retrieveing_info(conn, name);
- serv_get_info(conn, name);
+ purple_serv_get_info(conn, name);
}
void pidgin_retrieve_user_info_in_chat(PurpleConnection *conn, const char *name, int chat)
@@ -1383,7 +1383,7 @@ static void dnd_image_ok_callback(_DndData *data, int choice)
purple_buddy_icons_node_set_custom_icon_from_file((PurpleBlistNode*)contact, data->filename);
break;
case DND_FILE_TRANSFER:
- serv_send_file(purple_account_get_connection(data->account), data->who, data->filename);
+ purple_serv_send_file(purple_account_get_connection(data->account), data->who, data->filename);
break;
case DND_IM_IMAGE:
conv = PURPLE_CONVERSATION(purple_im_conversation_new(data->account, data->who));
@@ -1598,7 +1598,7 @@ pidgin_dnd_file_manage(GtkSelectionData *sd, PurpleAccount *account, const char
#endif /* _WIN32 */
/* Everything is fine, let's send */
- serv_send_file(gc, who, filename);
+ purple_serv_send_file(gc, who, filename);
}
g_free(filename);
diff --git a/pidgin/libpidgin.c b/pidgin/libpidgin.c
index 8ce4853f7c..dbb323c4c0 100644
--- a/pidgin/libpidgin.c
+++ b/pidgin/libpidgin.c
@@ -766,8 +766,8 @@ int pidgin_start(int argc, char *argv[])
if (opt_si && !purple_core_ensure_single_instance()) {
#ifdef HAVE_DBUS
DBusConnection *conn = purple_dbus_get_connection();
- DBusMessage *message = dbus_message_new_method_call(DBUS_SERVICE_PURPLE, DBUS_PATH_PURPLE,
- DBUS_INTERFACE_PURPLE, "PurpleBlistSetVisible");
+ DBusMessage *message = dbus_message_new_method_call(PURPLE_DBUS_SERVICE, PURPLE_DBUS_PATH,
+ PURPLE_DBUS_INTERFACE, "PurpleBlistSetVisible");
gboolean tr = TRUE;
dbus_message_append_args(message, DBUS_TYPE_INT32, &tr, DBUS_TYPE_INVALID);
dbus_connection_send_with_reply_and_block(conn, message, -1, NULL);
diff --git a/pidgin/plugins/musicmessaging/musicmessaging.c b/pidgin/plugins/musicmessaging/musicmessaging.c
index 16061fa23e..a7bff7ce31 100644
--- a/pidgin/plugins/musicmessaging/musicmessaging.c
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c
@@ -183,7 +183,7 @@ static gboolean send_change_request (const int session, const char *id, const ch
DBusMessage *message;
/* Create the signal we need */
- message = dbus_message_new_signal (DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, "GscoreChangeRequest");
+ message = dbus_message_new_signal (PURPLE_DBUS_PATH, PURPLE_DBUS_INTERFACE, "GscoreChangeRequest");
/* Append the string "Ping!" to the signal */
dbus_message_append_args (message,
@@ -210,7 +210,7 @@ static gboolean send_change_confirmed (const int session, const char *command, c
DBusMessage *message;
/* Create the signal we need */
- message = dbus_message_new_signal (DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, "GscoreChangeConfirmed");
+ message = dbus_message_new_signal (PURPLE_DBUS_PATH, PURPLE_DBUS_INTERFACE, "GscoreChangeConfirmed");
/* Append the string "Ping!" to the signal */
dbus_message_append_args (message,
@@ -470,14 +470,14 @@ static void send_request(MMConversation *mmconv)
{
PurpleConnection *connection = purple_conversation_get_connection(mmconv->conv);
const char *convName = purple_conversation_get_name(mmconv->conv);
- serv_send_im(connection, convName, MUSICMESSAGING_START_MSG, PURPLE_MESSAGE_SEND);
+ purple_serv_send_im(connection, convName, MUSICMESSAGING_START_MSG, PURPLE_MESSAGE_SEND);
}
static void send_request_confirmed(MMConversation *mmconv)
{
PurpleConnection *connection = purple_conversation_get_connection(mmconv->conv);
const char *convName = purple_conversation_get_name(mmconv->conv);
- serv_send_im(connection, convName, MUSICMESSAGING_CONFIRM_MSG, PURPLE_MESSAGE_SEND);
+ purple_serv_send_im(connection, convName, MUSICMESSAGING_CONFIRM_MSG, PURPLE_MESSAGE_SEND);
}