diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/JabberG/src/jabber_caps.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_caps.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_caps.cpp | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index eb859e524b..275e869901 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -29,52 +29,52 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "version.h"
const JabberFeatCapPair g_JabberFeatCapPairs[] = {
- { JABBER_FEAT_DISCO_INFO, JABBER_CAPS_DISCO_INFO, LPGENT("Supports Service Discovery info") },
- { JABBER_FEAT_DISCO_ITEMS, JABBER_CAPS_DISCO_ITEMS, LPGENT("Supports Service Discovery items list") },
- { JABBER_FEAT_ENTITY_CAPS, JABBER_CAPS_ENTITY_CAPS, LPGENT("Can inform about its Jabber capabilities") },
- { JABBER_FEAT_SI, JABBER_CAPS_SI, LPGENT("Supports stream initiation (e.g., for filetransfers)") },
- { JABBER_FEAT_SI_FT, JABBER_CAPS_SI_FT, LPGENT("Supports stream initiation for file transfers") },
- { JABBER_FEAT_BYTESTREAMS, JABBER_CAPS_BYTESTREAMS, LPGENT("Supports file transfers via SOCKS5 Bytestreams") },
- { JABBER_FEAT_IBB, JABBER_CAPS_IBB, LPGENT("Supports file transfers via In-Band Bytestreams") },
- { JABBER_FEAT_OOB, JABBER_CAPS_OOB, LPGENT("Supports file transfers via Out-of-Band Bytestreams") },
- { JABBER_FEAT_OOB2, JABBER_CAPS_OOB, LPGENT("Supports file transfers via Out-of-Band Bytestreams") },
- { JABBER_FEAT_COMMANDS, JABBER_CAPS_COMMANDS, LPGENT("Supports execution of Ad-Hoc commands") },
- { JABBER_FEAT_REGISTER, JABBER_CAPS_REGISTER, LPGENT("Supports in-band registration") },
- { JABBER_FEAT_MUC, JABBER_CAPS_MUC, LPGENT("Supports multi-user chat") },
- { JABBER_FEAT_CHATSTATES, JABBER_CAPS_CHATSTATES, LPGENT("Can report chat state in a chat session") },
- { JABBER_FEAT_LAST_ACTIVITY, JABBER_CAPS_LAST_ACTIVITY, LPGENT("Can report information about the last activity of the user") },
- { JABBER_FEAT_VERSION, JABBER_CAPS_VERSION, LPGENT("Can report own version information") },
- { JABBER_FEAT_ENTITY_TIME, JABBER_CAPS_ENTITY_TIME, LPGENT("Can report local time of the user") },
- { JABBER_FEAT_PING, JABBER_CAPS_PING, LPGENT("Can send and receive ping requests") },
- { JABBER_FEAT_DATA_FORMS, JABBER_CAPS_DATA_FORMS, LPGENT("Supports data forms") },
- { JABBER_FEAT_MESSAGE_EVENTS, JABBER_CAPS_MESSAGE_EVENTS, LPGENT("Can request and respond to events relating to the delivery, display, and composition of messages") },
- { JABBER_FEAT_VCARD_TEMP, JABBER_CAPS_VCARD_TEMP, LPGENT("Supports vCard") },
- { JABBER_FEAT_AVATAR, JABBER_CAPS_AVATAR, LPGENT("Supports iq-based avatars") },
- { JABBER_FEAT_XHTML, JABBER_CAPS_XHTML, LPGENT("Supports XHTML formatting of chat messages") },
- { JABBER_FEAT_AGENTS, JABBER_CAPS_AGENTS, LPGENT("Supports Jabber Browsing") },
- { JABBER_FEAT_BROWSE, JABBER_CAPS_BROWSE, LPGENT("Supports Jabber Browsing") },
- { JABBER_FEAT_FEATURE_NEG, JABBER_CAPS_FEATURE_NEG, LPGENT("Can negotiate options for specific features") },
- { JABBER_FEAT_AMP, JABBER_CAPS_AMP, LPGENT("Can request advanced processing of message stanzas") },
- { JABBER_FEAT_USER_MOOD, JABBER_CAPS_USER_MOOD, LPGENT("Can report information about user moods") },
- { JABBER_FEAT_USER_MOOD_NOTIFY, JABBER_CAPS_USER_MOOD_NOTIFY, LPGENT("Receives information about user moods") },
- { JABBER_FEAT_PUBSUB, JABBER_CAPS_PUBSUB, LPGENT("Supports generic publish-subscribe functionality") },
- { JABBER_FEAT_SECUREIM, JABBER_CAPS_SECUREIM, LPGENT("Supports SecureIM plugin for Miranda NG") },
- { JABBER_FEAT_MIROTR, JABBER_CAPS_MIROTR, LPGENT("Supports OTR (Off-the-Record Messaging)") },
- { JABBER_FEAT_NEWGPG, JABBER_CAPS_NEWGPG, LPGENT("Supports New_GPG plugin for Miranda NG") },
- { JABBER_FEAT_PRIVACY_LISTS, JABBER_CAPS_PRIVACY_LISTS, LPGENT("Blocks packets from other users/group chats using Privacy lists") },
- { JABBER_FEAT_MESSAGE_RECEIPTS, JABBER_CAPS_MESSAGE_RECEIPTS, LPGENT("Supports Message Receipts") },
- { JABBER_FEAT_USER_TUNE, JABBER_CAPS_USER_TUNE, LPGENT("Can report information about the music to which a user is listening") },
- { JABBER_FEAT_USER_TUNE_NOTIFY, JABBER_CAPS_USER_TUNE_NOTIFY, LPGENT("Receives information about the music to which a user is listening") },
- { JABBER_FEAT_PRIVATE_STORAGE, JABBER_CAPS_PRIVATE_STORAGE, LPGENT("Supports private XML Storage (for bookmarks and other)") },
- { JABBER_FEAT_ATTENTION, JABBER_CAPS_ATTENTION, LPGENT("Supports attention requests ('nudge')") },
- { JABBER_FEAT_ARCHIVE_AUTO, JABBER_CAPS_ARCHIVE_AUTO, LPGENT("Supports chat history retrieving") },
- { JABBER_FEAT_ARCHIVE_MANAGE, JABBER_CAPS_ARCHIVE_MANAGE, LPGENT("Supports chat history management") },
- { JABBER_FEAT_USER_ACTIVITY, JABBER_CAPS_USER_ACTIVITY, LPGENT("Can report information about user activity") },
- { JABBER_FEAT_USER_ACTIVITY_NOTIFY, JABBER_CAPS_USER_ACTIVITY_NOTIFY, LPGENT("Receives information about user activity") },
- { JABBER_FEAT_MIRANDA_NOTES, JABBER_CAPS_MIRANDA_NOTES, LPGENT("Supports Miranda NG notes extension") },
- { JABBER_FEAT_JINGLE, JABBER_CAPS_JINGLE, LPGENT("Supports Jingle") },
- { JABBER_FEAT_ROSTER_EXCHANGE, JABBER_CAPS_ROSTER_EXCHANGE, LPGENT("Supports Roster Exchange") },
- { JABBER_FEAT_DIRECT_MUC_INVITE, JABBER_CAPS_DIRECT_MUC_INVITE, LPGENT("Supports direct chat invitations (XEP-0249)") },
+ { JABBER_FEAT_DISCO_INFO, JABBER_CAPS_DISCO_INFO, LPGENW("Supports Service Discovery info") },
+ { JABBER_FEAT_DISCO_ITEMS, JABBER_CAPS_DISCO_ITEMS, LPGENW("Supports Service Discovery items list") },
+ { JABBER_FEAT_ENTITY_CAPS, JABBER_CAPS_ENTITY_CAPS, LPGENW("Can inform about its Jabber capabilities") },
+ { JABBER_FEAT_SI, JABBER_CAPS_SI, LPGENW("Supports stream initiation (e.g., for filetransfers)") },
+ { JABBER_FEAT_SI_FT, JABBER_CAPS_SI_FT, LPGENW("Supports stream initiation for file transfers") },
+ { JABBER_FEAT_BYTESTREAMS, JABBER_CAPS_BYTESTREAMS, LPGENW("Supports file transfers via SOCKS5 Bytestreams") },
+ { JABBER_FEAT_IBB, JABBER_CAPS_IBB, LPGENW("Supports file transfers via In-Band Bytestreams") },
+ { JABBER_FEAT_OOB, JABBER_CAPS_OOB, LPGENW("Supports file transfers via Out-of-Band Bytestreams") },
+ { JABBER_FEAT_OOB2, JABBER_CAPS_OOB, LPGENW("Supports file transfers via Out-of-Band Bytestreams") },
+ { JABBER_FEAT_COMMANDS, JABBER_CAPS_COMMANDS, LPGENW("Supports execution of Ad-Hoc commands") },
+ { JABBER_FEAT_REGISTER, JABBER_CAPS_REGISTER, LPGENW("Supports in-band registration") },
+ { JABBER_FEAT_MUC, JABBER_CAPS_MUC, LPGENW("Supports multi-user chat") },
+ { JABBER_FEAT_CHATSTATES, JABBER_CAPS_CHATSTATES, LPGENW("Can report chat state in a chat session") },
+ { JABBER_FEAT_LAST_ACTIVITY, JABBER_CAPS_LAST_ACTIVITY, LPGENW("Can report information about the last activity of the user") },
+ { JABBER_FEAT_VERSION, JABBER_CAPS_VERSION, LPGENW("Can report own version information") },
+ { JABBER_FEAT_ENTITY_TIME, JABBER_CAPS_ENTITY_TIME, LPGENW("Can report local time of the user") },
+ { JABBER_FEAT_PING, JABBER_CAPS_PING, LPGENW("Can send and receive ping requests") },
+ { JABBER_FEAT_DATA_FORMS, JABBER_CAPS_DATA_FORMS, LPGENW("Supports data forms") },
+ { JABBER_FEAT_MESSAGE_EVENTS, JABBER_CAPS_MESSAGE_EVENTS, LPGENW("Can request and respond to events relating to the delivery, display, and composition of messages") },
+ { JABBER_FEAT_VCARD_TEMP, JABBER_CAPS_VCARD_TEMP, LPGENW("Supports vCard") },
+ { JABBER_FEAT_AVATAR, JABBER_CAPS_AVATAR, LPGENW("Supports iq-based avatars") },
+ { JABBER_FEAT_XHTML, JABBER_CAPS_XHTML, LPGENW("Supports XHTML formatting of chat messages") },
+ { JABBER_FEAT_AGENTS, JABBER_CAPS_AGENTS, LPGENW("Supports Jabber Browsing") },
+ { JABBER_FEAT_BROWSE, JABBER_CAPS_BROWSE, LPGENW("Supports Jabber Browsing") },
+ { JABBER_FEAT_FEATURE_NEG, JABBER_CAPS_FEATURE_NEG, LPGENW("Can negotiate options for specific features") },
+ { JABBER_FEAT_AMP, JABBER_CAPS_AMP, LPGENW("Can request advanced processing of message stanzas") },
+ { JABBER_FEAT_USER_MOOD, JABBER_CAPS_USER_MOOD, LPGENW("Can report information about user moods") },
+ { JABBER_FEAT_USER_MOOD_NOTIFY, JABBER_CAPS_USER_MOOD_NOTIFY, LPGENW("Receives information about user moods") },
+ { JABBER_FEAT_PUBSUB, JABBER_CAPS_PUBSUB, LPGENW("Supports generic publish-subscribe functionality") },
+ { JABBER_FEAT_SECUREIM, JABBER_CAPS_SECUREIM, LPGENW("Supports SecureIM plugin for Miranda NG") },
+ { JABBER_FEAT_MIROTR, JABBER_CAPS_MIROTR, LPGENW("Supports OTR (Off-the-Record Messaging)") },
+ { JABBER_FEAT_NEWGPG, JABBER_CAPS_NEWGPG, LPGENW("Supports New_GPG plugin for Miranda NG") },
+ { JABBER_FEAT_PRIVACY_LISTS, JABBER_CAPS_PRIVACY_LISTS, LPGENW("Blocks packets from other users/group chats using Privacy lists") },
+ { JABBER_FEAT_MESSAGE_RECEIPTS, JABBER_CAPS_MESSAGE_RECEIPTS, LPGENW("Supports Message Receipts") },
+ { JABBER_FEAT_USER_TUNE, JABBER_CAPS_USER_TUNE, LPGENW("Can report information about the music to which a user is listening") },
+ { JABBER_FEAT_USER_TUNE_NOTIFY, JABBER_CAPS_USER_TUNE_NOTIFY, LPGENW("Receives information about the music to which a user is listening") },
+ { JABBER_FEAT_PRIVATE_STORAGE, JABBER_CAPS_PRIVATE_STORAGE, LPGENW("Supports private XML Storage (for bookmarks and other)") },
+ { JABBER_FEAT_ATTENTION, JABBER_CAPS_ATTENTION, LPGENW("Supports attention requests ('nudge')") },
+ { JABBER_FEAT_ARCHIVE_AUTO, JABBER_CAPS_ARCHIVE_AUTO, LPGENW("Supports chat history retrieving") },
+ { JABBER_FEAT_ARCHIVE_MANAGE, JABBER_CAPS_ARCHIVE_MANAGE, LPGENW("Supports chat history management") },
+ { JABBER_FEAT_USER_ACTIVITY, JABBER_CAPS_USER_ACTIVITY, LPGENW("Can report information about user activity") },
+ { JABBER_FEAT_USER_ACTIVITY_NOTIFY, JABBER_CAPS_USER_ACTIVITY_NOTIFY, LPGENW("Receives information about user activity") },
+ { JABBER_FEAT_MIRANDA_NOTES, JABBER_CAPS_MIRANDA_NOTES, LPGENW("Supports Miranda NG notes extension") },
+ { JABBER_FEAT_JINGLE, JABBER_CAPS_JINGLE, LPGENW("Supports Jingle") },
+ { JABBER_FEAT_ROSTER_EXCHANGE, JABBER_CAPS_ROSTER_EXCHANGE, LPGENW("Supports Roster Exchange") },
+ { JABBER_FEAT_DIRECT_MUC_INVITE, JABBER_CAPS_DIRECT_MUC_INVITE, LPGENW("Supports direct chat invitations (XEP-0249)") },
{ NULL }
};
@@ -110,9 +110,9 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI(HXML, CJabberIqInfo *pInfo) // XEP-0232 support
HXML xform;
for (int i = 1; (xform = XmlGetNthChild(query, L"x", i)) != NULL; i++) {
- TCHAR *szFormTypeValue = XPath(xform, L"field[@var='FORM_TYPE']/value");
+ wchar_t *szFormTypeValue = XPath(xform, L"field[@var='FORM_TYPE']/value");
if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, L"urn:xmpp:dataforms:softwareinfo")) {
- TCHAR *szTmp = XPath(xform, L"field[@var='os']/value");
+ wchar_t *szTmp = XPath(xform, L"field[@var='os']/value");
if (szTmp)
r->m_tszOs = mir_tstrdup(szTmp);
szTmp = XPath(xform, L"field[@var='os_version']/value");
@@ -143,7 +143,7 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo *pInfo) JabberCapsBits jcbCaps = 0;
HXML feature;
for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) {
- const TCHAR *featureName = XmlGetAttrValue(feature, L"var");
+ const wchar_t *featureName = XmlGetAttrValue(feature, L"var");
if (!featureName)
continue;
@@ -177,12 +177,12 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo *pInfo) }
}
-JabberCapsBits CJabberProto::GetTotalJidCapabilites(const TCHAR *jid)
+JabberCapsBits CJabberProto::GetTotalJidCapabilites(const wchar_t *jid)
{
if (jid == NULL)
return JABBER_RESOURCE_CAPS_NONE;
- TCHAR szBareJid[JABBER_MAX_JID_LEN];
+ wchar_t szBareJid[JABBER_MAX_JID_LEN];
JabberStripJid(jid, szBareJid, _countof(szBareJid));
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, szBareJid);
@@ -200,7 +200,7 @@ JabberCapsBits CJabberProto::GetTotalJidCapabilites(const TCHAR *jid) if (item) {
for (int i = 0; i < item->arResources.getCount(); i++) {
- TCHAR szFullJid[JABBER_MAX_JID_LEN];
+ wchar_t szFullJid[JABBER_MAX_JID_LEN];
mir_sntprintf(szFullJid, L"%s/%s", szBareJid, item->arResources[i]->m_tszResourceName);
JabberCapsBits jcb = GetResourceCapabilites(szFullJid, FALSE);
if (!(jcb & JABBER_RESOURCE_CAPS_ERROR))
@@ -210,13 +210,13 @@ JabberCapsBits CJabberProto::GetTotalJidCapabilites(const TCHAR *jid) return jcbToReturn;
}
-JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appendBestResource)
+JabberCapsBits CJabberProto::GetResourceCapabilites(const wchar_t *jid, BOOL appendBestResource)
{
- TCHAR fullJid[JABBER_MAX_JID_LEN];
+ wchar_t fullJid[JABBER_MAX_JID_LEN];
if (appendBestResource)
GetClientJID(jid, fullJid, _countof(fullJid));
else
- _tcsncpy_s(fullJid, jid, _TRUNCATE);
+ wcsncpy_s(fullJid, jid, _TRUNCATE);
pResourceStatus r(ResourceInfoFromJID(fullJid));
if (r == NULL)
@@ -239,7 +239,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen m_clientCapsManager.SetClientCaps(r->m_tszCapsNode, r->m_tszCapsVer, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
r->m_dwDiscoInfoRequestTime = pInfo->GetRequestTime();
- TCHAR queryNode[512];
+ wchar_t queryNode[512];
mir_sntprintf(queryNode, L"%s#%s", r->m_tszCapsNode, r->m_tszCapsVer);
m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", queryNode));
@@ -251,9 +251,9 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen jcbCaps |= jcbMainCaps;
if (jcbMainCaps != JABBER_RESOURCE_CAPS_TIMEOUT && r->m_tszCapsExt) {
- TCHAR *caps = mir_tstrdup(r->m_tszCapsExt);
+ wchar_t *caps = mir_tstrdup(r->m_tszCapsExt);
- TCHAR *token = _tcstok(caps, L" ");
+ wchar_t *token = wcstok(caps, L" ");
while (token) {
switch (jcbExtCaps = m_clientCapsManager.GetClientCaps(r->m_tszCapsNode, token)) {
case JABBER_RESOURCE_CAPS_ERROR:
@@ -282,7 +282,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen jcbCaps |= jcbExtCaps;
}
- token = _tcstok(NULL, L" ");
+ token = wcstok(NULL, L" ");
}
mir_free(caps);
@@ -388,7 +388,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen /////////////////////////////////////////////////////////////////////////////////////////
// CJabberClientPartialCaps class
-CJabberClientPartialCaps::CJabberClientPartialCaps(const TCHAR *szVer)
+CJabberClientPartialCaps::CJabberClientPartialCaps(const wchar_t *szVer)
{
m_szVer = mir_tstrdup(szVer);
m_jcbCaps = JABBER_RESOURCE_CAPS_UNINIT;
@@ -430,7 +430,7 @@ JabberCapsBits CJabberClientPartialCaps::GetCaps() return m_jcbCaps;
}
-CJabberClientPartialCaps* CJabberClientCaps::FindByVersion(const TCHAR *szVer)
+CJabberClientPartialCaps* CJabberClientCaps::FindByVersion(const wchar_t *szVer)
{
if (!m_pCaps || !szVer)
return NULL;
@@ -461,7 +461,7 @@ CJabberClientPartialCaps* CJabberClientCaps::FindById(int nIqId) /////////////////////////////////////////////////////////////////////////////////////////
// CJabberClientCaps class
-CJabberClientCaps::CJabberClientCaps(const TCHAR *szNode)
+CJabberClientCaps::CJabberClientCaps(const wchar_t *szNode)
{
m_szNode = mir_tstrdup(szNode);
m_pCaps = NULL;
@@ -483,13 +483,13 @@ CJabberClientCaps* CJabberClientCaps::SetNext(CJabberClientCaps *pClient) return pRetVal;
}
-JabberCapsBits CJabberClientCaps::GetPartialCaps(TCHAR *szVer)
+JabberCapsBits CJabberClientCaps::GetPartialCaps(wchar_t *szVer)
{
CJabberClientPartialCaps *pCaps = FindByVersion(szVer);
return (pCaps) ? pCaps->GetCaps() : JABBER_RESOURCE_CAPS_UNINIT;
}
-BOOL CJabberClientCaps::SetPartialCaps(const TCHAR *szVer, JabberCapsBits jcbCaps, int nIqId /*= -1*/)
+BOOL CJabberClientCaps::SetPartialCaps(const wchar_t *szVer, JabberCapsBits jcbCaps, int nIqId /*= -1*/)
{
CJabberClientPartialCaps *pCaps = FindByVersion(szVer);
if (!pCaps) {
@@ -529,7 +529,7 @@ CJabberClientCapsManager::~CJabberClientCapsManager() delete m_pClients;
}
-CJabberClientCaps * CJabberClientCapsManager::FindClient(const TCHAR *szNode)
+CJabberClientCaps * CJabberClientCapsManager::FindClient(const wchar_t *szNode)
{
if (!m_pClients || !szNode)
return NULL;
@@ -552,7 +552,7 @@ void CJabberClientCapsManager::AddDefaultCaps() SetClientCaps(JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature, g_JabberFeatCapPairsExt[i].jcbCap);
}
-JabberCapsBits CJabberClientCapsManager::GetClientCaps(TCHAR *szNode, TCHAR *szVer)
+JabberCapsBits CJabberClientCapsManager::GetClientCaps(wchar_t *szNode, wchar_t *szVer)
{
mir_cslockfull lck(m_cs);
CJabberClientCaps *pClient = FindClient(szNode);
@@ -567,7 +567,7 @@ JabberCapsBits CJabberClientCapsManager::GetClientCaps(TCHAR *szNode, TCHAR *szV return jcbCaps;
}
-BOOL CJabberClientCapsManager::SetClientCaps(const TCHAR *szNode, const TCHAR *szVer, JabberCapsBits jcbCaps, int nIqId /*= -1*/)
+BOOL CJabberClientCapsManager::SetClientCaps(const wchar_t *szNode, const wchar_t *szVer, JabberCapsBits jcbCaps, int nIqId /*= -1*/)
{
mir_cslockfull lck(m_cs);
CJabberClientCaps *pClient = FindClient(szNode);
@@ -604,7 +604,7 @@ BOOL CJabberClientCapsManager::SetClientCaps(int nIqId, JabberCapsBits jcbCaps) return bOk;
}
-BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TCHAR *szNode)
+BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const wchar_t *szNode)
{
int i;
JabberCapsBits jcb = 0;
@@ -614,7 +614,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con if (!g_JabberFeatCapPairsExt[i].Valid())
continue;
- TCHAR szExtCap[ 512 ];
+ wchar_t szExtCap[ 512 ];
mir_sntprintf(szExtCap, L"%s#%s", JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature);
if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = g_JabberFeatCapPairsExt[i].jcbCap;
@@ -624,7 +624,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con // check features registered through IJabberNetInterface::RegisterFeature() and IJabberNetInterface::AddFeatures()
for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++) {
- TCHAR szExtCap[ 512 ];
+ wchar_t szExtCap[ 512 ];
mir_sntprintf(szExtCap, L"%s#%s", JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt);
if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap;
@@ -663,16 +663,16 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con query << XCHILD(L"feature") << XATTR(L"var", ppro->m_lstJabberFeatCapPairsDynamic[i]->szFeature);
if (ppro->m_options.AllowVersionRequests && !szNode) {
- TCHAR szOsBuffer[256] = {0};
- TCHAR *os = szOsBuffer;
+ wchar_t szOsBuffer[256] = {0};
+ wchar_t *os = szOsBuffer;
if (ppro->m_options.ShowOSVersion) {
if (!GetOSDisplayString(szOsBuffer, _countof(szOsBuffer)))
mir_tstrncpy(szOsBuffer, L"", _countof(szOsBuffer));
else {
- TCHAR *szOsWindows = L"Microsoft Windows";
+ wchar_t *szOsWindows = L"Microsoft Windows";
size_t nOsWindowsLength = mir_tstrlen(szOsWindows);
- if (!_tcsnicmp(szOsBuffer, szOsWindows, nOsWindowsLength))
+ if (!wcsnicmp(szOsBuffer, szOsWindows, nOsWindowsLength))
os += nOsWindowsLength + 1;
}
}
|