From 04f4e2acfbc82946ca3def654214c08071a87359 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 20 Jun 2015 13:55:58 +0000 Subject: xml api became a set of functions git-svn-id: http://svn.miranda-ng.org/main/trunk@14288 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 52 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp') diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 51b70c307a..eef1c9179f 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -293,37 +293,37 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) ptrA xinitiator, xtarget, initiator; //content = 14291862291648:initiator8:user - HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("addmember")); + HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("addmember")); if (xml == NULL) return; - for (int i = 0; i < xi.getChildCount(xml); i++) + for (int i = 0; i < xmlGetChildCount(xml); i++) { - HXML xmlNode = xi.getNthChild(xml, L"target", i); + HXML xmlNode = xmlGetNthChild(xml, L"target", i); if (xmlNode == NULL) break; - xtarget = mir_t2a(xi.getText(xmlNode)); + xtarget = mir_t2a(xmlGetText(xmlNode)); CMStringA target = ParseUrl(xtarget, "8:"); AddChatContact(_A2T(chatname), target, target, L"User"); } - xi.destroyNode(xml); + xmlDestroyNode(xml); } else if (!mir_strcmpi(messageType.c_str(), "ThreadActivity/DeleteMember")) { ptrA xinitiator, xtarget; //content = 14291862291648:initiator8:user - HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("deletemember")); + HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("deletemember")); if (xml != NULL) { - HXML xmlNode = xi.getChildByPath(xml, _T("initiator"), 0); - xinitiator = node != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; + HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0); + xinitiator = node != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xmlNode = xi.getChildByPath(xml, _T("target"), 0); - xtarget = xmlNode != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; + xmlNode = xmlGetChildByPath(xml, _T("target"), 0); + xtarget = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xi.destroyNode(xml); + xmlDestroyNode(xml); } if (xtarget == NULL) return; @@ -337,15 +337,15 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) { //content=14295327021308:usertest topic ptrA xinitiator, value; - HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("topicupdate")); + HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("topicupdate")); if (xml != NULL) { - HXML xmlNode = xi.getChildByPath(xml, _T("initiator"), 0); - xinitiator = xmlNode != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; + HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0); + xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xmlNode = xi.getChildByPath(xml, _T("value"), 0); - value = xmlNode != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; + xmlNode = xmlGetChildByPath(xml, _T("value"), 0); + value = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xi.destroyNode(xml); + xmlDestroyNode(xml); } CMStringA initiator = ParseUrl(xinitiator, "8:"); @@ -356,20 +356,20 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) { //content=14295512583638:user8:user1admin ptrA xinitiator, xId, xRole; - HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("roleupdate")); + HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("roleupdate")); if (xml != NULL) { - HXML xmlNode = xi.getChildByPath(xml, _T("initiator"), 0); - xinitiator = xmlNode != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; + HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0); + xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL; - xmlNode = xi.getChildByPath(xml, _T("target"), 0); + xmlNode = xmlGetChildByPath(xml, _T("target"), 0); if (xmlNode != NULL) { - HXML xmlId = xi.getChildByPath(xmlNode, _T("id"), 0); - HXML xmlRole = xi.getChildByPath(xmlNode, _T("role"), 0); - xId = xmlId != NULL ? mir_t2a(xi.getText(xmlId)) : NULL; - xRole = xmlRole != NULL ? mir_t2a(xi.getText(xmlRole)) : NULL; + HXML xmlId = xmlGetChildByPath(xmlNode, _T("id"), 0); + HXML xmlRole = xmlGetChildByPath(xmlNode, _T("role"), 0); + xId = xmlId != NULL ? mir_t2a(xmlGetText(xmlId)) : NULL; + xRole = xmlRole != NULL ? mir_t2a(xmlGetText(xmlRole)) : NULL; } - xi.destroyNode(xml); + xmlDestroyNode(xml); CMStringA initiator = ParseUrl(xinitiator, "8:"); CMStringA id = ParseUrl(xId, "8:"); -- cgit v1.2.3