summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /protocols/SkypeWeb
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_avatars.cpp10
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp30
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp26
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_menus.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_mslogin.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_network.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_options.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_popups.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_profile.cpp66
-rw-r--r--protocols/SkypeWeb/src/skype_proto.cpp6
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h6
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp2
14 files changed, 84 insertions, 84 deletions
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp
index 0c780094ff..361f145e11 100644
--- a/protocols/SkypeWeb/src/skype_avatars.cpp
+++ b/protocols/SkypeWeb/src/skype_avatars.cpp
@@ -127,11 +127,11 @@ INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam)
void CSkypeProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t cbLen)
{
- int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
+ int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%s", VARSW(L"%miranda_avatarcache%"), m_tszUserName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
- CreateDirectoryTreeT(pszDest);
+ CreateDirectoryTreeW(pszDest);
pszDest[tPathLen++] = '\\';
@@ -142,9 +142,9 @@ void CSkypeProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t
mir_snwprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", username.c_str(), szFileType);
}
-void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
+void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMStringW &tszUrl)
{
- ptrW oldUrl(getTStringA(hContact, "AvatarUrl"));
+ ptrW oldUrl(getWStringA(hContact, "AvatarUrl"));
if (oldUrl != NULL)
if (tszUrl == oldUrl)
return;
@@ -154,7 +154,7 @@ void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL, 0);
}
else {
- setTString(hContact, "AvatarUrl", tszUrl.GetBuffer());
+ setWString(hContact, "AvatarUrl", tszUrl.GetBuffer());
setByte(hContact, "NeedNewAvatar", 1);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 6916ad1c35..35e40e9045 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -116,7 +116,7 @@ void CSkypeProto::OnLoadChats(const NETLIBHTTPREQUEST *response)
if (!conversation["lastMessage"])
continue;
- CMString topic(threadProperties["topic"].as_mstring());
+ CMStringW topic(threadProperties["topic"].as_mstring());
SendRequest(new GetChatInfoRequest(id.as_string().c_str(), li), &CSkypeProto::OnGetChatInfo, topic.Detach());
}
}
@@ -153,10 +153,10 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
hContact = AddContact(_T2A(gch->ptszUID), true);
setWord(hContact, "Status", ID_STATUS_ONLINE);
db_set_b(hContact, "CList", "Hidden", 1);
- setTString(hContact, "Nick", gch->ptszUID);
+ setWString(hContact, "Nick", gch->ptszUID);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
- CallService(MS_MSG_SENDMESSAGET, hContact, 0);
+ CallService(MS_MSG_SENDMESSAGEW, hContact, 0);
break;
}
@@ -184,7 +184,7 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
OnLeaveChatRoom(FindChatRoom(chat_id), NULL);
break;
case 30:
- CMString newTopic = ChangeTopicForm();
+ CMStringW newTopic = ChangeTopicForm();
if (!newTopic.IsEmpty())
SendRequest(new SetChatPropertiesRequest(chat_id, "topic", T2Utf(newTopic.GetBuffer()), li));
break;
@@ -232,7 +232,7 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
gce.time = time(NULL);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
- db_set_ts(FindChatRoom(chat_id), "UsersNicks", _T2A(gch->ptszUID), pForm.ptszResult);
+ db_set_ws(FindChatRoom(chat_id), "UsersNicks", _T2A(gch->ptszUID), pForm.ptszResult);
break;
@@ -248,8 +248,8 @@ INT_PTR CSkypeProto::OnJoinChatRoom(WPARAM hContact, LPARAM)
{
if (hContact)
{
- ptrW idT(getTStringA(hContact, "ChatRoomID"));
- ptrW nameT(getTStringA(hContact, "Nick"));
+ ptrW idT(getWStringA(hContact, "ChatRoomID"));
+ ptrW nameT(getWStringA(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))
{
- ptrW idT(getTStringA(hContact, "ChatRoomID"));
+ ptrW idT(getWStringA(hContact, "ChatRoomID"));
GCDEST gcd = { m_szModuleName, NULL, GC_EVENT_CONTROL };
gcd.ptszID = idT;
@@ -287,7 +287,7 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
CMStringA szConversationName(UrlToSkypename(node["conversationLink"].as_string().c_str()));
CMStringA szFromSkypename(UrlToSkypename(node["from"].as_string().c_str()));
- CMString szTopic(node["threadtopic"].as_mstring());
+ CMStringW szTopic(node["threadtopic"].as_mstring());
time_t timestamp = IsoToUnixTime(node["composetime"].as_string().c_str());
@@ -448,7 +448,7 @@ void CSkypeProto::AddMessageToChat(const wchar_t *chat_id, const wchar_t *from,
gce.time = timestamp;
gce.ptszUID = from;
- CMString tszText(ptrW(mir_utf8decodeW(content)));
+ CMStringW tszText(ptrW(mir_utf8decodeW(content)));
tszText.Replace(L"%", L"%%");
if (!isAction)
@@ -542,7 +542,7 @@ void CSkypeProto::AddChatContact(const wchar_t *tchat_id, const char *id, const
return;
ptrW tnick(mir_a2u_cp(name, CP_UTF8));
- if (wchar_t *tmp = db_get_tsa(FindChatRoom(_T2A(tchat_id)), "UsersNicks", id))
+ if (wchar_t *tmp = db_get_wsa(FindChatRoom(_T2A(tchat_id)), "UsersNicks", id))
tnick = tmp;
ptrW tid(mir_a2u(id));
@@ -555,7 +555,7 @@ void CSkypeProto::AddChatContact(const wchar_t *tchat_id, const char *id, const
gce.ptszUID = tid;
gce.time = !isChange ? time(NULL) : NULL;
gce.bIsMe = IsMe(id);
- gce.ptszStatus = TranslateTS(role);
+ gce.ptszStatus = TranslateW(role);
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
}
@@ -653,13 +653,13 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam)
return 0;
}
-CMString CSkypeProto::ChangeTopicForm()
+CMStringW CSkypeProto::ChangeTopicForm()
{
- CMString caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter new chatroom topic"));
+ CMStringW caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter new chatroom topic"));
ENTER_STRING pForm = { sizeof(pForm) };
pForm.type = ESF_MULTILINE;
pForm.caption = caption;
pForm.ptszInitVal = NULL;
pForm.szModuleName = m_szModuleName;
- return (!EnterString(&pForm)) ? CMString() : CMString(ptrW(pForm.ptszResult));
+ return (!EnterString(&pForm)) ? CMStringW() : CMStringW(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 bbe4765ca7..38bc23ecc5 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)
{
- ptrW tszChatID(getTStringA(hContact, "ChatRoomID"));
+ ptrW tszChatID(getWStringA(hContact, "ChatRoomID"));
if (tszChatID == NULL)
return;
GCDEST gcd = { m_szModuleName, tszChatID, GC_EVENT_CONTROL };
@@ -95,9 +95,9 @@ MCONTACT CSkypeProto::AddContact(const char *skypename, bool isTemporary)
setString(hContact, SKYPE_SETTINGS_ID, skypename);
DBVARIANT dbv;
- if (!getTString(SKYPE_SETTINGS_GROUP, &dbv))
+ if (!getWString(SKYPE_SETTINGS_GROUP, &dbv))
{
- db_set_ts(hContact, "CList", "Group", dbv.ptszVal);
+ db_set_ws(hContact, "CList", "Group", dbv.ptszVal);
db_free(&dbv);
}
@@ -206,10 +206,10 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
const JSONNode &phones = item["phones"];
std::string skypename = item["id"].as_string();
- CMString display_name = item["display_name"].as_mstring();
- CMString first_name = name["first"].as_mstring();
- CMString last_name = name["surname"].as_mstring();
- CMString avatar_url = item["avatar_url"].as_mstring();
+ CMStringW display_name = item["display_name"].as_mstring();
+ CMStringW first_name = name["first"].as_mstring();
+ CMStringW last_name = name["surname"].as_mstring();
+ CMStringW avatar_url = item["avatar_url"].as_mstring();
std::string type = item["type"].as_string();
if (type == "skype" || loadAll)
@@ -243,11 +243,11 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
setString(hContact, "Type", type.c_str());
if (display_name)
- setTString(hContact, "Nick", display_name);
+ setWString(hContact, "Nick", display_name);
if (first_name)
- setTString(hContact, "FirstName", first_name);
+ setWString(hContact, "FirstName", first_name);
if (last_name)
- setTString(hContact, "LastName", last_name);
+ setWString(hContact, "LastName", last_name);
if (item["mood"])
{
@@ -263,15 +263,15 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
if (!phone)
break;
- CMString number = phone["number"].as_mstring();
+ CMStringW number = phone["number"].as_mstring();
switch (phone["type"].as_int())
{
case 0:
- setTString(hContact, "Phone", number);
+ setWString(hContact, "Phone", number);
break;
case 2:
- setTString(hContact, "Cellular", number);
+ setWString(hContact, "Cellular", number);
break;
}
}
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index 227661c944..cb9a8bf3bb 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -173,7 +173,7 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam)
switch(pEvent->datatype)
{
- case DBVT_TCHAR:
+ case DBVT_WCHAR:
{
return (INT_PTR)mir_a2u(szText);
}
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp
index 8ad180448e..c03a048f7d 100644
--- a/protocols/SkypeWeb/src/skype_menus.cpp
+++ b/protocols/SkypeWeb/src/skype_menus.cpp
@@ -61,7 +61,7 @@ void CSkypeProto::InitMenus()
//hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
CMenuItem mi;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_UNICODE;
// Request authorization
mi.pszService = MODULE"/RequestAuth";
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index f4a42e2f2b..3ee550dd21 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -295,7 +295,7 @@ 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]->flags = PSR_UNICODE;
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 976cf98d77..1986d2475f 100644
--- a/protocols/SkypeWeb/src/skype_mslogin.cpp
+++ b/protocols/SkypeWeb/src/skype_mslogin.cpp
@@ -174,13 +174,13 @@ void CSkypeProto::OnMSLoginEnd(const NETLIBHTTPREQUEST *response)
OnLoginSuccess();
}
-CMString CSkypeProto::RunConfirmationCode()
+CMStringW CSkypeProto::RunConfirmationCode()
{
- CMString caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter confirmation code"));
+ CMStringW caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter confirmation code"));
ENTER_STRING pForm = { sizeof(pForm) };
pForm.type = ESF_PASSWORD;
pForm.caption = caption;
pForm.ptszInitVal = NULL;
pForm.szModuleName = m_szModuleName;
- return (!EnterString(&pForm)) ? CMString() : CMString(ptrW(pForm.ptszResult));
+ return (!EnterString(&pForm)) ? CMStringW() : CMStringW(ptrW(pForm.ptszResult));
} \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_network.cpp b/protocols/SkypeWeb/src/skype_network.cpp
index 1442140613..51ddd963f8 100644
--- a/protocols/SkypeWeb/src/skype_network.cpp
+++ b/protocols/SkypeWeb/src/skype_network.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void CSkypeProto::InitNetwork()
{
- CMString name(FORMAT, TranslateT("%s connection"), m_tszUserName);
+ CMStringW name(FORMAT, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp
index dafd60ebf2..b6ce46f0c5 100644
--- a/protocols/SkypeWeb/src/skype_options.cpp
+++ b/protocols/SkypeWeb/src/skype_options.cpp
@@ -73,7 +73,7 @@ int CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = g_hInstance;
odp.pwszTitle = m_tszUserName;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.pwszGroup = LPGENW("Network");
odp.pwszTab = LPGENW("Account");
diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp
index 6cc8c44cd6..810491c807 100644
--- a/protocols/SkypeWeb/src/skype_popups.cpp
+++ b/protocols/SkypeWeb/src/skype_popups.cpp
@@ -9,7 +9,7 @@ void CSkypeProto::InitPopups()
mir_snwprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notifications"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
- ppc.ptszDescription = desc;
+ ppc.pwszDescription = desc;
ppc.pszName = name;
ppc.hIcon = GetIcon(IDI_NOTIFY);
ppc.colorBack = RGB(255, 255, 255);
@@ -19,7 +19,7 @@ void CSkypeProto::InitPopups()
mir_snwprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
- ppc.ptszDescription = desc;
+ ppc.pwszDescription = desc;
ppc.pszName = name;
ppc.hIcon = GetIcon(IDI_ERRORICON);
ppc.colorBack = RGB(255, 255, 255);
@@ -29,7 +29,7 @@ void CSkypeProto::InitPopups()
mir_snwprintf(desc, L"%s %s", m_tszUserName, TranslateT("Calls"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Call");
- ppc.ptszDescription = desc;
+ ppc.pwszDescription = desc;
ppc.pszName = name;
ppc.hIcon = GetIcon(IDI_CALL);
ppc.colorBack = RGB(255, 255, 255);
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp
index ac9b4d6a9b..832a8f60b7 100644
--- a/protocols/SkypeWeb/src/skype_profile.cpp
+++ b/protocols/SkypeWeb/src/skype_profile.cpp
@@ -245,40 +245,40 @@ void CSkypeProto::InitLanguages()
void CSkypeProto::UpdateProfileFirstName(const JSONNode &root, MCONTACT hContact)
{
- CMString firstname = root["firstname"].as_mstring();
+ CMStringW firstname = root["firstname"].as_mstring();
if (!firstname.IsEmpty() && firstname != "null")
- setTString(hContact, "FirstName", firstname);
+ setWString(hContact, "FirstName", firstname);
else
delSetting(hContact, "FirstName");
}
void CSkypeProto::UpdateProfileLastName(const JSONNode &root, MCONTACT hContact)
{
- CMString lastname = root["lastname"].as_mstring();
+ CMStringW lastname = root["lastname"].as_mstring();
if (!lastname.IsEmpty() && lastname != "null")
- setTString(hContact, "LastName", lastname);
+ setWString(hContact, "LastName", lastname);
else
delSetting(hContact, "LastName");
}
void CSkypeProto::UpdateProfileDisplayName(const JSONNode &root, MCONTACT hContact)
{
- ptrW firstname(getTStringA(hContact, "FirstName"));
- ptrW lastname(getTStringA(hContact, "LastName"));
+ ptrW firstname(getWStringA(hContact, "FirstName"));
+ ptrW lastname(getWStringA(hContact, "LastName"));
if (firstname) {
- CMString nick(firstname);
+ CMStringW nick(firstname);
if (lastname)
nick.AppendFormat(L" %s", lastname);
- setTString(hContact, "Nick", nick);
+ setWString(hContact, "Nick", nick);
}
else if (lastname)
- setTString(hContact, "Nick", lastname);
+ setWString(hContact, "Nick", lastname);
else {
const JSONNode &node = root["displayname"];
- CMString displayname((!node) ? root["username"].as_mstring() : node.as_mstring());
+ CMStringW displayname((!node) ? root["username"].as_mstring() : node.as_mstring());
if (!displayname.IsEmpty() && displayname != "null")
- setTString(hContact, "Nick", displayname);
+ setWString(hContact, "Nick", displayname);
else
delSetting(hContact, "Nick");
}
@@ -286,7 +286,7 @@ void CSkypeProto::UpdateProfileDisplayName(const JSONNode &root, MCONTACT hConta
void CSkypeProto::UpdateProfileGender(const JSONNode &root, MCONTACT hContact)
{
- CMString gender = root["gender"].as_mstring();
+ CMStringW gender = root["gender"].as_mstring();
if (!gender.IsEmpty() && gender != "null")
setByte(hContact, "Gender", (BYTE)(_wtoi(gender) == 1 ? 'M' : 'F'));
else
@@ -295,7 +295,7 @@ void CSkypeProto::UpdateProfileGender(const JSONNode &root, MCONTACT hContact)
void CSkypeProto::UpdateProfileBirthday(const JSONNode &root, MCONTACT hContact)
{
- CMString birthday = root["birthday"].as_mstring();
+ CMStringW birthday = root["birthday"].as_mstring();
if (!birthday.IsEmpty() && birthday != "null")
{
int d, m, y;
@@ -325,45 +325,45 @@ void CSkypeProto::UpdateProfileCountry(const JSONNode &root, MCONTACT hContact)
void CSkypeProto::UpdateProfileState(const JSONNode &root, MCONTACT hContact)
{
- CMString province = root["province"].as_mstring();
+ CMStringW province = root["province"].as_mstring();
if (!province.IsEmpty() && province != "null")
- setTString(hContact, "State", province);
+ setWString(hContact, "State", province);
else
delSetting(hContact, "State");
}
void CSkypeProto::UpdateProfileCity(const JSONNode &root, MCONTACT hContact)
{
- CMString city = root["city"].as_mstring();
+ CMStringW city = root["city"].as_mstring();
if (!city.IsEmpty() && city != "null")
- setTString(hContact, "City", city);
+ setWString(hContact, "City", city);
else
delSetting(hContact, "City");
}
void CSkypeProto::UpdateProfileLanguage(const JSONNode &root, MCONTACT hContact)
{
- CMString isocode = root["language"].as_mstring();
+ CMStringW isocode = root["language"].as_mstring();
if (!isocode.IsEmpty() && isocode != "null")
- setTString(hContact, "Language0", languages[isocode.GetBuffer()].c_str());
+ setWString(hContact, "Language0", languages[isocode.GetBuffer()].c_str());
else
delSetting(hContact, "Language0");
}
void CSkypeProto::UpdateProfileHomepage(const JSONNode &root, MCONTACT hContact)
{
- CMString homepage = root["homepage"].as_mstring();
+ CMStringW homepage = root["homepage"].as_mstring();
if (!homepage.IsEmpty() && homepage != "null")
- setTString(hContact, "Homepage", homepage);
+ setWString(hContact, "Homepage", homepage);
else
delSetting(hContact, "Homepage");
}
void CSkypeProto::UpdateProfileAbout(const JSONNode &root, MCONTACT hContact)
{
- CMString about = root["about"].as_mstring();
+ CMStringW about = root["about"].as_mstring();
if (!about.IsEmpty() && about != "null")
- setTString(hContact, "About", about);
+ setWString(hContact, "About", about);
else
delSetting(hContact, "About");
}
@@ -381,7 +381,7 @@ void CSkypeProto::UpdateProfileEmails(const JSONNode &root, MCONTACT hContact)
break;
CMStringA name(FORMAT, "e-mail%d", i);
- setTString(hContact, name, item.as_mstring());
+ setWString(hContact, name, item.as_mstring());
}
}
else
@@ -394,43 +394,43 @@ void CSkypeProto::UpdateProfileEmails(const JSONNode &root, MCONTACT hContact)
void CSkypeProto::UpdateProfilePhoneMobile(const JSONNode &root, MCONTACT hContact)
{
- CMString province = root["phoneMobile"].as_mstring();
+ CMStringW province = root["phoneMobile"].as_mstring();
if (!province.IsEmpty() && province != "null")
- setTString(hContact, "Cellular", province);
+ setWString(hContact, "Cellular", province);
else
delSetting(hContact, "Cellular");
}
void CSkypeProto::UpdateProfilePhoneHome(const JSONNode &root, MCONTACT hContact)
{
- CMString province = root["phone"].as_mstring();
+ CMStringW province = root["phone"].as_mstring();
if (!province.IsEmpty() && province != "null")
- setTString(hContact, "Phone", province);
+ setWString(hContact, "Phone", province);
else
delSetting(hContact, "Phone");
}
void CSkypeProto::UpdateProfilePhoneOffice(const JSONNode &root, MCONTACT hContact)
{
- CMString province = root["phoneOffice"].as_mstring();
+ CMStringW province = root["phoneOffice"].as_mstring();
if (!province.IsEmpty() && province != "null")
- setTString(hContact, "CompanyPhone", province);
+ setWString(hContact, "CompanyPhone", province);
else
delSetting(hContact, "CompanyPhone");
}
void CSkypeProto::UpdateProfileXStatusMessage(const JSONNode &root, MCONTACT hContact)
{
- CMString province = root["richMood"].as_mstring();
+ CMStringW province = root["richMood"].as_mstring();
if (!province.IsEmpty() && province != "null")
- setTString(hContact, "XStatusMsg", province);
+ setWString(hContact, "XStatusMsg", province);
else
delSetting(hContact, "XStatusMsg");
}
void CSkypeProto::UpdateProfileAvatar(const JSONNode &root, MCONTACT hContact)
{
- CMString province = root["avatarUrl"].as_mstring();
+ CMStringW province = root["avatarUrl"].as_mstring();
if (!province.IsEmpty() && province != "null")
{
SetAvatarUrl(hContact, province);
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp
index b496e4c2d7..1d5b85e89e 100644
--- a/protocols/SkypeWeb/src/skype_proto.cpp
+++ b/protocols/SkypeWeb/src/skype_proto.cpp
@@ -42,10 +42,10 @@ CSkypeProto::CSkypeProto(const char* protoName, const wchar_t* userName) :
CreateProtoService("/IncomingCallCLE", &CSkypeProto::OnIncomingCallCLE);
CreateProtoService("/IncomingCallPP", &CSkypeProto::OnIncomingCallPP);
- m_tszAvatarFolder = std::wstring(VARST(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName;
+ m_tszAvatarFolder = std::wstring(VARSW(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName;
DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str());
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
- CreateDirectoryTreeT(m_tszAvatarFolder.c_str());
+ CreateDirectoryTreeW(m_tszAvatarFolder.c_str());
//sounds
SkinAddNewSoundEx("skype_inc_call", "SkypeWeb", LPGEN("Incoming call sound"));
@@ -131,7 +131,7 @@ HANDLE CSkypeProto::GetAwayMsg(MCONTACT hContact)
if (JSONNode &mood = root["mood"])
{
- CMString str = mood.as_mstring();
+ CMStringW str = mood.as_mstring();
this->ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)str.c_str());
}
this->ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index 37320a43d6..964bbc1ac5 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -280,7 +280,7 @@ private:
void SetContactStatus(MCONTACT hContact, WORD status);
void SetAllContactsStatus(WORD status);
- void SetAvatarUrl(MCONTACT hContact, CMString &tszUrl);
+ void SetAvatarUrl(MCONTACT hContact, CMStringW &tszUrl);
void ReloadAvatarInfo(MCONTACT hContact);
void GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, size_t cbLen);
@@ -408,8 +408,8 @@ private:
//---/
time_t GetLastMessageTime(MCONTACT hContact);
- CMString RunConfirmationCode();
- CMString ChangeTopicForm();
+ CMStringW RunConfirmationCode();
+ CMStringW ChangeTopicForm();
void CloseDialogs();
//events
void InitDBEvents();
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index 0f9506ad6c..bc82399167 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -212,7 +212,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &)
CMStringA service(FORMAT, "%s/IncomingCallCLE", GetContactProto(hContact));
cle.pszService = service.GetBuffer();
- CMString tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
cle.ptszTooltip = tooltip.GetBuffer();
pcli->pfnAddEvent(&cle);