diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
tree | b0a227d6e087c41958cc84d27bc323353248aae5 /protocols/SkypeWeb/src | |
parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) |
DWORD -> uint32_t
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/requests/history.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 4 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_db.cpp | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.h | 2 |
9 files changed, 18 insertions, 18 deletions
diff --git a/protocols/SkypeWeb/src/requests/history.h b/protocols/SkypeWeb/src/requests/history.h index d6a6726dc2..e9198344d8 100644 --- a/protocols/SkypeWeb/src/requests/history.h +++ b/protocols/SkypeWeb/src/requests/history.h @@ -35,7 +35,7 @@ struct SyncHistoryFirstRequest : public AsyncHttpRequest struct GetHistoryRequest : public AsyncHttpRequest
{
- GetHistoryRequest(const char *username, int pageSize, DWORD timestamp, bool bOperative) :
+ GetHistoryRequest(const char *username, int pageSize, uint32_t timestamp, bool bOperative) :
AsyncHttpRequest(REQUEST_GET, HOST_DEFAULT, 0, &CSkypeProto::OnGetServerHistory)
{
m_szUrl.AppendFormat("/users/ME/conversations/%s/messages", mir_urlEncode(username).c_str());
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h index 260ace590f..8d5230525d 100644 --- a/protocols/SkypeWeb/src/requests/messages.h +++ b/protocols/SkypeWeb/src/requests/messages.h @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. struct SendMessageParam
{
MCONTACT hContact;
- DWORD hMessage;
+ uint32_t hMessage;
};
struct SendMessageRequest : public AsyncHttpRequest
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 24135327e2..14e17d1e2e 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -41,9 +41,9 @@ void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus) MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent)
{
- DWORD body[3];
+ uint32_t body[3];
DBEVENTINFO dbei = {};
- dbei.cbBlob = sizeof(DWORD) * 2;
+ dbei.cbBlob = sizeof(uint32_t) * 2;
dbei.pBlob = (uint8_t*)&body;
if (db_event_get(hEvent, &dbei))
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index 9e3b013a20..d7a4847cbe 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" -struct { int type; char *name; DWORD flags; } g_SkypeDBTypes[] = +struct { int type; char *name; uint32_t flags; } g_SkypeDBTypes[] = { { SKYPE_DB_EVENT_TYPE_INCOMING_CALL, LPGEN("Incoming call"), DETF_NONOTIFY }, { SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE, LPGEN("Edited message"), 0 }, @@ -38,7 +38,7 @@ MEVENT CSkypeProto::GetMessageFromDb(const char *messageId) return db_event_getById(m_szModuleName, messageId); } -MEVENT CSkypeProto::AddDbEvent(uint16_t type, MCONTACT hContact, DWORD timestamp, DWORD flags, const CMStringW &content, const CMStringA &msgId) +MEVENT CSkypeProto::AddDbEvent(uint16_t type, MCONTACT hContact, uint32_t timestamp, uint32_t flags, const CMStringW &content, const CMStringA &msgId) { if (MEVENT hDbEvent = GetMessageFromDb(msgId)) return hDbEvent; @@ -48,7 +48,7 @@ MEVENT CSkypeProto::AddDbEvent(uint16_t type, MCONTACT hContact, DWORD timestamp dbei.szModule = m_szModuleName; dbei.timestamp = timestamp; dbei.eventType = type; - dbei.cbBlob = (DWORD)mir_strlen(szMsg) + 1; + dbei.cbBlob = (uint32_t)mir_strlen(szMsg) + 1; dbei.pBlob = (uint8_t *)szMsg; dbei.flags = flags; dbei.szId = msgId; diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index f7133ff8c7..eca9db3d13 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -34,7 +34,7 @@ void CSkypeProto::OnGetServerHistory(NETLIBHTTPREQUEST *response, AsyncHttpReque bool markAllAsUnread = getBool("MarkMesUnread", true);
bool bUseLocalTime = !bUseServerTime && pRequest->pUserInfo != 0;
- DWORD lastMsgTime = 0;
+ uint32_t lastMsgTime = 0;
time_t iLocalTime = time(0);
for (int i = (int)conversations.size(); i >= 0; i--) {
@@ -57,7 +57,7 @@ void CSkypeProto::OnGetServerHistory(NETLIBHTTPREQUEST *response, AsyncHttpReque bool isEdited = message["skypeeditedid"];
- DWORD id = message["id"].as_int();
+ uint32_t id = message["id"].as_int();
if (id > lastMsgTime)
lastMsgTime = id;
@@ -65,7 +65,7 @@ void CSkypeProto::OnGetServerHistory(NETLIBHTTPREQUEST *response, AsyncHttpReque timestamp = iLocalTime;
if (userType == 8 || userType == 2) {
- DWORD iFlags = DBEF_UTF;
+ uint32_t iFlags = DBEF_UTF;
if (!markAllAsUnread)
iFlags |= DBEF_READ;
@@ -169,7 +169,7 @@ void CSkypeProto::OnSyncHistory(NETLIBHTTPREQUEST *response, AsyncHttpRequest*) MCONTACT hContact = FindContact(szSkypename);
if (hContact != NULL) {
- DWORD lastMsgTime = getDword(hContact, "LastMsgTime", 0);
+ uint32_t lastMsgTime = getDword(hContact, "LastMsgTime", 0);
if (lastMsgTime && lastMsgTime < composeTime)
PushRequest(new GetHistoryRequest(szSkypename, 100, lastMsgTime, true));
}
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 61cba82d86..1e5ca2f404 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -219,20 +219,20 @@ void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const if (nCount) {
PROTORECVEVENT pre = {};
- pre.timestamp = (DWORD)timestamp;
+ pre.timestamp = (uint32_t)timestamp;
pre.szMessage = (char*)psr;
- uint8_t *b = (uint8_t*)mir_calloc(sizeof(DWORD) + mir_strlen(szMessageId) + 1);
+ uint8_t *b = (uint8_t*)mir_calloc(sizeof(uint32_t) + mir_strlen(szMessageId) + 1);
uint8_t *pCur = b;
*((PDWORD)pCur) = nCount;
- pCur += sizeof(DWORD);
+ pCur += sizeof(uint32_t);
mir_strcpy((char*)pCur, szMessageId);
pre.lParam = (LPARAM)b;
ProtoChainRecv(hContact, PSR_CONTACTS, 0, (LPARAM)&pre);
- for (DWORD i = 0; i < *((PDWORD)b); i++) {
+ for (uint32_t i = 0; i < *((PDWORD)b); i++) {
mir_free(psr[i]->id.a);
mir_free(psr[i]);
}
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index fc4682bc1b..c2f3ab9294 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -315,7 +315,7 @@ int CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre) //if (GetMessageFromDb(hContact, szMessageId, pre->timestamp)) return 0; - DWORD cbBlob = 0; + uint32_t cbBlob = 0; 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)); diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 8720fa7a46..a38cfd474b 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -266,7 +266,7 @@ private: std::map<ULONGLONG, HANDLE> m_mpOutMessagesIds;
MEVENT GetMessageFromDb(const char *messageId);
- MEVENT AddDbEvent(uint16_t type, MCONTACT hContact, DWORD timestamp, DWORD flags, const CMStringW &content, const CMStringA &msgId);
+ MEVENT AddDbEvent(uint16_t type, MCONTACT hContact, uint32_t timestamp, uint32_t flags, const CMStringW &content, const CMStringA &msgId);
void EditEvent(MCONTACT hContact, MEVENT hEvent, const CMStringW &content, time_t edit_time);
int OnSendMessage(MCONTACT hContact, int flags, const char *message);
diff --git a/protocols/SkypeWeb/src/skype_utils.h b/protocols/SkypeWeb/src/skype_utils.h index 12cdcc2800..c16bcf1fac 100644 --- a/protocols/SkypeWeb/src/skype_utils.h +++ b/protocols/SkypeWeb/src/skype_utils.h @@ -36,7 +36,7 @@ public: __inline explicit EventHandle(HANDLE hEvent) : _hEvent(hEvent) {}
__inline ~EventHandle() { CloseHandle(_hEvent); }
__inline void Set() { SetEvent(_hEvent); }
- __inline void Wait(DWORD dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ __inline void Wait(uint32_t dwMilliseconds = INFINITE) { WaitForSingleObject(_hEvent, dwMilliseconds); }
__inline operator HANDLE() { return _hEvent; }
};
|