summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_history_sync.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-20 13:55:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-20 13:55:58 +0000
commit04f4e2acfbc82946ca3def654214c08071a87359 (patch)
tree871e1f476ed5086e8ebbd7e182ea2a89707cc249 /protocols/SkypeWeb/src/skype_history_sync.cpp
parent24cbc87262dc8856741db8e9f8388c18b16583ad (diff)
xml api became a set of functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@14288 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp
index c21ee4573a..ef57c93e8a 100644
--- a/protocols/SkypeWeb/src/skype_history_sync.cpp
+++ b/protocols/SkypeWeb/src/skype_history_sync.cpp
@@ -107,19 +107,19 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
//content=<partlist type="started" alt=""><part identity="username"><name>user name</name></part></partlist>
int iType = 3, iDuration = 0;
CMStringA skypename(ContactUrlToName(from.c_str()));
- HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("partlist"));
+ HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("partlist"));
if (xml != NULL)
{
- ptrA type(mir_t2a(xi.getAttrValue(xml, _T("type"))));
+ ptrA type(mir_t2a(xmlGetAttrValue(xml, _T("type"))));
if (!mir_strcmpi(type, "ended")) iType = 0;
else if (!mir_strcmpi(type, "started")) iType = 1;
- HXML xmlNode = xi.getChildByPath(xml, _T("part"), 0);
- HXML duration = xmlNode == NULL ? NULL : xi.getChildByPath(xmlNode, _T("duration"), 0);
- iDuration = duration != NULL ? atoi(mir_t2a(xi.getText(duration))) : NULL;
+ HXML xmlNode = xmlGetChildByPath(xml, _T("part"), 0);
+ HXML duration = xmlNode == NULL ? NULL : xmlGetChildByPath(xmlNode, _T("duration"), 0);
+ iDuration = duration != NULL ? atoi(mir_t2a(xmlGetText(duration))) : NULL;
- xi.destroyNode(xml);
+ xmlDestroyNode(xml);
}
CMStringA text = "";
if (iType == 1)
@@ -147,17 +147,17 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
else if (!mir_strcmpi(messageType.c_str(), "RichText/Files"))
{
//content=<files alt="отправил (-а) файл &quot;run.bat&quot;"><file size="97" index="0" tid="4197760077">run.bat</file></files>
- HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("files"));
+ HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("files"));
if (xml != NULL)
{
- for (int i = 0; i < xi.getChildCount(xml); i++)
+ for (int i = 0; i < xmlGetChildCount(xml); i++)
{
int fileSize; CMStringA msg = "";
- HXML xmlNode = xi.getNthChild(xml, L"file", i);
+ HXML xmlNode = xmlGetNthChild(xml, L"file", i);
if (xmlNode == NULL)
break;
- fileSize = atoi(_T2A(xi.getAttrValue(xmlNode, L"size")));
- ptrA fileName(mir_t2a(xi.getText(xmlNode)));
+ fileSize = atoi(_T2A(xmlGetAttrValue(xmlNode, L"size")));
+ ptrA fileName(mir_t2a(xmlGetText(xmlNode)));
if (fileName == NULL || fileSize == NULL)
continue;
@@ -170,10 +170,10 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
else if (!mir_strcmpi(messageType.c_str(), "RichText/UriObject"))
{
//content=<URIObject type="Picture.1" uri="https://api.asm.skype.com/v1//objects/0-weu-d1-262f0a1ee256d03b8e4b8360d9208834" url_thumbnail="https://api.asm.skype.com/v1//objects/0-weu-d1-262f0a1ee256d03b8e4b8360d9208834/views/imgt1"><Title></Title><Description></Description>Для просмотра этого общего фото перейдите по ссылке: https://api.asm.skype.com/s/i?0-weu-d1-262f0a1ee256d03b8e4b8360d9208834<meta type="photo" originalName="ysd7ZE4BqOg.jpg"/><OriginalName v="ysd7ZE4BqOg.jpg"/></URIObject>
- HXML xml = xi.parseString(ptrT(mir_a2t(content.c_str())), 0, _T("URIObject"));
+ HXML xml = xmlParseString(ptrT(mir_a2t(content.c_str())), 0, _T("URIObject"));
if (xml != NULL)
{
- CMStringA object(ParseUrl(_T2A(xi.getAttrValue(xml, L"uri")), "/objects/"));
+ CMStringA object(ParseUrl(_T2A(xmlGetAttrValue(xml, L"uri")), "/objects/"));
CMStringA data(FORMAT, "%s: https://api.asm.skype.com/s/i?%s", Translate("Image"), object.c_str());
AddMessageToDb(hContact, timestamp, flags, clientMsgId.c_str(), data.GetBuffer());