summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_iq.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /protocols/JabberG/src/jabber_iq.cpp
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iq.cpp')
-rw-r--r--protocols/JabberG/src/jabber_iq.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp
index 49192e6613..ca7020a25e 100644
--- a/protocols/JabberG/src/jabber_iq.cpp
+++ b/protocols/JabberG/src/jabber_iq.cpp
@@ -83,52 +83,52 @@ void CJabberIqManager::Shutdown()
void CJabberIqManager::FillPermanentHandlers()
{
// version requests (XEP-0092)
- AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_VERSION, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_VERSION, FALSE, L"query");
// last activity (XEP-0012)
- AddPermanentHandler(&CJabberProto::OnIqRequestLastActivity, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_LAST_ACTIVITY, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestLastActivity, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_LAST_ACTIVITY, FALSE, L"query");
// ping requests (XEP-0199)
- AddPermanentHandler(&CJabberProto::OnIqRequestPing, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PING, FALSE, _T("ping"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestPing, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PING, FALSE, L"ping");
// entity time (XEP-0202)
- AddPermanentHandler(&CJabberProto::OnIqRequestTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME, FALSE, _T("time"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME, FALSE, L"time");
// entity time (XEP-0090)
- AddPermanentHandler(&CJabberProto::OnIqProcessIqOldTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME_OLD, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqProcessIqOldTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME_OLD, FALSE, L"query");
// old avatars support (deprecated XEP-0008)
- AddPermanentHandler(&CJabberProto::OnIqRequestAvatar, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_AVATAR, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestAvatar, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_AVATAR, FALSE, L"query");
// privacy lists (XEP-0016)
- AddPermanentHandler(&CJabberProto::OnIqRequestPrivacyLists, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PRIVACY_LISTS, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestPrivacyLists, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PRIVACY_LISTS, FALSE, L"query");
// in band bytestreams (XEP-0047)
AddPermanentHandler(&CJabberProto::OnFtHandleIbbIq, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE | JABBER_IQ_PARSE_CHILD_TAG_NAME | JABBER_IQ_PARSE_CHILD_TAG_XMLNS, JABBER_FEAT_IBB, FALSE, NULL);
// socks5-bytestreams (XEP-0065)
- AddPermanentHandler(&CJabberProto::FtHandleBytestreamRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_BYTESTREAMS, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::FtHandleBytestreamRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_BYTESTREAMS, FALSE, L"query");
// session initiation (XEP-0095)
- AddPermanentHandler(&CJabberProto::OnSiRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_SI, FALSE, _T("si"));
+ AddPermanentHandler(&CJabberProto::OnSiRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_SI, FALSE, L"si");
// roster push requests
- AddPermanentHandler(&CJabberProto::OnRosterPushRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_IQ_ROSTER, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnRosterPushRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_IQ_ROSTER, FALSE, L"query");
// OOB file transfers
- AddPermanentHandler(&CJabberProto::OnIqRequestOOB, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_HCONTACT | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_OOB, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestOOB, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_HCONTACT | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_OOB, FALSE, L"query");
// disco#items requests (XEP-0030, XEP-0050)
- AddPermanentHandler(&CJabberProto::OnHandleDiscoItemsRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_ITEMS, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnHandleDiscoItemsRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_ITEMS, FALSE, L"query");
// disco#info requests (XEP-0030, XEP-0050, XEP-0115)
- AddPermanentHandler(&CJabberProto::OnHandleDiscoInfoRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_INFO, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnHandleDiscoInfoRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_INFO, FALSE, L"query");
// ad-hoc commands (XEP-0050) for remote controlling (XEP-0146)
- AddPermanentHandler(&CJabberProto::HandleAdhocCommandRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_COMMANDS, FALSE, _T("command"));
+ AddPermanentHandler(&CJabberProto::HandleAdhocCommandRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_COMMANDS, FALSE, L"command");
// http auth (XEP-0070)
- AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_HTTP_AUTH, FALSE, _T("confirm"));
+ AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_HTTP_AUTH, FALSE, L"confirm");
}
void __cdecl CJabberProto::ExpirerThread(void* pParam)
@@ -171,7 +171,7 @@ void CJabberIqManager::ExpireInfo(CJabberIqInfo *pInfo)
if ((pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (pInfo->m_szFrom))
pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom);
- ppro->debugLog(_T("Expiring iq id %d, sent to %s"), pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server"));
+ ppro->debugLog(L"Expiring iq id %d, sent to %s", pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : L"server");
pInfo->m_nIqType = JABBER_IQ_TYPE_FAIL;
(ppro->*(pInfo->m_pHandler))(NULL, pInfo);
@@ -243,14 +243,14 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode)
if (nIqId == -1 || pNode == NULL)
return false;
- const TCHAR *szType = XmlGetAttrValue(pNode, _T("type"));
+ const TCHAR *szType = XmlGetAttrValue(pNode, L"type");
if (!szType)
return false;
int nIqType = JABBER_IQ_TYPE_FAIL;
- if (!mir_tstrcmpi(szType, _T("result")))
+ if (!mir_tstrcmpi(szType, L"result"))
nIqType = JABBER_IQ_TYPE_RESULT;
- else if (!mir_tstrcmpi(szType, _T("error")))
+ else if (!mir_tstrcmpi(szType, L"error"))
nIqType = JABBER_IQ_TYPE_ERROR;
else
return false;
@@ -268,19 +268,19 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode)
if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_NAME))
pInfo->m_szChildTagName = (TCHAR*)XmlGetName(pInfo->m_pChildNode);
if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_XMLNS))
- pInfo->m_szChildTagXmlns = (TCHAR*)XmlGetAttrValue(pNode, _T("xmlns"));
+ pInfo->m_szChildTagXmlns = (TCHAR*)XmlGetAttrValue(pNode, L"xmlns");
}
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_TO)
- pInfo->m_szTo = (TCHAR*)XmlGetAttrValue(pNode, _T("to"));
+ pInfo->m_szTo = (TCHAR*)XmlGetAttrValue(pNode, L"to");
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_FROM)
- pInfo->m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, _T("from"));
+ pInfo->m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, L"from");
if (pInfo->m_szFrom && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT))
pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom);
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_ID_STR)
- pInfo->m_szId = (TCHAR*)XmlGetAttrValue(pNode, _T("id"));
+ pInfo->m_szId = (TCHAR*)XmlGetAttrValue(pNode, L"id");
(ppro->*(pInfo->m_pHandler))(pNode, pInfo);
delete pInfo;
@@ -294,15 +294,15 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode)
for (int i = 0; i < m_arHandlers.getCount(); i++) {
CJabberIqPermanentInfo &pInfo = m_arHandlers[i];
// have to get all data here, in the loop, because there's always possibility that previous handler modified it
- const TCHAR *szType = XmlGetAttrValue(pNode, _T("type"));
+ const TCHAR *szType = XmlGetAttrValue(pNode, L"type");
if (!szType)
return FALSE;
CJabberIqInfo iqInfo;
iqInfo.m_nIqType = JABBER_IQ_TYPE_FAIL;
- if (!mir_tstrcmpi(szType, _T("get")))
+ if (!mir_tstrcmpi(szType, L"get"))
iqInfo.m_nIqType = JABBER_IQ_TYPE_GET;
- else if (!mir_tstrcmpi(szType, _T("set")))
+ else if (!mir_tstrcmpi(szType, L"set"))
iqInfo.m_nIqType = JABBER_IQ_TYPE_SET;
else
return FALSE;
@@ -315,7 +315,7 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode)
return FALSE;
const TCHAR *szTagName = XmlGetName(pFirstChild);
- const TCHAR *szXmlns = XmlGetAttrValue(pFirstChild, _T("xmlns"));
+ const TCHAR *szXmlns = XmlGetAttrValue(pFirstChild, L"xmlns");
if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) &&
(!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName)))
@@ -324,19 +324,19 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode)
iqInfo.m_pChildNode = pFirstChild;
iqInfo.m_szChildTagName = (TCHAR*)szTagName;
iqInfo.m_szChildTagXmlns = (TCHAR*)szXmlns;
- iqInfo.m_szId = (TCHAR*)XmlGetAttrValue(pNode, _T("id"));
+ iqInfo.m_szId = (TCHAR*)XmlGetAttrValue(pNode, L"id");
iqInfo.m_pUserData = pInfo.m_pUserData;
if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_TO)
- iqInfo.m_szTo = (TCHAR*)XmlGetAttrValue(pNode, _T("to"));
+ iqInfo.m_szTo = (TCHAR*)XmlGetAttrValue(pNode, L"to");
if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_FROM)
- iqInfo.m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, _T("from"));
+ iqInfo.m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, L"from");
if ((pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (iqInfo.m_szFrom))
iqInfo.m_hContact = ppro->HContactFromJID(iqInfo.m_szFrom);
- ppro->debugLog(_T("Handling iq id %s, type %s, from %s"), iqInfo.m_szId, szType, iqInfo.m_szFrom);
+ ppro->debugLog(L"Handling iq id %s, type %s, from %s", iqInfo.m_szId, szType, iqInfo.m_szFrom);
if ((ppro->*(pInfo.m_pHandler))(pNode, &iqInfo))
return true;
}