diff options
Diffstat (limited to 'protocols')
24 files changed, 29 insertions, 29 deletions
diff --git a/protocols/CloudFile/src/utils.cpp b/protocols/CloudFile/src/utils.cpp index d0cc60e963..8ddaafaf04 100644 --- a/protocols/CloudFile/src/utils.cpp +++ b/protocols/CloudFile/src/utils.cpp @@ -23,7 +23,7 @@ void ShowNotification(const wchar_t *message, int flags, MCONTACT hContact) ShowNotification(_A2W(MODULENAME), message, flags, hContact); } -MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD flags, DWORD cbBlob, PBYTE pBlob) +MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD flags, DWORD cbBlob, uint8_t *pBlob) { DBEVENTINFO dbei = {}; dbei.szModule = MODULENAME; @@ -74,7 +74,7 @@ void SendToContact(MCONTACT hContact, const wchar_t *data) char *message = mir_utf8encodeW(data); if (ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message) != ACKRESULT_FAILED) - AddEventToDb(hContact, EVENTTYPE_MESSAGE, DBEF_UTF | DBEF_SENT, (DWORD)mir_strlen(message), (PBYTE)message); + AddEventToDb(hContact, EVENTTYPE_MESSAGE, DBEF_UTF | DBEF_SENT, (DWORD)mir_strlen(message), (uint8_t*)message); } void PasteToInputArea(MCONTACT hContact, const wchar_t *data) diff --git a/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp b/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp index 6055481181..5cf1ab001d 100644 --- a/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp +++ b/protocols/CurrencyRates/src/CurrencyRatesProviderBase.cpp @@ -409,7 +409,7 @@ void log_to_history(const ICurrencyRatesProvider *pProvider, MCONTACT hContact, dbei.flags = DBEF_READ | DBEF_UTF; dbei.eventType = EVENTTYPE_MESSAGE; dbei.cbBlob = (int)::mir_strlen(psz) + 1; - dbei.pBlob = (PBYTE)(char*)psz; + dbei.pBlob = (uint8_t*)(char*)psz; db_event_add(hContact, &dbei); } diff --git a/protocols/CurrencyRates/src/ImportExport.cpp b/protocols/CurrencyRates/src/ImportExport.cpp index ff6408d476..f21843f1f3 100644 --- a/protocols/CurrencyRates/src/ImportExport.cpp +++ b/protocols/CurrencyRates/src/ImportExport.cpp @@ -316,7 +316,7 @@ bool handle_module(MCONTACT hContact, const TiXmlElement *pXmlModule) } else if (!mir_strcmpi(g_szXmlTypeBlob, sType)) { size_t bufLen; - mir_ptr<BYTE> buf((PBYTE)mir_base64_decode(sValue, &bufLen)); + mir_ptr<BYTE> buf((uint8_t*)mir_base64_decode(sValue, &bufLen)); if (buf) { dbs.value.pbVal = buf; dbs.value.cpbVal = (WORD)bufLen; diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index 2b4882ed37..91c573d4db 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -109,7 +109,7 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest ptrA szBody(mir_utf8encodeW(wszText)); dbei.timestamp = dwTimeStamp; - dbei.pBlob = (PBYTE)szBody.get(); + dbei.pBlob = (uint8_t*)szBody.get(); dbei.cbBlob = (DWORD)mir_strlen(szBody); bool bSucceeded = false; diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index 961d5c2124..e88cd65b65 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -329,7 +329,7 @@ void CMLan::RecvMessageUrl(CCSDATA *ccs) dbei.timestamp = pre->timestamp; dbei.flags = DBEF_UTF + ((pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0); dbei.cbBlob = (DWORD)mir_strlen(szMessage) + 1; - dbei.pBlob = (PBYTE)szMessage.get(); + dbei.pBlob = (uint8_t*)szMessage.get(); db_event_add(ccs->hContact, &dbei); } @@ -913,7 +913,7 @@ void CMLan::RecvFile(CCSDATA *ccs) dbei.flags = pre->flags & (PREF_CREATEREAD ? DBEF_READ : 0); dbei.eventType = EVENTTYPE_FILE; dbei.cbBlob = DWORD(sizeof(DWORD) + mir_strlen(szFile) + mir_strlen(szDesc) + 2); - dbei.pBlob = (PBYTE)pre->szMessage; + dbei.pBlob = (uint8_t*)pre->szMessage; db_event_add(ccs->hContact, &dbei); } diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 08649d5ac0..a60c72dade 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -908,7 +908,7 @@ retry: dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (DWORD)mir_strlen(e->event.multilogon_msg.message) + 1;
- dbei.pBlob = (PBYTE)e->event.multilogon_msg.message;
+ dbei.pBlob = (uint8_t*)e->event.multilogon_msg.message;
db_event_add(getcontact(e->event.multilogon_msg.sender, 1, 0, nullptr), &dbei);
}
break;
diff --git a/protocols/GmailNotifier/src/notify.cpp b/protocols/GmailNotifier/src/notify.cpp index 2413c58023..c09988f12f 100644 --- a/protocols/GmailNotifier/src/notify.cpp +++ b/protocols/GmailNotifier/src/notify.cpp @@ -150,7 +150,7 @@ void NotifyUser(Account *curAcc) resultLink *prst = curAcc->results.next; for (int i = 0; i < newMails; i++) { dbei.cbBlob = (DWORD)mir_strlen(prst->content) + 1; - dbei.pBlob = (PBYTE)prst->content; + dbei.pBlob = (uint8_t*)prst->content; db_event_add(curAcc->hContact, &dbei); prst = prst->next; } diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index 908c078c35..01cf703d8f 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -202,7 +202,7 @@ static INT_PTR icqRecvMessage(WPARAM, LPARAM lParam) dbei.flags |= DBEF_READ;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (DWORD)mir_strlen(szMsg) + 1;
- dbei.pBlob = (PBYTE)szMsg.get();
+ dbei.pBlob = (uint8_t*)szMsg.get();
db_event_add(ccs->hContact, &dbei);
return 0;
}
@@ -374,7 +374,7 @@ static INT_PTR icqRecvFile(WPARAM, LPARAM lParam) dbei.flags = pre->flags & (PREF_CREATEREAD ? DBEF_READ : 0);
dbei.eventType = EVENTTYPE_FILE;
dbei.cbBlob = sizeof(DWORD) + (DWORD)mir_strlen(szFile) + (DWORD)mir_strlen(szDesc) + 2;
- dbei.pBlob = (PBYTE)pre->szMessage;
+ dbei.pBlob = (uint8_t*)pre->szMessage;
db_event_add(ccs->hContact, &dbei);
return 0;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 80159a7eb5..70eddc919a 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -228,7 +228,7 @@ int CIrcProto::AddOutgoingMessageToDB(MCONTACT hContact, const wchar_t *msg) dbei.eventType = EVENTTYPE_MESSAGE;
dbei.timestamp = (DWORD)time(0);
dbei.flags = DBEF_SENT | DBEF_UTF;
- dbei.pBlob = (PBYTE)mir_utf8encodeW(S);
+ dbei.pBlob = (uint8_t*)mir_utf8encodeW(S);
dbei.cbBlob = (DWORD)mir_strlen((char*)dbei.pBlob) + 1;
db_event_add(hContact, &dbei);
mir_free(dbei.pBlob);
diff --git a/protocols/NewsAggregator/Src/CheckFeed.cpp b/protocols/NewsAggregator/Src/CheckFeed.cpp index eab3be7bb3..5f02986f3e 100644 --- a/protocols/NewsAggregator/Src/CheckFeed.cpp +++ b/protocols/NewsAggregator/Src/CheckFeed.cpp @@ -166,7 +166,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr while (MEVENT hDbEvent = pCursor.FetchNext()) { olddbei.cbBlob = db_event_getBlobSize(hDbEvent); if (olddbei.cbBlob > cbMemoLen) - pbBuffer = (PBYTE)mir_realloc(pbBuffer, (size_t)(cbMemoLen = olddbei.cbBlob)); + pbBuffer = (uint8_t*)mir_realloc(pbBuffer, (size_t)(cbMemoLen = olddbei.cbBlob)); olddbei.pBlob = pbBuffer; db_event_get(hDbEvent, &olddbei); diff --git a/protocols/SkypeWeb/src/requests/avatars.h b/protocols/SkypeWeb/src/requests/avatars.h index 5c69ab66e2..4900d4ceef 100644 --- a/protocols/SkypeWeb/src/requests/avatars.h +++ b/protocols/SkypeWeb/src/requests/avatars.h @@ -30,7 +30,7 @@ struct GetAvatarRequest : public AsyncHttpRequest struct SetAvatarRequest : public AsyncHttpRequest
{
- SetAvatarRequest(const PBYTE data, size_t dataSize, const char *szMime, CSkypeProto *ppro) :
+ SetAvatarRequest(const uint8_t *data, size_t dataSize, const char *szMime, CSkypeProto *ppro) :
AsyncHttpRequest(REQUEST_PUT, HOST_API, 0, &CSkypeProto::OnSentAvatar)
{
m_szUrl.AppendFormat("/users/%s/profile/avatar", ppro->m_szSkypename.MakeLower().c_str());
diff --git a/protocols/SkypeWeb/src/requests/files.h b/protocols/SkypeWeb/src/requests/files.h index 0b46644c7f..9d0047bf61 100644 --- a/protocols/SkypeWeb/src/requests/files.h +++ b/protocols/SkypeWeb/src/requests/files.h @@ -28,7 +28,7 @@ struct ASMObjectCreateRequest : public AsyncHttpRequest struct ASMObjectUploadRequest : public AsyncHttpRequest { - ASMObjectUploadRequest(CSkypeProto *ppro, const char *szObject, const PBYTE data, const size_t size, CFileUploadParam *fup) : + ASMObjectUploadRequest(CSkypeProto *ppro, const char *szObject, const uint8_t *data, const size_t size, CFileUploadParam *fup) : AsyncHttpRequest(REQUEST_PUT, HOST_OTHER, 0, &CSkypeProto::OnASMObjectUploaded) { m_szUrl.AppendFormat("https://api.asm.skype.com/v1/objects/%s/content/original", szObject); diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 3527817b0f..ff2a273ea3 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -169,7 +169,7 @@ INT_PTR CSkypeProto::SvcSetMyAvatar(WPARAM, LPARAM lParam) if (length != -1) {
rewind(hFile);
- mir_ptr<BYTE> data((PBYTE)mir_alloc(length));
+ mir_ptr<BYTE> data((uint8_t*)mir_alloc(length));
if (data != NULL && fread(data, sizeof(BYTE), length, hFile) == length) {
const char *szMime = FreeImage_GetFIFMimeType(FreeImage_GetFIFFromFilenameU(path));
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 4adb73e341..afca4738ae 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -44,7 +44,7 @@ MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent) DWORD body[3];
DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(DWORD) * 2;
- dbei.pBlob = (PBYTE)&body;
+ dbei.pBlob = (uint8_t*)&body;
if (db_event_get(hEvent, &dbei))
return INVALID_CONTACT_ID;
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index e8ac1ab738..886f3b6ddc 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -94,7 +94,7 @@ void CSkypeProto::EditEvent(MCONTACT hContact, MEVENT hEvent, const CMStringW &s std::string newMsg = jMsg.write().c_str(); dbei.cbBlob = int(newMsg.size() + 1); - dbei.pBlob = (PBYTE)newMsg.c_str(); + dbei.pBlob = (uint8_t*)newMsg.c_str(); db_event_edit(hContact, hEvent, &dbei); } diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index fa03b94a81..61cba82d86 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -222,8 +222,8 @@ void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const pre.timestamp = (DWORD)timestamp;
pre.szMessage = (char*)psr;
- PBYTE b = (PBYTE)mir_calloc(sizeof(DWORD) + mir_strlen(szMessageId) + 1);
- PBYTE pCur = b;
+ uint8_t *b = (uint8_t*)mir_calloc(sizeof(DWORD) + mir_strlen(szMessageId) + 1);
+ uint8_t *pCur = b;
*((PDWORD)pCur) = nCount;
pCur += sizeof(DWORD);
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 6bc6e8e66e..c618956198 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -319,7 +319,7 @@ int CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre) for (int i = 0; i < nCount; i++) cbBlob += int(/*mir_wstrlen(isrList[i]->nick.w)*/0 + 2 + mir_wstrlen(isrList[i]->id.w) + mir_strlen(szMessageId)); - BYTE *pBlob = (PBYTE)mir_calloc(cbBlob); + BYTE *pBlob = (uint8_t*)mir_calloc(cbBlob); BYTE *pCurBlob = pBlob; for (int i = 0; i < nCount; i++) { diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 22c71fb386..7f1862408a 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -48,7 +48,7 @@ MCONTACT CSteamProto::GetContactFromAuthEvent(MEVENT hEvent) DWORD body[3]; DBEVENTINFO dbei = {}; dbei.cbBlob = sizeof(DWORD) * 2; - dbei.pBlob = (PBYTE)& body; + dbei.pBlob = (uint8_t*)& body; if (db_event_get(hEvent, &dbei)) return INVALID_CONTACT_ID; diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index d64f430891..bf0ba87a1c 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -17,7 +17,7 @@ MCONTACT CToxProto::GetContactFromAuthEvent(MEVENT hEvent) DWORD body[3];
DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(DWORD) * 2;
- dbei.pBlob = (PBYTE)&body;
+ dbei.pBlob = (uint8_t*)&body;
if (db_event_get(hEvent, &dbei))
return INVALID_CONTACT_ID;
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp index 4ec181e021..306fbf9312 100644 --- a/protocols/Tox/src/tox_messages.cpp +++ b/protocols/Tox/src/tox_messages.cpp @@ -153,7 +153,7 @@ int CToxProto::OnPreCreateMessage(WPARAM, LPARAM lParam) return 0;
evt->dbei->cbBlob = evt->dbei->cbBlob - 4;
- PBYTE action = (PBYTE)mir_alloc(evt->dbei->cbBlob);
+ uint8_t *action = (uint8_t*)mir_alloc(evt->dbei->cbBlob);
memcpy(action, &evt->dbei->pBlob[4], evt->dbei->cbBlob);
mir_free(evt->dbei->pBlob);
evt->dbei->pBlob = action;
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 681df6dcab..e9e858ad7e 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -236,7 +236,7 @@ private: static bool IsFileExists(const wchar_t* path);
- MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, PBYTE pBlob, size_t cbBlob);
+ MEVENT AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, uint8_t *pBlob, size_t cbBlob);
};
struct CMPlugin : public ACCPROTOPLUGIN<CToxProto>
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index d39deee198..96e7934b2b 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -126,7 +126,7 @@ bool CToxProto::IsFileExists(const wchar_t* path) return _waccess(path, 0) == 0;
}
-MEVENT CToxProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, PBYTE pBlob, size_t cbBlob)
+MEVENT CToxProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, uint8_t *pBlob, size_t cbBlob)
{
DBEVENTINFO dbei = {};
dbei.szModule = this->m_szModuleName;
diff --git a/protocols/Twitter/src/oauth.cpp b/protocols/Twitter/src/oauth.cpp index e6c5518a61..6f8c997359 100644 --- a/protocols/Twitter/src/oauth.cpp +++ b/protocols/Twitter/src/oauth.cpp @@ -157,6 +157,6 @@ CMStringA CTwitterProto::OAuthCreateSignature(const CMStringA &signatureBase, co BYTE digest[MIR_SHA1_HASH_SIZE];
unsigned int len;
- HMAC(EVP_sha1(), key.c_str(), (int)key.GetLength(), (PBYTE)signatureBase.c_str(), signatureBase.GetLength(), digest, &len);
+ HMAC(EVP_sha1(), key.c_str(), (int)key.GetLength(), (uint8_t*)signatureBase.c_str(), signatureBase.GetLength(), digest, &len);
return CMStringA(ptrA(mir_base64_encode(digest, sizeof(digest))));
}
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 7c5f09dad5..6e6452ac70 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -623,7 +623,7 @@ MCONTACT CVkProto::MContactFromDbEvent(MEVENT hDbEvent) DWORD body[2];
DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(DWORD) * 2;
- dbei.pBlob = (PBYTE)&body;
+ dbei.pBlob = (uint8_t*)&body;
if (db_event_get(hDbEvent, &dbei))
return INVALID_CONTACT_ID;
@@ -1722,7 +1722,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType) dbei.eventType = VK_USER_DEACTIVATE_ACTION;
ptrA pszDescription(mir_utf8encode(vkDeactivateEvent[iDEIdx].szDescription));
dbei.cbBlob = (DWORD)mir_strlen(pszDescription) + 1;
- dbei.pBlob = (PBYTE)mir_strdup(pszDescription);
+ dbei.pBlob = (uint8_t*)mir_strdup(pszDescription);
dbei.flags = DBEF_UTF | (
(
m_vkOptions.bShowVkDeactivateEvents
|