summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_accounts.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_avatars.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp68
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp10
-rw-r--r--protocols/SkypeWeb/src/skype_files.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_login.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_mslogin.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_options.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_popups.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_profile.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp16
-rw-r--r--protocols/SkypeWeb/src/skype_utils.h6
15 files changed, 71 insertions, 71 deletions
diff --git a/protocols/SkypeWeb/src/skype_accounts.cpp b/protocols/SkypeWeb/src/skype_accounts.cpp
index 2bc4d097d0..201d692982 100644
--- a/protocols/SkypeWeb/src/skype_accounts.cpp
+++ b/protocols/SkypeWeb/src/skype_accounts.cpp
@@ -21,7 +21,7 @@ LIST<CSkypeProto> CSkypeProto::Accounts(1, CSkypeProto::CompareAccounts);
int CSkypeProto::CompareAccounts(const CSkypeProto *p1, const CSkypeProto *p2)
{
- return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_wstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
CSkypeProto* CSkypeProto::InitAccount(const char *protoName, const wchar_t *userName)
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp
index d2c766c4e1..0c780094ff 100644
--- a/protocols/SkypeWeb/src/skype_avatars.cpp
+++ b/protocols/SkypeWeb/src/skype_avatars.cpp
@@ -127,7 +127,7 @@ INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam)
void CSkypeProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t cbLen)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
+ int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -139,12 +139,12 @@ void CSkypeProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t
CMStringA username(Contacts[hContact]);
username.Replace("live:", "__live_");
username.Replace("facebook:", "__facebook_");
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", username.c_str(), szFileType);
+ mir_snwprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", username.c_str(), szFileType);
}
void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
{
- ptrT oldUrl(getTStringA(hContact, "AvatarUrl"));
+ ptrW oldUrl(getTStringA(hContact, "AvatarUrl"));
if (oldUrl != NULL)
if (tszUrl == oldUrl)
return;
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 282793848c..6916ad1c35 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -248,8 +248,8 @@ INT_PTR CSkypeProto::OnJoinChatRoom(WPARAM hContact, LPARAM)
{
if (hContact)
{
- ptrT idT(getTStringA(hContact, "ChatRoomID"));
- ptrT nameT(getTStringA(hContact, "Nick"));
+ ptrW idT(getTStringA(hContact, "ChatRoomID"));
+ ptrW nameT(getTStringA(hContact, "Nick"));
StartChatRoom(idT, nameT != NULL ? nameT : idT);
}
return 0;
@@ -261,7 +261,7 @@ INT_PTR CSkypeProto::OnLeaveChatRoom(WPARAM hContact, LPARAM)
return 1;
if (hContact && IDYES == MessageBox(NULL, TranslateT("This chat is going to be destroyed forever with all its contents. This action cannot be undone. Are you sure?"), TranslateT("Warning"), MB_YESNO | MB_ICONQUESTION))
{
- ptrT idT(getTStringA(hContact, "ChatRoomID"));
+ ptrW idT(getTStringA(hContact, "ChatRoomID"));
GCDEST gcd = { m_szModuleName, NULL, GC_EVENT_CONTROL };
gcd.ptszID = idT;
@@ -309,7 +309,7 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
ptrA xinitiator, xtarget, initiator;
//content = <addmember><eventtime>1429186229164</eventtime><initiator>8:initiator</initiator><target>8:user</target></addmember>
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"addmember");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW(strContent.c_str())), 0, L"addmember");
if (xml == NULL)
return;
@@ -319,7 +319,7 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
if (xmlNode == NULL)
break;
- xtarget = mir_t2a(xmlGetText(xmlNode));
+ xtarget = mir_u2a(xmlGetText(xmlNode));
CMStringA target = ParseUrl(xtarget, "8:");
AddChatContact(_A2T(szConversationName), target, target, L"User");
@@ -331,13 +331,13 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
ptrA xinitiator, xtarget;
//content = <addmember><eventtime>1429186229164</eventtime><initiator>8:initiator</initiator><target>8:user</target></addmember>
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"deletemember");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW(strContent.c_str())), 0, L"deletemember");
if (xml != NULL) {
HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0);
- xinitiator = node != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
+ xinitiator = node != NULL ? mir_u2a(xmlGetText(xmlNode)) : NULL;
xmlNode = xmlGetChildByPath(xml, L"target", 0);
- xtarget = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
+ xtarget = xmlNode != NULL ? mir_u2a(xmlGetText(xmlNode)) : NULL;
xmlDestroyNode(xml);
}
@@ -353,13 +353,13 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
{
//content=<topicupdate><eventtime>1429532702130</eventtime><initiator>8:user</initiator><value>test topic</value></topicupdate>
ptrA xinitiator, value;
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"topicupdate");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW(strContent.c_str())), 0, L"topicupdate");
if (xml != NULL) {
HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0);
- xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
+ xinitiator = xmlNode != NULL ? mir_u2a(xmlGetText(xmlNode)) : NULL;
xmlNode = xmlGetChildByPath(xml, L"value", 0);
- value = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
+ value = xmlNode != NULL ? mir_u2a(xmlGetText(xmlNode)) : NULL;
xmlDestroyNode(xml);
}
@@ -372,18 +372,18 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
{
//content=<roleupdate><eventtime>1429551258363</eventtime><initiator>8:user</initiator><target><id>8:user1</id><role>admin</role></target></roleupdate>
ptrA xinitiator, xId, xRole;
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"roleupdate");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW(strContent.c_str())), 0, L"roleupdate");
if (xml != NULL) {
HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0);
- xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
+ xinitiator = xmlNode != NULL ? mir_u2a(xmlGetText(xmlNode)) : NULL;
xmlNode = xmlGetChildByPath(xml, L"target", 0);
if (xmlNode != NULL)
{
HXML xmlId = xmlGetChildByPath(xmlNode, L"id", 0);
HXML xmlRole = xmlGetChildByPath(xmlNode, L"role", 0);
- xId = xmlId != NULL ? mir_t2a(xmlGetText(xmlId)) : NULL;
- xRole = xmlRole != NULL ? mir_t2a(xmlGetText(xmlRole)) : NULL;
+ xId = xmlId != NULL ? mir_u2a(xmlGetText(xmlId)) : NULL;
+ xRole = xmlRole != NULL ? mir_u2a(xmlGetText(xmlRole)) : NULL;
}
xmlDestroyNode(xml);
@@ -392,9 +392,9 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
GCDEST gcd = { m_szModuleName, _A2T(szConversationName), !mir_strcmpi(xRole, "Admin") ? GC_EVENT_ADDSTATUS : GC_EVENT_REMOVESTATUS };
GCEVENT gce = { sizeof(gce), &gcd };
- ptrT tszId(mir_a2t(id));
- ptrT tszRole(mir_a2t(xRole));
- ptrT tszInitiator(mir_a2t(initiator));
+ ptrW tszId(mir_a2u(id));
+ ptrW tszRole(mir_a2u(xRole));
+ ptrW tszInitiator(mir_a2u(initiator));
gce.pDest = &gcd;
gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = tszId;
@@ -426,11 +426,11 @@ void CSkypeProto::OnSendChatMessage(const wchar_t *chat_id, const wchar_t * tszM
return;
wchar_t *buf = NEWWSTR_ALLOCA(tszMessage);
- rtrimt(buf);
+ rtrimw(buf);
UnEscapeChatTags(buf);
- ptrA szChatId(mir_t2a(chat_id));
- ptrA szMessage(mir_utf8encodeT(buf));
+ ptrA szChatId(mir_u2a(chat_id));
+ ptrA szMessage(mir_utf8encodeW(buf));
if (strncmp(szMessage, "/me ", 4) == 0)
SendRequest(new SendChatActionRequest(szChatId, time(NULL), szMessage, li));
@@ -448,7 +448,7 @@ void CSkypeProto::AddMessageToChat(const wchar_t *chat_id, const wchar_t *from,
gce.time = timestamp;
gce.ptszUID = from;
- CMString tszText(ptrT(mir_utf8decodeT(content)));
+ CMString tszText(ptrW(mir_utf8decodeW(content)));
tszText.Replace(L"%", L"%%");
if (!isAction)
@@ -468,7 +468,7 @@ void CSkypeProto::AddMessageToChat(const wchar_t *chat_id, const wchar_t *from,
void CSkypeProto::OnGetChatInfo(const NETLIBHTTPREQUEST *response, void *p)
{
- ptrT topic((wchar_t*)p); // memory must be freed in any case
+ ptrW topic((wchar_t*)p); // memory must be freed in any case
if (response == NULL || response->pData == NULL)
return;
@@ -497,8 +497,8 @@ void CSkypeProto::OnGetChatInfo(const NETLIBHTTPREQUEST *response, void *p)
void CSkypeProto::RenameChat(const char *chat_id, const char *name)
{
- ptrT tchat_id(mir_a2t(chat_id));
- ptrT tname(mir_utf8decodeT(name));
+ ptrW tchat_id(mir_a2u(chat_id));
+ ptrW tname(mir_utf8decodeW(name));
GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_CHANGESESSIONAME };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -508,9 +508,9 @@ void CSkypeProto::RenameChat(const char *chat_id, const char *name)
void CSkypeProto::ChangeChatTopic(const char *chat_id, const char *topic, const char *initiator)
{
- ptrT tchat_id(mir_a2t(chat_id));
- ptrT tname(mir_a2t(initiator));
- ptrT ttopic(mir_utf8decodeT(topic));
+ ptrW tchat_id(mir_a2u(chat_id));
+ ptrW tname(mir_a2u(initiator));
+ ptrW ttopic(mir_utf8decodeW(topic));
GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_TOPIC };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -541,11 +541,11 @@ void CSkypeProto::AddChatContact(const wchar_t *tchat_id, const char *id, const
if (IsChatContact(tchat_id, id))
return;
- ptrT tnick(mir_a2t_cp(name, CP_UTF8));
+ ptrW tnick(mir_a2u_cp(name, CP_UTF8));
if (wchar_t *tmp = db_get_tsa(FindChatRoom(_T2A(tchat_id)), "UsersNicks", id))
tnick = tmp;
- ptrT tid(mir_a2t(id));
+ ptrW tid(mir_a2u(id));
GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_JOIN };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -565,9 +565,9 @@ void CSkypeProto::RemoveChatContact(const wchar_t *tchat_id, const char *id, con
if (IsMe(id))
return;
- ptrT tnick(mir_a2t_cp(name, CP_UTF8));
- ptrT tid(mir_a2t(id));
- ptrT tinitiator(mir_a2t(initiator));
+ ptrW tnick(mir_a2u_cp(name, CP_UTF8));
+ ptrW tid(mir_a2u(id));
+ ptrW tinitiator(mir_a2u(initiator));
GCDEST gcd = { m_szModuleName, tchat_id, isKick ? GC_EVENT_KICK : GC_EVENT_PART };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -661,5 +661,5 @@ CMString CSkypeProto::ChangeTopicForm()
pForm.caption = caption;
pForm.ptszInitVal = NULL;
pForm.szModuleName = m_szModuleName;
- return (!EnterString(&pForm)) ? CMString() : CMString(ptrT(pForm.ptszResult));
+ return (!EnterString(&pForm)) ? CMString() : CMString(ptrW(pForm.ptszResult));
} \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index c4aecd4825..bbe4765ca7 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -46,7 +46,7 @@ void CSkypeProto::SetAllContactsStatus(WORD status)
void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus)
{
- ptrT tszChatID(getTStringA(hContact, "ChatRoomID"));
+ ptrW tszChatID(getTStringA(hContact, "ChatRoomID"));
if (tszChatID == NULL)
return;
GCDEST gcd = { m_szModuleName, tszChatID, GC_EVENT_CONTROL };
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index cd72da2f78..227661c944 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -57,10 +57,10 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam)
case SKYPE_DB_EVENT_TYPE_CALL_INFO:
{
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"partlist");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW((char*)pEvent->dbei->pBlob)), 0, L"partlist");
if (xml != NULL)
{
- ptrA type(mir_t2a(xmlGetAttrValue(xml, L"type")));
+ ptrA type(mir_u2a(xmlGetAttrValue(xml, L"type")));
bool bType = (!mir_strcmpi(type, "started")) ? 1 : 0;
time_t callDuration = 0;
@@ -106,7 +106,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam)
}
case SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO:
{
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"files");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW((char*)pEvent->dbei->pBlob)), 0, L"files");
if (xml != NULL)
{
for (int i = 0; i < xmlGetChildCount(xml); i++)
@@ -136,7 +136,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam)
case SKYPE_DB_EVENT_TYPE_MOJI:
case SKYPE_DB_EVENT_TYPE_URIOBJ:
{
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"URIObject");
+ HXML xml = xmlParseString(ptrW(mir_utf8decodeW((char*)pEvent->dbei->pBlob)), 0, L"URIObject");
if (xml != NULL)
{
//szText.Append(_T2A(xmlGetText(xml)));
@@ -175,7 +175,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam)
{
case DBVT_TCHAR:
{
- return (INT_PTR)mir_a2t(szText);
+ return (INT_PTR)mir_a2u(szText);
}
case DBVT_ASCIIZ:
{
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp
index 2a2941bdfd..aa26123f46 100644
--- a/protocols/SkypeWeb/src/skype_files.cpp
+++ b/protocols/SkypeWeb/src/skype_files.cpp
@@ -91,7 +91,7 @@ void CSkypeProto::OnASMObjectUploaded(const NETLIBHTTPREQUEST *response, void *a
xmlAddAttr(xml, L"uri", CMStringW(FORMAT, L"https://api.asm.skype.com/v1/objects/%s", _A2T(fup->uid)));
xmlAddAttr(xml, L"url_thumbnail", CMStringW(FORMAT, L"https://api.asm.skype.com/v1/objects/%s/views/thumbnail", _A2T(fup->uid)));
- SendRequest(new SendMessageRequest(Contacts[fup->hContact], time(NULL), T2Utf(ptrT(xmlToString(xml, nullptr))), li, "RichText/Media_GenericFile"));
+ SendRequest(new SendMessageRequest(Contacts[fup->hContact], time(NULL), T2Utf(ptrW(xmlToString(xml, nullptr))), li, "RichText/Media_GenericFile"));
xmlDestroyNode(xml);
ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, (HANDLE)fup);
delete fup;
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp
index e2d820eb75..b2b668a1a8 100644
--- a/protocols/SkypeWeb/src/skype_login.cpp
+++ b/protocols/SkypeWeb/src/skype_login.cpp
@@ -233,13 +233,13 @@ void CSkypeProto::SendPresence(bool isLogin)
ptrA epname;
if (!m_opts.bUseHostnameAsPlace && m_opts.wstrPlace && *m_opts.wstrPlace)
- epname = mir_utf8encodeT(m_opts.wstrPlace);
+ epname = mir_utf8encodeW(m_opts.wstrPlace);
else
{
wchar_t compName[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = _countof(compName);
GetComputerName(compName, &size);
- epname = mir_utf8encodeT(compName);
+ epname = mir_utf8encodeW(compName);
}
if (isLogin)
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 4d35393d12..f4a42e2f2b 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -275,7 +275,7 @@ void CSkypeProto::MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent)
void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const char *szContent, const char *szMessageId)
{
- HXML xmlNode = xmlParseString(mir_utf8decodeT(szContent), 0, L"contacts");
+ HXML xmlNode = xmlParseString(mir_utf8decodeW(szContent), 0, L"contacts");
if (xmlNode)
{
int nCount = 0;
@@ -296,8 +296,8 @@ void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const
psr[nCount] = (PROTOSEARCHRESULT*)mir_calloc(sizeof(PROTOSEARCHRESULT));
psr[nCount]->cbSize = sizeof(psr);
psr[nCount]->flags = PSR_TCHAR;
- psr[nCount]->id.w = mir_tstrdup(tszContactId);
- //psr[nCount]->nick.w = mir_tstrdup(tszContactName == NULL ? L"" : tszContactName);
+ psr[nCount]->id.w = mir_wstrdup(tszContactId);
+ //psr[nCount]->nick.w = mir_wstrdup(tszContactName == NULL ? L"" : tszContactName);
nCount++;
}
}
diff --git a/protocols/SkypeWeb/src/skype_mslogin.cpp b/protocols/SkypeWeb/src/skype_mslogin.cpp
index 3992ab48b7..976cf98d77 100644
--- a/protocols/SkypeWeb/src/skype_mslogin.cpp
+++ b/protocols/SkypeWeb/src/skype_mslogin.cpp
@@ -93,7 +93,7 @@ void CSkypeProto::OnMSLoginSecond(const NETLIBHTTPREQUEST *response)
CMStringA ppft(GetStringChunk(szContent, "sFT:'", "'"));
- ptrA code(mir_utf8encodeT(RunConfirmationCode()));
+ ptrA code(mir_utf8encodeW(RunConfirmationCode()));
SendRequest(new LoginMSRequest(url.c_str(), ptrA(getStringA(SKYPE_SETTINGS_ID)), szCookies.c_str(), ppft.c_str(), code), &CSkypeProto::OnMSLoginEnd);
return;
@@ -182,5 +182,5 @@ CMString CSkypeProto::RunConfirmationCode()
pForm.caption = caption;
pForm.ptszInitVal = NULL;
pForm.szModuleName = m_szModuleName;
- return (!EnterString(&pForm)) ? CMString() : CMString(ptrT(pForm.ptszResult));
+ return (!EnterString(&pForm)) ? CMString() : CMString(ptrW(pForm.ptszResult));
} \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp
index 2026a509eb..dafd60ebf2 100644
--- a/protocols/SkypeWeb/src/skype_options.cpp
+++ b/protocols/SkypeWeb/src/skype_options.cpp
@@ -61,8 +61,8 @@ void CSkypeOptionsMain::OnApply()
m_proto->delSetting("TokenExpiresIn");
m_proto->setString(SKYPE_SETTINGS_ID, szNewSkypename);
m_proto->setString("Password", szNewPassword);
- ptrT group(m_group.GetText());
- if (mir_tstrlen(group) > 0 && !Clist_GroupExists(group))
+ ptrW group(m_group.GetText());
+ if (mir_wstrlen(group) > 0 && !Clist_GroupExists(group))
Clist_GroupCreate(0, group);
}
diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp
index 65e5bb3487..6cc8c44cd6 100644
--- a/protocols/SkypeWeb/src/skype_popups.cpp
+++ b/protocols/SkypeWeb/src/skype_popups.cpp
@@ -7,7 +7,7 @@ void CSkypeProto::InitPopups()
POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
- mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notifications"));
+ mir_snwprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notifications"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -17,7 +17,7 @@ void CSkypeProto::InitPopups()
ppc.iSeconds = 5;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
- mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
+ mir_snwprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -27,7 +27,7 @@ void CSkypeProto::InitPopups()
ppc.iSeconds = -1;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
- mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Calls"));
+ mir_snwprintf(desc, L"%s %s", m_tszUserName, TranslateT("Calls"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Call");
ppc.ptszDescription = desc;
ppc.pszName = name;
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp
index 2c4678a93a..ac9b4d6a9b 100644
--- a/protocols/SkypeWeb/src/skype_profile.cpp
+++ b/protocols/SkypeWeb/src/skype_profile.cpp
@@ -263,8 +263,8 @@ void CSkypeProto::UpdateProfileLastName(const JSONNode &root, MCONTACT hContact)
void CSkypeProto::UpdateProfileDisplayName(const JSONNode &root, MCONTACT hContact)
{
- ptrT firstname(getTStringA(hContact, "FirstName"));
- ptrT lastname(getTStringA(hContact, "LastName"));
+ ptrW firstname(getTStringA(hContact, "FirstName"));
+ ptrW lastname(getTStringA(hContact, "LastName"));
if (firstname) {
CMString nick(firstname);
if (lastname)
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index cf003bdb17..b496e4c2d7 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -329,7 +329,7 @@ int CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
//if (GetMessageFromDb(hContact, szMessageId, pre->timestamp)) return 0;
for (i = 0; i < nCount; i++)
- cbBlob += int(/*mir_tstrlen(isrList[i]->nick.w)*/0 + 2 + mir_tstrlen(isrList[i]->id.w) + mir_strlen(szMessageId));
+ cbBlob += int(/*mir_wstrlen(isrList[i]->nick.w)*/0 + 2 + mir_wstrlen(isrList[i]->id.w) + mir_strlen(szMessageId));
pBlob = (PBYTE)mir_calloc(cbBlob);
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 42fe0bf575..41d01665b8 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -507,7 +507,7 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
*(szSecondParam++) = 0;
// no command or message command
- if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, L"chat")))
+ if (!szCommand || (szCommand && !mir_wstrcmpi(szCommand, L"chat")))
{
if (szSecondParam)
{
@@ -523,22 +523,22 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL);
return 0;
}
- else if (!mir_tstrcmpi(szCommand, L"call"))
+ else if (!mir_wstrcmpi(szCommand, L"call"))
{
MCONTACT hContact = AddContact(_T2A(szJid), true);
NotifyEventHooks(g_hCallEvent, (WPARAM)hContact, (LPARAM)0);
return 0;
}
- else if (!mir_tstrcmpi(szCommand, L"userinfo")){ return 0; }
- else if (!mir_tstrcmpi(szCommand, L"add"))
+ else if (!mir_wstrcmpi(szCommand, L"userinfo")){ return 0; }
+ else if (!mir_wstrcmpi(szCommand, L"add"))
{
MCONTACT hContact = FindContact(_T2A(szJid));
if (hContact == NULL)
{
PROTOSEARCHRESULT psr = { 0 };
psr.cbSize = sizeof(psr);
- psr.id.w = mir_tstrdup(szJid);
- psr.nick.w = mir_tstrdup(szJid);
+ psr.id.w = mir_wstrdup(szJid);
+ psr.nick.w = mir_wstrdup(szJid);
psr.flags = PSR_UNICODE;
ADDCONTACTSTRUCT acs = { 0 };
@@ -550,13 +550,13 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
}
return 0;
}
- if (!mir_tstrcmpi(szCommand, L"sendfile"))
+ if (!mir_wstrcmpi(szCommand, L"sendfile"))
{
MCONTACT hContact = AddContact(_T2A(szJid), true);
CallService(MS_FILE_SENDFILE, hContact, NULL);
return 1;
}
- if (!mir_tstrcmpi(szCommand, L"voicemail"))
+ if (!mir_wstrcmpi(szCommand, L"voicemail"))
{
return 1;
}
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h
index 45e57d6311..497e1b99e1 100644
--- a/protocols/SkypeWeb/src/skype_utils.h
+++ b/protocols/SkypeWeb/src/skype_utils.h
@@ -89,15 +89,15 @@ public:
};
struct CFileUploadParam : public MZeroedObject {
- ptrT tszFileName;
- ptrT tszDesc;
+ ptrW tszFileName;
+ ptrW tszDesc;
ptrA atr;
ptrA fname;
ptrA uid;
size_t size;
MCONTACT hContact;
- __forceinline CFileUploadParam(MCONTACT _hContact, const wchar_t* _desc, wchar_t** _files) : hContact(_hContact), tszDesc(mir_tstrdup(_desc)), tszFileName(mir_tstrdup(_files[0])) {};
+ __forceinline CFileUploadParam(MCONTACT _hContact, const wchar_t* _desc, wchar_t** _files) : hContact(_hContact), tszDesc(mir_wstrdup(_desc)), tszFileName(mir_wstrdup(_files[0])) {};
__forceinline bool IsAccess() { return ::_waccess(tszFileName, 0) == 0; }
};