--- a/libpurple/protocols/jabber/jingle/iceudp.c Fri Sep 06 21:31:42 2013 +0530 +++ b/libpurple/protocols/jabber/jingle/iceudp.c Sat Sep 07 00:10:19 2013 +0530 @@ -43,8 +43,8 @@ static void jingle_iceudp_finalize (GObject *object); static void jingle_iceudp_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void jingle_iceudp_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static JingleTransport *jingle_iceudp_parse_internal(xmlnode *iceudp); -static xmlnode *jingle_iceudp_to_xml_internal(JingleTransport *transport, xmlnode *content, JingleActionType action); +static JingleTransport *jingle_iceudp_parse_internal(PurpleXmlNode *iceudp); +static PurpleXmlNode *jingle_iceudp_to_xml_internal(JingleTransport *transport, PurpleXmlNode *content, JingleActionType action); static void jingle_iceudp_add_local_candidate(JingleTransport *transport, const gchar *id, guint generation, PurpleMediaCandidate *candidate); static GList *jingle_iceudp_get_remote_candidates(JingleTransport *transport); @@ -370,27 +370,27 @@ } static JingleTransport * -jingle_iceudp_parse_internal(xmlnode *iceudp) +jingle_iceudp_parse_internal(PurpleXmlNode *iceudp) { JingleTransport *transport = parent_class->parse(iceudp); - xmlnode *candidate = xmlnode_get_child(iceudp, "candidate"); + PurpleXmlNode *candidate = purple_xmlnode_get_child(iceudp, "candidate"); JingleIceUdpCandidate *iceudp_candidate = NULL; - const gchar *username = xmlnode_get_attrib(iceudp, "ufrag"); - const gchar *password = xmlnode_get_attrib(iceudp, "pwd"); + const gchar *username = purple_xmlnode_get_attrib(iceudp, "ufrag"); + const gchar *password = purple_xmlnode_get_attrib(iceudp, "pwd"); - for (; candidate; candidate = xmlnode_get_next_twin(candidate)) { - const gchar *relport = xmlnode_get_attrib(candidate, "rel-port"); - const gchar *component = xmlnode_get_attrib(candidate, "component"); - const gchar *foundation = xmlnode_get_attrib(candidate, "foundation"); - const gchar *generation = xmlnode_get_attrib(candidate, "generation"); - const gchar *id = xmlnode_get_attrib(candidate, "id"); - const gchar *ip = xmlnode_get_attrib(candidate, "ip"); - const gchar *network = xmlnode_get_attrib(candidate, "network"); - const gchar *port = xmlnode_get_attrib(candidate, "port"); - const gchar *priority = xmlnode_get_attrib(candidate, "priority"); - const gchar *protocol = xmlnode_get_attrib(candidate, "protocol"); - const gchar *type = xmlnode_get_attrib(candidate, "type"); + for (; candidate; candidate = purple_xmlnode_get_next_twin(candidate)) { + const gchar *relport = purple_xmlnode_get_attrib(candidate, "rel-port"); + const gchar *component = purple_xmlnode_get_attrib(candidate, "component"); + const gchar *foundation = purple_xmlnode_get_attrib(candidate, "foundation"); + const gchar *generation = purple_xmlnode_get_attrib(candidate, "generation"); + const gchar *id = purple_xmlnode_get_attrib(candidate, "id"); + const gchar *ip = purple_xmlnode_get_attrib(candidate, "ip"); + const gchar *network = purple_xmlnode_get_attrib(candidate, "network"); + const gchar *port = purple_xmlnode_get_attrib(candidate, "port"); + const gchar *priority = purple_xmlnode_get_attrib(candidate, "priority"); + const gchar *protocol = purple_xmlnode_get_attrib(candidate, "protocol"); + const gchar *type = purple_xmlnode_get_attrib(candidate, "type"); if (!component || !foundation || !generation || !id || !ip || !network || !port || !priority || !protocol || !type) @@ -409,7 +409,7 @@ type, username, password); iceudp_candidate->reladdr = g_strdup( - xmlnode_get_attrib(candidate, "rel-addr")); + purple_xmlnode_get_attrib(candidate, "rel-addr")); iceudp_candidate->relport = relport != NULL ? atoi(relport) : 0; iceudp_candidate->rem_known = TRUE; @@ -419,10 +419,10 @@ return transport; } -static xmlnode * -jingle_iceudp_to_xml_internal(JingleTransport *transport, xmlnode *content, JingleActionType action) +static PurpleXmlNode * +jingle_iceudp_to_xml_internal(JingleTransport *transport, PurpleXmlNode *content, JingleActionType action) { - xmlnode *node = parent_class->to_xml(transport, content, action); + PurpleXmlNode *node = parent_class->to_xml(transport, content, action); if (action == JINGLE_SESSION_INITIATE || action == JINGLE_SESSION_ACCEPT || @@ -435,7 +435,7 @@ for (; iter; iter = g_list_next(iter)) { JingleIceUdpCandidate *candidate = iter->data; - xmlnode *xmltransport; + PurpleXmlNode *xmltransport; gchar *component, *generation, *network, *port, *priority; @@ -445,7 +445,7 @@ used_candidate = TRUE; candidate->rem_known = TRUE; - xmltransport = xmlnode_new_child(node, "candidate"); + xmltransport = purple_xmlnode_new_child(node, "candidate"); component = g_strdup_printf("%d", candidate->component); generation = g_strdup_printf("%d", candidate->generation); @@ -453,29 +453,29 @@ port = g_strdup_printf("%d", candidate->port); priority = g_strdup_printf("%d", candidate->priority); - xmlnode_set_attrib(xmltransport, "component", component); - xmlnode_set_attrib(xmltransport, "foundation", candidate->foundation); - xmlnode_set_attrib(xmltransport, "generation", generation); - xmlnode_set_attrib(xmltransport, "id", candidate->id); - xmlnode_set_attrib(xmltransport, "ip", candidate->ip); - xmlnode_set_attrib(xmltransport, "network", network); - xmlnode_set_attrib(xmltransport, "port", port); - xmlnode_set_attrib(xmltransport, "priority", priority); - xmlnode_set_attrib(xmltransport, "protocol", candidate->protocol); + purple_xmlnode_set_attrib(xmltransport, "component", component); + purple_xmlnode_set_attrib(xmltransport, "foundation", candidate->foundation); + purple_xmlnode_set_attrib(xmltransport, "generation", generation); + purple_xmlnode_set_attrib(xmltransport, "id", candidate->id); + purple_xmlnode_set_attrib(xmltransport, "ip", candidate->ip); + purple_xmlnode_set_attrib(xmltransport, "network", network); + purple_xmlnode_set_attrib(xmltransport, "port", port); + purple_xmlnode_set_attrib(xmltransport, "priority", priority); + purple_xmlnode_set_attrib(xmltransport, "protocol", candidate->protocol); if (candidate->reladdr != NULL && (strcmp(candidate->ip, candidate->reladdr) || (candidate->port != candidate->relport))) { gchar *relport = g_strdup_printf("%d", candidate->relport); - xmlnode_set_attrib(xmltransport, "rel-addr", + purple_xmlnode_set_attrib(xmltransport, "rel-addr", candidate->reladdr); - xmlnode_set_attrib(xmltransport, "rel-port", + purple_xmlnode_set_attrib(xmltransport, "rel-port", relport); g_free(relport); } - xmlnode_set_attrib(xmltransport, "type", candidate->type); + purple_xmlnode_set_attrib(xmltransport, "type", candidate->type); g_free(component); g_free(generation); @@ -487,8 +487,8 @@ if (used_candidate == TRUE) { JingleIceUdpCandidate *candidate = priv->local_candidates->data; - xmlnode_set_attrib(node, "pwd", candidate->password); - xmlnode_set_attrib(node, "ufrag", candidate->username); + purple_xmlnode_set_attrib(node, "pwd", candidate->password); + purple_xmlnode_set_attrib(node, "ufrag", candidate->username); } }