summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_byte.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/JabberG/src/jabber_byte.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/JabberG/src/jabber_byte.cpp')
-rw-r--r--protocols/JabberG/src/jabber_byte.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp
index fcde4046de..3ebd23db99 100644
--- a/protocols/JabberG/src/jabber_byte.cpp
+++ b/protocols/JabberG/src/jabber_byte.cpp
@@ -44,7 +44,7 @@ JABBER_BYTE_TRANSFER::~JABBER_BYTE_TRANSFER()
mir_free(iqId);
mir_free(sid);
- xi.destroyNode(iqNode);
+ xmlDestroyNode(iqNode);
// XEP-0065 proxy support
mir_free(szProxyHost);
@@ -58,15 +58,15 @@ void CJabberProto::IqResultProxyDiscovery(HXML iqNode, CJabberIqInfo *pInfo)
JABBER_BYTE_TRANSFER *jbt = (JABBER_BYTE_TRANSFER *)pInfo->GetUserData();
if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
- HXML queryNode = xmlGetChild(iqNode , "query");
+ HXML queryNode = XmlGetChild(iqNode , "query");
if (queryNode) {
- const TCHAR *queryXmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
+ const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
- HXML streamHostNode = xmlGetChild(queryNode , "streamhost");
+ HXML streamHostNode = XmlGetChild(queryNode , "streamhost");
if (streamHostNode) {
- const TCHAR *streamJid = xmlGetAttrValue(streamHostNode, _T("jid"));
- const TCHAR *streamHost = xmlGetAttrValue(streamHostNode, _T("host"));
- const TCHAR *streamPort = xmlGetAttrValue(streamHostNode, _T("port"));
+ const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, _T("jid"));
+ const TCHAR *streamHost = XmlGetAttrValue(streamHostNode, _T("host"));
+ const TCHAR *streamPort = XmlGetAttrValue(streamHostNode, _T("port"));
if (streamJid && streamHost && streamPort) {
jbt->szProxyHost = mir_tstrdup(streamHost);
jbt->szProxyJid = mir_tstrdup(streamJid);
@@ -296,13 +296,13 @@ void CJabberProto::ByteInitiateResult(HXML iqNode, CJabberIqInfo *pInfo)
JABBER_BYTE_TRANSFER *jbt = (JABBER_BYTE_TRANSFER *)pInfo->GetUserData();
if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
- HXML queryNode = xmlGetChild(iqNode , "query");
+ HXML queryNode = XmlGetChild(iqNode , "query");
if (queryNode) {
- const TCHAR *queryXmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
+ const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
- HXML streamHostNode = xmlGetChild(queryNode , "streamhost-used");
+ HXML streamHostNode = XmlGetChild(queryNode , "streamhost-used");
if (streamHostNode) {
- const TCHAR *streamJid = xmlGetAttrValue(streamHostNode, _T("jid"));
+ const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, _T("jid"));
if (streamJid)
jbt->szStreamhostUsed = mir_tstrdup(streamJid);
} } } }
@@ -412,7 +412,7 @@ void CJabberProto::IqResultStreamActivate(HXML iqNode, CJabberIqInfo*)
if (item == NULL)
return;
- if (!mir_tstrcmp(xmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ if (!mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result")))
item->jbt->bStreamActivated = TRUE;
if (item->jbt->hProxyEvent)
@@ -600,26 +600,26 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt)
jbt->state = JBT_INIT;
if (iqNode = jbt->iqNode) {
- from = xmlGetAttrValue(iqNode, _T("from"));
- to = xmlGetAttrValue(iqNode, _T("to"));
- szId = xmlGetAttrValue(iqNode, _T("id"));
+ from = XmlGetAttrValue(iqNode, _T("from"));
+ to = XmlGetAttrValue(iqNode, _T("to"));
+ szId = XmlGetAttrValue(iqNode, _T("id"));
- queryNode = xmlGetChild(iqNode, "query");
+ queryNode = XmlGetChild(iqNode, "query");
if (queryNode)
- sid = xmlGetAttrValue(queryNode, _T("sid"));
+ sid = XmlGetAttrValue(queryNode, _T("sid"));
}
- if (szId && from && to && sid && (n = xmlGetChild(queryNode, "streamhost")) != NULL) {
+ if (szId && from && to && sid && (n = XmlGetChild(queryNode, "streamhost")) != NULL) {
jbt->iqId = mir_tstrdup(szId);
jbt->srcJID = mir_tstrdup(from);
jbt->dstJID = mir_tstrdup(to);
jbt->sid = mir_tstrdup(sid);
if ((buffer = (char*)mir_alloc(JABBER_NETWORK_BUFFER_SIZE))) {
- for (i = 1; (n = xmlGetNthChild(queryNode, _T("streamhost"), i)) != NULL; i++) {
- if ((szHost = xmlGetAttrValue(n, _T("host"))) != NULL &&
- (szPort = xmlGetAttrValue(n, _T("port"))) != NULL &&
- (str = xmlGetAttrValue(n, _T("jid"))) != NULL) {
+ for (i = 1; (n = XmlGetNthChild(queryNode, _T("streamhost"), i)) != NULL; i++) {
+ if ((szHost = XmlGetAttrValue(n, _T("host"))) != NULL &&
+ (szPort = XmlGetAttrValue(n, _T("port"))) != NULL &&
+ (str = XmlGetAttrValue(n, _T("jid"))) != NULL) {
port = (WORD)_ttoi(szPort);
replaceStrT(jbt->streamhostJID, str);