summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_events.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /protocols/JabberG/src/jabber_events.cpp
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_events.cpp')
-rw-r--r--protocols/JabberG/src/jabber_events.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index 24580a5207..61aecd3a6b 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -36,7 +36,7 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM)
if (!m_bJabberOnline) // should never happen
return 0;
- ptrT jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
+ ptrW jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
if (jid == NULL)
return 0;
@@ -45,7 +45,7 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM)
wchar_t szStrippedJid[JABBER_MAX_JID_LEN];
JabberStripJid(m_ThreadInfo->fullJID, szStrippedJid, _countof(szStrippedJid));
wchar_t *szDog = wcschr(szStrippedJid, '@');
- if (szDog && mir_tstrcmpi(szDog + 1, jid))
+ if (szDog && mir_wstrcmpi(szDog + 1, jid))
m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(L"remove"));
}
@@ -63,24 +63,24 @@ static wchar_t* sttSettingToTchar(DBCONTACTWRITESETTING *cws)
{
switch (cws->value.type) {
case DBVT_ASCIIZ:
- return mir_a2t(cws->value.pszVal);
+ return mir_a2u(cws->value.pszVal);
case DBVT_UTF8:
- return mir_utf8decodeT(cws->value.pszVal);
+ return mir_utf8decodeW(cws->value.pszVal);
case DBVT_WCHAR:
- return mir_u2t(cws->value.pwszVal);
+ return mir_wstrdup(cws->value.pwszVal);
}
return NULL;
}
void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
- JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT(getTStringA(hContact, "jid")));
+ JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrW(getTStringA(hContact, "jid")));
if (item == NULL)
return;
- ptrT tszNick(db_get_tsa(hContact, "CList", "MyHandle"));
+ ptrW tszNick(db_get_tsa(hContact, "CList", "MyHandle"));
if (tszNick == NULL)
tszNick = getTStringA(hContact, "Nick");
if (tszNick == NULL)
@@ -96,7 +96,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hC
}
else {
wchar_t *p = sttSettingToTchar(cws);
- if (cws->value.pszVal != NULL && mir_tstrcmp(p, item->group)) {
+ if (cws->value.pszVal != NULL && mir_wstrcmp(p, item->group)) {
debugLog(L"Group set to %s", p);
if (p)
AddContactToRoster(item->jid, tszNick, p);
@@ -107,7 +107,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hC
void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
- JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT( getTStringA(hContact, "jid")));
+ JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrW( getTStringA(hContact, "jid")));
if (item == NULL)
return;
@@ -118,8 +118,8 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT
return;
}
- ptrT newNick( sttSettingToTchar(cws));
- if (newNick && mir_tstrcmp(item->nick, newNick)) {
+ ptrW newNick( sttSettingToTchar(cws));
+ if (newNick && mir_wstrcmp(item->nick, newNick)) {
debugLog(L"Renaming contact %s: %s -> %s", item->jid, item->nick, newNick);
AddContactToRoster(item->jid, newNick, item->group);
}
@@ -130,12 +130,12 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT
if (cws->value.type != DBVT_DELETED && !(cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
return;
- ptrT jid(getTStringA(hContact, "jid"));
+ ptrW jid(getTStringA(hContact, "jid"));
if (jid == NULL)
return;
debugLog(L"Add %s permanently to list", jid);
- ptrT nick(db_get_tsa(hContact, "CList", "MyHandle"));
+ ptrW nick(db_get_tsa(hContact, "CList", "MyHandle"));
if (nick == NULL)
nick = getTStringA(hContact, "Nick");
if (nick == NULL)
@@ -143,10 +143,10 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT
if (nick == NULL)
return;
- AddContactToRoster(jid, nick, ptrT(db_get_tsa(hContact, "CList", "Group")));
+ AddContactToRoster(jid, nick, ptrW(db_get_tsa(hContact, "CList", "Group")));
XmlNode xPresence(L"presence"); xPresence << XATTR(L"to", LPCTSTR(jid)) << XATTR(L"type", L"subscribe");
- ptrT myNick(getTStringA(NULL, "Nick"));
+ ptrW myNick(getTStringA(NULL, "Nick"));
if (myNick != NULL)
xPresence << XCHILD(L"nick", LPCTSTR(myNick)) << XATTR(L"xmlns", JABBER_FEAT_NICK);
m_ThreadInfo->send(xPresence);