diff options
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/requests/asm/files.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/capabilities.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/chatrooms.h | 16 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/endpoint.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/history.h | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/poll.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/status.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/subscriptions.h | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_avatars.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_files.cpp | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_profile.cpp | 2 |
12 files changed, 32 insertions, 32 deletions
diff --git a/protocols/SkypeWeb/src/requests/asm/files.h b/protocols/SkypeWeb/src/requests/asm/files.h index 89d42274d3..721aac16b3 100644 --- a/protocols/SkypeWeb/src/requests/asm/files.h +++ b/protocols/SkypeWeb/src/requests/asm/files.h @@ -8,7 +8,7 @@ public: {
flags &= (~NLHRF_DUMPASTEXT);
Headers
- << FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken)
+ << FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken.get())
<< CHAR_VALUE("Content-Type", "text/json");
JSONNode node, jPermissions, jPermission(JSON_ARRAY);
@@ -30,7 +30,7 @@ public: HttpRequest(REQUEST_PUT, FORMAT, "api.asm.skype.com/v1/objects/%s/content/original", szObject)
{
Headers
- << FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken)
+ << FORMAT_VALUE("Authorization", "skype_token %s", ppro->m_szApiToken.get())
<< CHAR_VALUE("Content-Type", "application/octet-stream");
pData = (char*)mir_alloc(size);
diff --git a/protocols/SkypeWeb/src/requests/capabilities.h b/protocols/SkypeWeb/src/requests/capabilities.h index 70ca5f7311..0c4366ce95 100644 --- a/protocols/SkypeWeb/src/requests/capabilities.h +++ b/protocols/SkypeWeb/src/requests/capabilities.h @@ -27,7 +27,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
JSONNode privateInfo; privateInfo.set_name("privateInfo");
privateInfo << JSONNode("epname", hostname);
diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h index 1b6b352411..1a7c234539 100644 --- a/protocols/SkypeWeb/src/requests/chatrooms.h +++ b/protocols/SkypeWeb/src/requests/chatrooms.h @@ -32,7 +32,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
}
};
@@ -45,7 +45,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
JSONNode node;
node
@@ -66,7 +66,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
JSONNode node(JSON_NODE);
@@ -92,7 +92,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
JSONNode node;
JSONNode members(JSON_ARRAY); members.set_name("members");
@@ -122,7 +122,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
}
};
@@ -135,7 +135,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
JSONNode node;
@@ -154,7 +154,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
}
};
@@ -167,7 +167,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
JSONNode node;
node << JSONNode(propname, value);
diff --git a/protocols/SkypeWeb/src/requests/endpoint.h b/protocols/SkypeWeb/src/requests/endpoint.h index fe9c3c6a3e..446b4630dd 100644 --- a/protocols/SkypeWeb/src/requests/endpoint.h +++ b/protocols/SkypeWeb/src/requests/endpoint.h @@ -27,7 +27,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("Authentication", "skypetoken=%s", ppro->m_szApiToken);
+ << FORMAT_VALUE("Authentication", "skypetoken=%s", ppro->m_szApiToken.get());
Body << VALUE("{}");
}
@@ -41,7 +41,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
}
};
diff --git a/protocols/SkypeWeb/src/requests/history.h b/protocols/SkypeWeb/src/requests/history.h index 30294dff30..f67718e49b 100644 --- a/protocols/SkypeWeb/src/requests/history.h +++ b/protocols/SkypeWeb/src/requests/history.h @@ -31,7 +31,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
}
@@ -41,7 +41,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
}
};
@@ -60,7 +60,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
}
};
@@ -73,7 +73,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset = UTF-8");
}
};
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h index 949704cbea..8ec058ba7a 100644 --- a/protocols/SkypeWeb/src/requests/messages.h +++ b/protocols/SkypeWeb/src/requests/messages.h @@ -26,7 +26,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
JSONNode node;
@@ -48,7 +48,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
CMStringA content;
@@ -74,7 +74,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
const char *state = (iState == PROTOTYPE_SELFTYPING_ON) ? "Control/Typing" : "Control/ClearTyping";
@@ -98,7 +98,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
//"lastReadMessageTimestamp;modificationTime;lastReadMessageId"
diff --git a/protocols/SkypeWeb/src/requests/poll.h b/protocols/SkypeWeb/src/requests/poll.h index 2c306ff958..4bc9da6e43 100644 --- a/protocols/SkypeWeb/src/requests/poll.h +++ b/protocols/SkypeWeb/src/requests/poll.h @@ -28,7 +28,7 @@ public: flags |= NLHRF_PERSISTENT;
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
}
};
#endif //_SKYPE_POLL_H_
\ No newline at end of file diff --git a/protocols/SkypeWeb/src/requests/status.h b/protocols/SkypeWeb/src/requests/status.h index c66cbd8ec2..900c4348cf 100644 --- a/protocols/SkypeWeb/src/requests/status.h +++ b/protocols/SkypeWeb/src/requests/status.h @@ -26,7 +26,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
JSONNode node(JSON_NODE);
diff --git a/protocols/SkypeWeb/src/requests/subscriptions.h b/protocols/SkypeWeb/src/requests/subscriptions.h index 979c472639..dc18432208 100644 --- a/protocols/SkypeWeb/src/requests/subscriptions.h +++ b/protocols/SkypeWeb/src/requests/subscriptions.h @@ -26,7 +26,7 @@ public: {
Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken)
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get())
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
JSONNode interestedResources(JSON_ARRAY); interestedResources.set_name("interestedResources");
@@ -55,7 +55,7 @@ public: Headers
<< CHAR_VALUE("Accept", "application/json, text/javascript")
<< CHAR_VALUE("Content-Type", "application/json; charset=UTF-8")
- << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken);
+ << FORMAT_VALUE("RegistrationToken", "registrationToken=%s", ppro->m_szToken.get());
JSONNode node;
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 56fc8f1869..094e857a56 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -107,7 +107,7 @@ INT_PTR CSkypeProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam) if (IsOnline()) {
PushRequest(new GetAvatarRequest(szUrl), &CSkypeProto::OnReceiveAvatar, (void*)pai->hContact);
- debugLogA("Requested to read an avatar from '%s'", szUrl);
+ debugLogA("Requested to read an avatar from '%s'", szUrl.get());
return GAIR_WAITFOR;
}
@@ -125,7 +125,7 @@ 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", VARSW(L"%miranda_avatarcache%"), m_tszUserName);
+ int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%s", VARSW(L"%miranda_avatarcache%").get(), m_tszUserName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp index 17cbab0b34..12cf2200ba 100644 --- a/protocols/SkypeWeb/src/skype_files.cpp +++ b/protocols/SkypeWeb/src/skype_files.cpp @@ -81,16 +81,16 @@ void CSkypeProto::OnASMObjectUploaded(const NETLIBHTTPREQUEST *response, void *a auto *pTitle = doc.NewElement("Title"); pTitle->SetText(tszFile); pRoot->InsertEndChild(pTitle);
auto *pDescr = doc.NewElement("Description"); pDescr->SetText(fup->tszDesc.get()); pRoot->InsertEndChild(pDescr);
- auto *xmlA = doc.NewElement("a"); xmlA->SetText(CMStringA(FORMAT, "https://login.skype.com/login/sso?go=webclient.xmm&docid=%s", fup->uid));
- xmlA->SetAttribute("href", CMStringA(FORMAT, "https://login.skype.com/login/sso?go=webclient.xmm&docid=%s", fup->uid));
+ auto *xmlA = doc.NewElement("a"); xmlA->SetText(CMStringA(FORMAT, "https://login.skype.com/login/sso?go=webclient.xmm&docid=%s", fup->uid.get()));
+ xmlA->SetAttribute("href", CMStringA(FORMAT, "https://login.skype.com/login/sso?go=webclient.xmm&docid=%s", fup->uid.get()));
pRoot->InsertEndChild(xmlA);
auto *xmlOrigName = doc.NewElement("OriginalName"); xmlOrigName->SetAttribute("v", tszFile); pRoot->InsertEndChild(xmlOrigName);
auto *xmlSize = doc.NewElement("FileSize"); xmlSize->SetAttribute("v", (int)fup->size); pRoot->InsertEndChild(xmlSize);
pRoot->SetAttribute("Type", "File.1");
- pRoot->SetAttribute("uri", CMStringA(FORMAT, "https://api.asm.skype.com/v1/objects/%s", fup->uid));
- pRoot->SetAttribute("url_thumbnail", CMStringA(FORMAT, "https://api.asm.skype.com/v1/objects/%s/views/thumbnail", fup->uid));
+ pRoot->SetAttribute("uri", CMStringA(FORMAT, "https://api.asm.skype.com/v1/objects/%s", fup->uid.get()));
+ pRoot->SetAttribute("url_thumbnail", CMStringA(FORMAT, "https://api.asm.skype.com/v1/objects/%s/views/thumbnail", fup->uid.get()));
tinyxml2::XMLPrinter printer(0, true);
doc.Print(&printer);
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index 58b28f3434..684526bdaa 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -233,7 +233,7 @@ void CSkypeProto::UpdateProfileDisplayName(const JSONNode &root, MCONTACT hConta if (firstname) {
CMStringW nick(firstname);
if (lastname)
- nick.AppendFormat(L" %s", lastname);
+ nick.AppendFormat(L" %s", lastname.get());
setWString(hContact, "Nick", nick);
}
else if (lastname)
|