diff options
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 18 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_feed.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.h | 14 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index be9757d681..d61ac9e414 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -120,7 +120,7 @@ char* ExpUrlEncode(const char *szUrl, bool strict) void CVkProto::ClearAccessToken()
{
debugLogA("CVkProto::ClearAccessToken");
- setDword("LastAccessTokenTime", (DWORD)time(0));
+ setDword("LastAccessTokenTime", (uint32_t)time(0));
m_szAccessToken = nullptr;
delSetting("AccessToken");
ShutdownSession();
@@ -573,7 +573,7 @@ bool CVkProto::AddAuthContactLater(MCONTACT hContact) || getBool(hContact, "friend"))
return false;
- setDword(hContact, "ReqAuthTime", (DWORD)time(0));
+ setDword(hContact, "ReqAuthTime", (uint32_t)time(0));
return true;
}
@@ -605,7 +605,7 @@ void CVkProto::DBAddAuthRequest(const MCONTACT hContact, bool added) DBEVENTINFO dbei = {};
dbei.szModule = m_szModuleName;
- dbei.timestamp = (DWORD)time(0);
+ dbei.timestamp = (uint32_t)time(0);
dbei.flags = DBEF_UTF;
dbei.eventType = added ? EVENTTYPE_ADDED : EVENTTYPE_AUTHREQUEST;
dbei.cbBlob = blob.size();
@@ -620,9 +620,9 @@ MCONTACT CVkProto::MContactFromDbEvent(MEVENT hDbEvent) if (!hDbEvent || !IsOnline())
return INVALID_CONTACT_ID;
- DWORD body[2];
+ uint32_t body[2];
DBEVENTINFO dbei = {};
- dbei.cbBlob = sizeof(DWORD) * 2;
+ dbei.cbBlob = sizeof(uint32_t) * 2;
dbei.pBlob = (uint8_t*)&body;
if (db_event_get(hDbEvent, &dbei))
@@ -1577,8 +1577,8 @@ void CVkProto::SetInvisible(MCONTACT hContact) debugLogA("CVkProto::SetInvisible %d set ID_STATUS_INVISIBLE", getDword(hContact, "ID", VK_INVALID_USER));
}
time_t now = time(0);
- db_set_dw(hContact, "BuddyExpectator", "LastSeen", (DWORD)now);
- setDword(hContact, "InvisibleTS", (DWORD)now);
+ db_set_dw(hContact, "BuddyExpectator", "LastSeen", (uint32_t)now);
+ setDword(hContact, "InvisibleTS", (uint32_t)now);
}
CMStringW CVkProto::RemoveBBC(CMStringW& wszSrc)
@@ -1678,7 +1678,7 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) FreeImage_SaveToMemory(FIF_PNG, dib, hMem, 0);
uint8_t *buf = nullptr;
- DWORD bufLen;
+ uint32_t bufLen;
FreeImage_AcquireMemory(hMem, &buf, &bufLen);
ptrA base64(mir_base64_encode(buf, bufLen));
FreeImage_CloseMemory(hMem);
@@ -1721,7 +1721,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType) dbei.timestamp = time(0);
dbei.eventType = VK_USER_DEACTIVATE_ACTION;
ptrA pszDescription(mir_utf8encode(vkDeactivateEvent[iDEIdx].szDescription));
- dbei.cbBlob = (DWORD)mir_strlen(pszDescription) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(pszDescription) + 1;
dbei.pBlob = (uint8_t*)mir_strdup(pszDescription);
dbei.flags = DBEF_UTF | (
(
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index 742ec115bc..291b765eeb 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -620,7 +620,7 @@ void CVkProto::RetrieveUnreadNews(time_t tLastNewsTime) << CHAR_PARAM("filters", szFilter)
<< CHAR_PARAM("source_ids", szSource));
- setDword("LastNewsReqTime", (DWORD)time(0));
+ setDword("LastNewsReqTime", (uint32_t)time(0));
}
static int sttCompareVKNewsItems(const CVKNewsItem *p1, const CVKNewsItem *p2)
@@ -711,7 +711,7 @@ void CVkProto::RetrieveUnreadNotifications(time_t tLastNotificationsTime) << WCHAR_PARAM("code", code)
);
- setDword("LastNotificationsReqTime", (DWORD)time(0));
+ setDword("LastNotificationsReqTime", (uint32_t)time(0));
}
bool CVkProto::FilterNotification(CVKNewsItem* vkNotificationItem, bool& isCommented)
diff --git a/protocols/VKontakte/src/vk_struct.h b/protocols/VKontakte/src/vk_struct.h index de0b732404..994b82cf2f 100644 --- a/protocols/VKontakte/src/vk_struct.h +++ b/protocols/VKontakte/src/vk_struct.h @@ -308,13 +308,13 @@ struct CVKOptions { CMOption<uint8_t> bShowProtoMenuItem5;
CMOption<uint8_t> bShowProtoMenuItem6;
- CMOption<DWORD> iReqAuthTimeLater;
- CMOption<DWORD> iNewsInterval;
- CMOption<DWORD> iNotificationsInterval;
- CMOption<DWORD> iNewsAutoClearHistoryInterval;
- CMOption<DWORD> iInvisibleInterval;
- CMOption<DWORD> iMaxFriendsCount;
- CMOption<DWORD> iStickerSize;
+ CMOption<uint32_t> iReqAuthTimeLater;
+ CMOption<uint32_t> iNewsInterval;
+ CMOption<uint32_t> iNotificationsInterval;
+ CMOption<uint32_t> iNewsAutoClearHistoryInterval;
+ CMOption<uint32_t> iInvisibleInterval;
+ CMOption<uint32_t> iMaxFriendsCount;
+ CMOption<uint32_t> iStickerSize;
CMOption<wchar_t*> pwszDefaultGroup;
CMOption<wchar_t*> pwszVKLang;
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 7d6f93550b..ccf747781d 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -502,7 +502,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, VKContactTy int iLastSeen = jnLastSeen["time"].as_int();
int iOldLastSeen = db_get_dw(hContact, "BuddyExpectator", "LastSeen");
if (iLastSeen && iLastSeen > iOldLastSeen) {
- db_set_dw(hContact, "BuddyExpectator", "LastSeen", (DWORD)iLastSeen);
+ db_set_dw(hContact, "BuddyExpectator", "LastSeen", (uint32_t)iLastSeen);
db_set_w(hContact, "BuddyExpectator", "LastStatus", ID_STATUS_ONLINE);
}
}
@@ -511,7 +511,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, VKContactTy setWord(hContact, "Status", iNewStatus);
if (iNewStatus == ID_STATUS_ONLINE) {
- db_set_dw(hContact, "BuddyExpectator", "LastSeen", (DWORD)time(0));
+ db_set_dw(hContact, "BuddyExpectator", "LastSeen", (uint32_t)time(0));
db_set_dw(hContact, "BuddyExpectator", "LastStatus", ID_STATUS_ONLINE);
int online_app = _wtoi(jnItem["online_app"].as_mstring());
|