diff options
Diffstat (limited to 'protocols/JabberG/src')
33 files changed, 131 insertions, 131 deletions
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index aabf62e222..90be2f0c9e 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -35,7 +35,7 @@ INT_PTR __cdecl CJabberProto::JabberGetApi(WPARAM, LPARAM lParam) return 0;
}
-DWORD CJabberProto::GetFlags() const
+uint32_t CJabberProto::GetFlags() const
{
return JIF_UNICODE;
}
@@ -45,7 +45,7 @@ int CJabberProto::GetVersion() const return 1;
}
-DWORD CJabberProto::GetJabberVersion() const
+uint32_t CJabberProto::GetJabberVersion() const
{
return PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM);
}
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index ddbb71ae94..b582c6bbd1 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -78,7 +78,7 @@ void CJabberProto::OnIqResultGetCollectionList(const TiXmlElement *iqNode, CJabb /////////////////////////////////////////////////////////////////////////////////////////
-static DWORD dwPreviousTimeStamp = -1;
+static uint32_t dwPreviousTimeStamp = -1;
static MCONTACT hPreviousContact = INVALID_CONTACT_ID;
static MEVENT hPreviousDbEvent = 0;
@@ -92,7 +92,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) DBEVENTINFO dbeiExisting = {};
db_event_get(hExistingDbEvent, &dbeiExisting);
- DWORD dwEventTimeStamp = dbeiExisting.timestamp;
+ uint32_t dwEventTimeStamp = dbeiExisting.timestamp;
// compare with last timestamp
if (dbei.timestamp > dwEventTimeStamp) {
@@ -255,7 +255,7 @@ void CJabberProto::OnIqResultGetCollection(const TiXmlElement *iqNode, CJabberIq DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.szModule = m_szModuleName;
- dbei.cbBlob = (DWORD)mir_strlen(tszBody) + 1;
+ dbei.cbBlob = (uint32_t)mir_strlen(tszBody) + 1;
dbei.flags = DBEF_READ + DBEF_UTF + from;
dbei.pBlob = (uint8_t*)tszBody;
dbei.timestamp = tmStart + atol(tszSecs);
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index c9c9088aca..dd51482694 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -82,7 +82,7 @@ void CJabberProto::IqResultProxyDiscovery(const TiXmlElement *iqNode, CJabberIqI SetEvent(jbt->hProxyEvent);
}
-void JabberByteSendConnection(HNETLIBCONN hConn, DWORD /*dwRemoteIP*/, void* extra)
+void JabberByteSendConnection(HNETLIBCONN hConn, uint32_t /*dwRemoteIP*/, void* extra)
{
CJabberProto *ppro = (CJabberProto*)extra;
JABBER_BYTE_TRANSFER *jbt;
@@ -365,7 +365,7 @@ int CJabberProto::ByteSendParse(HNETLIBCONN hConn, JABBER_BYTE_TRANSFER *jbt, ch // 03-03 address type (1=IPv4 address)
// 04-07 bnd.addr server bound address
// 08-09 bnd.port server bound port
- if (datalen == 47 && *((DWORD*)buffer) == 0x03000105 && buffer[4] == 40 && *((uint16_t*)(buffer + 45)) == 0) {
+ if (datalen == 47 && *((uint32_t*)buffer) == 0x03000105 && buffer[4] == 40 && *((uint16_t*)(buffer + 45)) == 0) {
ptrA szInitiatorJid(JabberPrepareJid(jbt->srcJID));
ptrA szTargetJid(JabberPrepareJid(jbt->dstJID));
CMStringA szAuthString(FORMAT, "%s%s%s", jbt->sid, szInitiatorJid.get(), szTargetJid.get());
@@ -499,7 +499,7 @@ int CJabberProto::ByteSendProxyParse(HNETLIBCONN hConn, JABBER_BYTE_TRANSFER *jb if (datalen == 2 && buffer[0] == 5 && buffer[1] == 0) {
uint8_t data[47];
memset(data, 0, sizeof(data));
- *((DWORD*)data) = 0x03000105;
+ *((uint32_t*)data) = 0x03000105;
data[4] = 40;
char szAuthString[256];
@@ -686,7 +686,7 @@ int CJabberProto::ByteReceiveParse(HNETLIBCONN hConn, JABBER_BYTE_TRANSFER *jbt, if (datalen == 2 && buffer[0] == 5 && buffer[1] == 0) {
uint8_t data[47];
memset(data, 0, sizeof(data));
- *((DWORD*)data) = 0x03000105;
+ *((uint32_t*)data) = 0x03000105;
data[4] = 40;
CMStringA szAuthString(FORMAT, "%s%s%s", jbt->sid, ptrA(JabberPrepareJid(jbt->srcJID)).get(), ptrA(JabberPrepareJid(jbt->dstJID)).get());
diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index ce3303d2bf..e0fc72d37c 100755 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -268,7 +268,7 @@ class CJabberClientPartialCaps ptrA m_szHash, m_szOs, m_szOsVer, m_szSoft, m_szSoftVer, m_szSoftMir;
JabberCapsBits m_jcbCaps = JABBER_RESOURCE_CAPS_UNINIT;
int m_nIqId = -1, m_iTime;
- DWORD m_dwRequestTime = 0;
+ uint32_t m_dwRequestTime = 0;
class CJabberClientCaps *m_parent;
CJabberClientPartialCaps *m_pNext = nullptr;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 8f1cbf7b50..9c3df7a564 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -336,7 +336,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, const TiXmlElement * /////////////////////////////////////////////////////////////////////////////////////////
// Context menu hooks
-static gc_item *sttFindGcMenuItem(int nItems, gc_item *items, DWORD id)
+static gc_item *sttFindGcMenuItem(int nItems, gc_item *items, uint32_t id)
{
for (int i = 0; i < nItems; i++)
if (items[i].dwID == id)
@@ -345,27 +345,27 @@ static gc_item *sttFindGcMenuItem(int nItems, gc_item *items, DWORD id) return nullptr;
}
-static void sttSetupGcMenuItem(int nItems, gc_item *items, DWORD id, bool disabled)
+static void sttSetupGcMenuItem(int nItems, gc_item *items, uint32_t id, bool disabled)
{
for (int i = 0; i < nItems; i++)
if (!id || (items[i].dwID == id))
items[i].bDisabled = disabled;
}
-static void sttShowGcMenuItem(int nItems, gc_item *items, DWORD id, int type)
+static void sttShowGcMenuItem(int nItems, gc_item *items, uint32_t id, int type)
{
for (int i = 0; i < nItems; i++)
if (!id || (items[i].dwID == id))
items[i].uType = type;
}
-static void sttSetupGcMenuItems(int nItems, gc_item *items, DWORD *ids, bool disabled)
+static void sttSetupGcMenuItems(int nItems, gc_item *items, uint32_t *ids, bool disabled)
{
for (; *ids; ++ids)
sttSetupGcMenuItem(nItems, items, *ids, disabled);
}
-static void sttShowGcMenuItems(int nItems, gc_item *items, DWORD *ids, int type)
+static void sttShowGcMenuItems(int nItems, gc_item *items, uint32_t *ids, int type)
{
for (; *ids; ++ids)
sttShowGcMenuItem(nItems, items, *ids, type);
@@ -492,9 +492,9 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) if (gcmi->Type == MENU_ON_LOG) {
static wchar_t url_buf[1024] = { 0 };
- static DWORD sttModeratorItems[] = { IDM_LST_PARTICIPANT, 0 };
- static DWORD sttAdminItems[] = { IDM_LST_MODERATOR, IDM_LST_MEMBER, IDM_LST_ADMIN, IDM_LST_OWNER, IDM_LST_BAN, 0 };
- static DWORD sttOwnerItems[] = { IDM_CONFIG, IDM_DESTROY, 0 };
+ static uint32_t sttModeratorItems[] = { IDM_LST_PARTICIPANT, 0 };
+ static uint32_t sttAdminItems[] = { IDM_LST_MODERATOR, IDM_LST_MEMBER, IDM_LST_ADMIN, IDM_LST_OWNER, IDM_LST_BAN, 0 };
+ static uint32_t sttOwnerItems[] = { IDM_CONFIG, IDM_DESTROY, 0 };
sttSetupGcMenuItem(_countof(sttLogListItems), sttLogListItems, 0, FALSE);
@@ -531,7 +531,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, &g_plugin);
}
else if (gcmi->Type == MENU_ON_NICKLIST) {
- static DWORD sttRJidItems[] = { IDM_RJID_VCARD, IDM_RJID_ADD, IDM_RJID_COPY, 0 };
+ static uint32_t sttRJidItems[] = { IDM_RJID_VCARD, IDM_RJID_ADD, IDM_RJID_COPY, 0 };
if (me && him) {
int i, idx;
@@ -942,7 +942,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* // 1 kick per second, prevents crashes...
enum { BAN_KICK_INTERVAL = 1000 };
- static DWORD dwLastBanKickTime = 0;
+ static uint32_t dwLastBanKickTime = 0;
CMStringW szBuffer, szTitle;
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 31b44d4414..e78dec7564 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -70,9 +70,9 @@ static void sttEmptyBuf(StringBuf *buf); #define RTF_ENDPLAINXML "\\par"
#define RTF_SEPARATOR "\\sl-1\\slmult0\\highlight5\\cf5\\-\\par\\sl0"
-static void sttRtfAppendXml(StringBuf *buf, const TiXmlElement *node, DWORD flags, int indent);
+static void sttRtfAppendXml(StringBuf *buf, const TiXmlElement *node, uint32_t flags, int indent);
-void CJabberProto::OnConsoleProcessXml(const TiXmlElement *node, DWORD flags)
+void CJabberProto::OnConsoleProcessXml(const TiXmlElement *node, uint32_t flags)
{
if (node && m_pDlgConsole) {
if (node->Name()) {
@@ -93,7 +93,7 @@ void CJabberProto::OnConsoleProcessXml(const TiXmlElement *node, DWORD flags) }
}
-bool CJabberProto::RecursiveCheckFilter(const TiXmlElement *node, DWORD flags)
+bool CJabberProto::RecursiveCheckFilter(const TiXmlElement *node, uint32_t flags)
{
for (auto *p = node->FirstAttribute(); p; p = p->Next())
if (JabberStrIStr(Utf2T(p->Value()), m_filterInfo.pattern))
@@ -106,7 +106,7 @@ bool CJabberProto::RecursiveCheckFilter(const TiXmlElement *node, DWORD flags) return false;
}
-bool CJabberProto::FilterXml(const TiXmlElement *node, DWORD flags)
+bool CJabberProto::FilterXml(const TiXmlElement *node, uint32_t flags)
{
if (!m_filterInfo.msg && !mir_strcmp(node->Name(), "message")) return false;
if (!m_filterInfo.presence && !mir_strcmp(node->Name(), "presence")) return false;
@@ -181,7 +181,7 @@ static void sttEmptyBuf(StringBuf *buf) buf->offset = 0;
}
-static void sttRtfAppendXml(StringBuf *buf, const TiXmlElement *node, DWORD flags, int indent)
+static void sttRtfAppendXml(StringBuf *buf, const TiXmlElement *node, uint32_t flags, int indent)
{
char indentLevel[128];
mir_snprintf(indentLevel, RTF_INDENT_FMT, (int)(indent * 200));
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 497cc29483..f212157dec 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -43,11 +43,11 @@ enum #define REFRESH_TIMEOUT 500
#define REFRESH_TIMER 1607
-static DWORD sttLastRefresh = 0;
+static uint32_t sttLastRefresh = 0;
#define AUTODISCO_TIMEOUT 500
#define AUTODISCO_TIMER 1608
-static DWORD sttLastAutoDisco = 0;
+static uint32_t sttLastAutoDisco = 0;
enum { SD_OVERLAY_NONE, SD_OVERLAY_FAIL, SD_OVERLAY_PROGRESS, SD_OVERLAY_REGISTERED };
@@ -509,7 +509,7 @@ struct char *feature;
wchar_t *title;
int action;
- DWORD flags;
+ uint32_t flags;
}
static items[] =
{
diff --git a/protocols/JabberG/src/jabber_disco.h b/protocols/JabberG/src/jabber_disco.h index 9ea232b38c..3397067e58 100644 --- a/protocols/JabberG/src/jabber_disco.h +++ b/protocols/JabberG/src/jabber_disco.h @@ -125,8 +125,8 @@ protected: CJabberSDFeature *m_pFeatures;
CJabberSDNode *m_pNext;
CJabberSDNode *m_pChild;
- DWORD m_dwInfoRequestTime;
- DWORD m_dwItemsRequestTime;
+ uint32_t m_dwInfoRequestTime;
+ uint32_t m_dwItemsRequestTime;
int m_nInfoRequestId;
int m_nItemsRequestId;
HTREELISTITEM m_hTreeItem;
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 539f015e2c..1c91717c3d 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -170,7 +170,7 @@ int CJabberProto::FileReceiveParse(filetransfer *ft, char* buffer, int datalen) return num;
}
-void JabberFileServerConnection(HNETLIBCONN hConnection, DWORD /*dwRemoteIP*/, void* extra)
+void JabberFileServerConnection(HNETLIBCONN hConnection, uint32_t /*dwRemoteIP*/, void* extra)
{
CJabberProto *ppro = (CJabberProto*)extra;
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 94277cede3..b6a5fe55c7 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -358,7 +358,7 @@ static void JabberFormAddListItem(TJabberFormControlInfo *item, const char *text {
Utf2T wszText(text);
- DWORD dwIndex;
+ uint32_t dwIndex;
switch (item->type) {
case JFORM_CTYPE_LIST_MULTI:
dwIndex = SendMessage(item->hCtrl, LB_ADDSTRING, 0, wszText);
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index daf69dac02..1eb828b754 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -353,7 +353,7 @@ bool CJabberProto::FtIbbSend(int blocksize, filetransfer *ft) return false;
}
- ft->jibb->dwTransferredSize += (DWORD)numRead;
+ ft->jibb->dwTransferredSize += (uint32_t)numRead;
ft->std.currentFileProgress += numRead;
ft->std.totalProgress += numRead;
ProtoBroadcastAck(ft->std.hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->std);
@@ -781,7 +781,7 @@ bool CJabberProto::FtTryInlineFile(filetransfer *ft) CMStringW wszFileName(FORMAT, L"%s\\%S%s", wszTempPath.get(), szHash, ProtoGetAvatarExtension(fileFormat));
if (_waccess(wszFileName, 0))
if (!CopyFileW(ft->std.szCurrentFile.w, wszFileName, FALSE)) {
- DWORD dwError = GetLastError();
+ uint32_t dwError = GetLastError();
debugLogW(L"File <%s> cannot be copied to <%s>: error %d", ft->std.szCurrentFile.w, wszFileName.c_str(), dwError);
return false;
}
diff --git a/protocols/JabberG/src/jabber_ibb.cpp b/protocols/JabberG/src/jabber_ibb.cpp index 3fefc2f186..8aa42dd62c 100644 --- a/protocols/JabberG/src/jabber_ibb.cpp +++ b/protocols/JabberG/src/jabber_ibb.cpp @@ -186,6 +186,6 @@ bool CJabberProto::OnIbbRecvdData(const char *data, const char *sid, const char return false;
(this->*item->jibb->pfnRecv)(nullptr, item->ft, decodedData, (int)length);
- item->jibb->dwTransferredSize += (DWORD)length;
+ item->jibb->dwTransferredSize += (uint32_t)length;
return true;
}
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index 77c71e282c..aa31b3767c 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -325,7 +325,7 @@ CJabberIqInfo* CJabberIqManager::DetachInfo(void *pUserData) CJabberIqInfo* CJabberIqManager::DetachExpired()
{
- DWORD dwCurrentTime = GetTickCount();
+ uint32_t dwCurrentTime = GetTickCount();
mir_cslock lck(m_cs);
@@ -341,7 +341,7 @@ CJabberIqInfo* CJabberIqManager::DetachExpired() CJabberIqPermanentInfo* CJabberIqManager::AddPermanentHandler(
JABBER_PERMANENT_IQ_HANDLER pHandler,
int nIqTypes,
- DWORD dwParamsToParse,
+ uint32_t dwParamsToParse,
const char *szXmlns,
BOOL bAllowPartialNs,
const char *szTag,
diff --git a/protocols/JabberG/src/jabber_iq.h b/protocols/JabberG/src/jabber_iq.h index fcc4a042da..b352a81d81 100644 --- a/protocols/JabberG/src/jabber_iq.h +++ b/protocols/JabberG/src/jabber_iq.h @@ -56,9 +56,9 @@ protected: JABBER_IQ_HANDLER m_pHandler;
int m_nIqId;
- DWORD m_dwParamsToParse;
- DWORD m_dwRequestTime;
- DWORD m_dwTimeout;
+ uint32_t m_dwParamsToParse;
+ uint32_t m_dwRequestTime;
+ uint32_t m_dwTimeout;
char* m_szReceiver;
int m_iPriority;
void* m_pUserData;
@@ -80,11 +80,11 @@ public: }
__forceinline void SetReceiver(const char *szReceiver) { replaceStr(m_szReceiver, szReceiver); }
- __forceinline void SetParamsToParse(DWORD dwParamsToParse) { m_dwParamsToParse = dwParamsToParse; }
- __forceinline void SetTimeout(DWORD dwTimeout) { m_dwTimeout = dwTimeout; }
+ __forceinline void SetParamsToParse(uint32_t dwParamsToParse) { m_dwParamsToParse = dwParamsToParse; }
+ __forceinline void SetTimeout(uint32_t dwTimeout) { m_dwTimeout = dwTimeout; }
__forceinline int GetIqId() const { return m_nIqId; }
- __forceinline DWORD GetRequestTime() const { return m_dwRequestTime; }
+ __forceinline uint32_t GetRequestTime() const { return m_dwRequestTime; }
__forceinline int GetIqType() const { return m_nIqType; }
__forceinline void* GetUserData() const { return m_pUserData; }
__forceinline const char* GetFrom() const { return m_szFrom; }
@@ -114,7 +114,7 @@ class CJabberIqPermanentInfo : public MZeroedObject friend class CJabberIqManager;
JABBER_PERMANENT_IQ_HANDLER m_pHandler;
- DWORD m_dwParamsToParse;
+ uint32_t m_dwParamsToParse;
int m_nIqTypes;
char *m_szXmlns;
char *m_szTag;
@@ -141,7 +141,7 @@ protected: CJabberProto *ppro;
mir_cs m_cs;
- DWORD m_dwLastUsedHandle = 0;
+ uint32_t m_dwLastUsedHandle = 0;
LIST<CJabberIqInfo> m_arIqs;
OBJLIST<CJabberIqPermanentInfo> m_arHandlers;
@@ -159,7 +159,7 @@ public: // fucking params, maybe just return CJabberIqRequestInfo pointer ?
CJabberIqInfo* AddHandler(JABBER_IQ_HANDLER pHandler, int nIqType, const char *szReceiver, void *pUserData, int iPriority);
- CJabberIqPermanentInfo* AddPermanentHandler(JABBER_PERMANENT_IQ_HANDLER pHandler, int nIqTypes, DWORD dwParamsToParse, const char *szXmlns, BOOL bAllowPartialNs, const char *szTag, void *pUserData = nullptr, IQ_USER_DATA_FREE_FUNC pUserDataFree = nullptr, int iPriority = JH_PRIORITY_DEFAULT);
+ CJabberIqPermanentInfo* AddPermanentHandler(JABBER_PERMANENT_IQ_HANDLER pHandler, int nIqTypes, uint32_t dwParamsToParse, const char *szXmlns, BOOL bAllowPartialNs, const char *szTag, void *pUserData = nullptr, IQ_USER_DATA_FREE_FUNC pUserDataFree = nullptr, int iPriority = JH_PRIORITY_DEFAULT);
// returns TRUE when pInfo found, or FALSE otherwise
bool DeletePermanentHandler(CJabberIqPermanentInfo *pInfo);
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index cef7f3a195..4bd9860af3 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -74,7 +74,7 @@ int GetGMTOffset(void) TIME_ZONE_INFORMATION tzinfo;
int nOffset = 0;
- DWORD dwResult = GetTimeZoneInformation(&tzinfo);
+ uint32_t dwResult = GetTimeZoneInformation(&tzinfo);
switch (dwResult) {
case TIME_ZONE_ID_STANDARD:
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 07931a08ad..553b659a5e 100755 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -124,14 +124,14 @@ void CJabberProto::OnIqResultNotes(const TiXmlElement *iqNode, CJabberIqInfo *pI m_notes.LoadXml(storage);
}
-void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq)
+void CJabberProto::OnProcessLoginRq(ThreadData *info, uint32_t rq)
{
if (info == nullptr)
return;
info->dwLoginRqs |= rq;
- DWORD dwMask = JABBER_LOGIN_ROSTER | JABBER_LOGIN_BOOKMARKS | JABBER_LOGIN_SERVERINFO;
+ uint32_t dwMask = JABBER_LOGIN_ROSTER | JABBER_LOGIN_BOOKMARKS | JABBER_LOGIN_SERVERINFO;
if ((info->dwLoginRqs & dwMask) == dwMask && !(info->dwLoginRqs & JABBER_LOGIN_BOOKMARKS_AJ)) {
if (info->jabberServerCaps & JABBER_CAPS_ARCHIVE_AUTO)
EnableArchive(m_bEnableMsgArchive != 0);
@@ -531,7 +531,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(const TiXmlElement *n, MCONTACT hCont debugLogA("Writing %d bytes", bufferLen);
DWORD nWritten;
- bool bRes = WriteFile(hFile, buffer, (DWORD)bufferLen, &nWritten, nullptr) != 0;
+ bool bRes = WriteFile(hFile, buffer, (uint32_t)bufferLen, &nWritten, nullptr) != 0;
CloseHandle(hFile);
if (!bRes)
return;
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index 05d65fdb23..dca8f305a4 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -104,7 +104,7 @@ public: // XEP-0115 support
CJabberClientPartialCaps *m_pCaps;
ptrA m_tszCapsExt;
- DWORD m_dwDiscoInfoRequestTime;
+ uint32_t m_dwDiscoInfoRequestTime;
JabberCapsBits m_jcbCachedCaps;
JabberCapsBits m_jcbManualDiscoveredCaps;
@@ -185,7 +185,7 @@ struct JABBER_LIST_ITEM : public MZeroedObject HWND hwndGcListAdmin;
HWND hwndGcListOwner;
int iChatState;
- DWORD dwChatInitTime;
+ uint32_t dwChatInitTime;
// LIST_FILE
// jid = string representation of port number
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index 40f14c5d5a..0eed38b981 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -110,7 +110,7 @@ bool CJabberMessageManager::HandleMessagePermanent(const TiXmlElement *node, Thr CJabberMessagePermanentInfo* CJabberMessageManager::AddPermanentHandler(
JABBER_PERMANENT_MESSAGE_HANDLER pHandler,
int nMessageTypes,
- DWORD dwParamsToParse,
+ uint32_t dwParamsToParse,
const char *szXmlns,
BOOL bAllowPartialNs,
const char *szTag,
diff --git a/protocols/JabberG/src/jabber_message_manager.h b/protocols/JabberG/src/jabber_message_manager.h index ebea3fab85..71e0ed1d9a 100644 --- a/protocols/JabberG/src/jabber_message_manager.h +++ b/protocols/JabberG/src/jabber_message_manager.h @@ -93,7 +93,7 @@ class CJabberMessagePermanentInfo : public MZeroedObject friend class CJabberMessageManager;
JABBER_PERMANENT_MESSAGE_HANDLER m_pHandler;
- DWORD m_dwParamsToParse;
+ uint32_t m_dwParamsToParse;
int m_nMessageTypes;
char *m_szXmlns;
char *m_szTag;
@@ -125,7 +125,7 @@ public: CJabberMessageManager(CJabberProto *proto);
~CJabberMessageManager();
- CJabberMessagePermanentInfo* AddPermanentHandler(JABBER_PERMANENT_MESSAGE_HANDLER pHandler, int nMessageTypes, DWORD dwParamsToParse, const char *szXmlns, BOOL bAllowPartialNs, const char *szTag, void *pUserData = nullptr, MESSAGE_USER_DATA_FREE_FUNC pUserDataFree = nullptr, int iPriority = JH_PRIORITY_DEFAULT);
+ CJabberMessagePermanentInfo* AddPermanentHandler(JABBER_PERMANENT_MESSAGE_HANDLER pHandler, int nMessageTypes, uint32_t dwParamsToParse, const char *szXmlns, BOOL bAllowPartialNs, const char *szTag, void *pUserData = nullptr, MESSAGE_USER_DATA_FREE_FUNC pUserDataFree = nullptr, int iPriority = JH_PRIORITY_DEFAULT);
bool DeletePermanentHandler(CJabberMessagePermanentInfo *pInfo);
bool HandleMessagePermanent(const TiXmlElement *node, ThreadData *pThreadData);
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 692510e09b..a5a42d922f 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -53,7 +53,7 @@ void CJabberProto::DBAddAuthRequest(const char *jid, const char *nick) DB::AUTH_BLOB blob(hContact, nick, nullptr, nullptr, jid, nullptr);
PROTORECVEVENT pre = {};
- pre.timestamp = (DWORD)time(0);
+ pre.timestamp = (uint32_t)time(0);
pre.lParam = blob.size();
pre.szMessage = blob;
ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
@@ -468,7 +468,7 @@ static bool SaveBlobToFile(const wchar_t *pwszFileName, const CMStringA &body) DWORD n;
size_t bufferLen;
ptrA buffer((char *)mir_base64_decode(body, &bufferLen));
- WriteFile(h, buffer, (DWORD)bufferLen, &n, nullptr);
+ WriteFile(h, buffer, (uint32_t)bufferLen, &n, nullptr);
CloseHandle(h);
return true;
}
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp index 8248deddce..fe66654589 100755 --- a/protocols/JabberG/src/jabber_omemo.cpp +++ b/protocols/JabberG/src/jabber_omemo.cpp @@ -1184,7 +1184,7 @@ complete: bool omemo_impl::create_session_store(MCONTACT hContact, const char *device_id)
{
signal_store_backend_user_data *data[4];
- DWORD device_id_int = strtoul(device_id, nullptr, 10);
+ uint32_t device_id_int = strtoul(device_id, nullptr, 10);
for (int i = 0; i < 4; i++) {
data[i] = (signal_store_backend_user_data*)mir_alloc(sizeof(signal_store_backend_user_data));
data[i]->hContact = hContact;
@@ -1243,7 +1243,7 @@ complete: const char *signed_pre_key_public, const char *signed_pre_key_signature, const char *identity_key)
{
// Instantiate a session_builder for a recipient address.
- DWORD dev_id_int = strtoul(dev_id, nullptr, 10);
+ uint32_t dev_id_int = strtoul(dev_id, nullptr, 10);
auto &pSession = sessions[hContact][dev_id_int];
// libsignal does not copy structure, so we must allocate one manually, does it free it on exit ?
@@ -1438,7 +1438,7 @@ void CJabberProto::OmemoHandleMessageQueue() }
}
-DWORD JabberGetLastContactMessageTime(MCONTACT hContact);
+uint32_t JabberGetLastContactMessageTime(MCONTACT hContact);
bool CJabberProto::OmemoHandleMessage(const TiXmlElement *node, const char *jid, time_t msgTime)
{
@@ -1472,7 +1472,7 @@ bool CJabberProto::OmemoHandleMessage(const TiXmlElement *node, const char *jid, debugLogA("Jabber OMEMO: error: failed to get sender device id");
return true;
}
- DWORD sender_dev_id_int = strtoul(sender_dev_id, nullptr, 10);
+ uint32_t sender_dev_id_int = strtoul(sender_dev_id, nullptr, 10);
auto &pSession = m_omemo.sessions[hContact][sender_dev_id_int];
if (!pSession.cipher || !pSession.builder || !pSession.store_context) {
@@ -1481,10 +1481,10 @@ bool CJabberProto::OmemoHandleMessage(const TiXmlElement *node, const char *jid, return false;
}
- DWORD own_id = m_omemo.GetOwnDeviceId();
+ uint32_t own_id = m_omemo.GetOwnDeviceId();
const char *encrypted_key_base64 = nullptr;
for (auto *it : TiXmlFilter(header_node, "key")) {
- DWORD dev_id_int = it->IntAttribute("rid");
+ uint32_t dev_id_int = it->IntAttribute("rid");
if (dev_id_int == own_id) {
encrypted_key_base64 = it->GetText();
break;
@@ -1674,7 +1674,7 @@ bool CJabberProto::OmemoHandleMessage(const TiXmlElement *node, const char *jid, msgTime = now;
PROTORECVEVENT recv = {};
- recv.timestamp = (DWORD)msgTime;
+ recv.timestamp = (uint32_t)msgTime;
recv.szMessage = mir_strdup(out);
ProtoChainRecvMsg(hContact, &recv);
mir_free(out);
@@ -1715,7 +1715,7 @@ void CJabberProto::OmemoHandleDeviceList(const char *from, const TiXmlElement *n setDword(setting_name, current_id);
}
- DWORD val = 0;
+ uint32_t val = 0;
mir_snprintf(setting_name, "OmemoDeviceId%d", i);
val = getDword(setting_name, 0);
while (val) {
@@ -1738,7 +1738,7 @@ void CJabberProto::OmemoHandleDeviceList(const char *from, const TiXmlElement *n }
mir_snprintf(setting_name, "OmemoDeviceId%d", i);
- DWORD val = getDword(hContact, setting_name, 0);
+ uint32_t val = getDword(hContact, setting_name, 0);
while (val) {
delSetting(hContact, setting_name);
i++;
@@ -1756,7 +1756,7 @@ void CJabberProto::OmemoAnnounceDevice() char setting_name[64];
for (int i = 0;; ++i) {
mir_snprintf(setting_name, "OmemoDeviceId%d", i);
- DWORD val = getDword(setting_name);
+ uint32_t val = getDword(setting_name);
if (val == 0)
break;
if (val == own_id)
@@ -1775,7 +1775,7 @@ void CJabberProto::OmemoAnnounceDevice() for (int i = 0; ; ++i) {
mir_snprintf(setting_name, "OmemoDeviceId%d", i);
- DWORD val = getDword(setting_name);
+ uint32_t val = getDword(setting_name);
if (val == 0)
break;
@@ -1805,7 +1805,7 @@ int db_enum_settings_prekeys_cb(const char *szSetting, void *lParam) void CJabberProto::OmemoSendBundle()
{
// get own device id
- DWORD own_id = m_omemo.GetOwnDeviceId();
+ uint32_t own_id = m_omemo.GetOwnDeviceId();
// construct bundle node
char szBareJid[JABBER_MAX_JID_LEN];
@@ -1941,7 +1941,7 @@ void CJabberProto::OmemoOnIqResultGetBundle(const TiXmlElement *iqNode, CJabberI // failed to get bundle, do not try to build session
unsigned int *dev_id = (unsigned int*)pInfo->GetUserData();
char setting_name[64], setting_name2[64];
- DWORD id = 0;
+ uint32_t id = 0;
int i = 0;
mir_snprintf(setting_name, "OmemoDeviceId%d", i);
@@ -2036,7 +2036,7 @@ void CJabberProto::OmemoOnIqResultGetBundle(const TiXmlElement *iqNode, CJabberI unsigned int *dev_id = (unsigned int*)pInfo->GetUserData();
char setting_name[64], setting_name2[64];
- DWORD id = 0;
+ uint32_t id = 0;
int i = 0;
mir_snprintf(setting_name, "OmemoDeviceId%d", i);
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 97a821e275..7943726c07 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "jabber_list.h"
#include "jabber_caps.h"
-static BOOL(WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = nullptr;
+static BOOL(WINAPI *pfnEnableThemeDialogTexture)(HANDLE, uint32_t) = nullptr;
/////////////////////////////////////////////////////////////////////////////////////////
// JabberRegisterDlgProc - the dialog proc for registering new account
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 6559ac437e..a4ebdd1aa9 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -118,11 +118,11 @@ void CJabberProto::OnIqResultPrivacyList(const TiXmlElement *iqNode, CJabberIqIn bAllow = false;
const char *itemOrder = XmlGetAttr(item, "order");
- DWORD dwOrder = 0;
+ uint32_t dwOrder = 0;
if (itemOrder)
dwOrder = atoi(itemOrder);
- DWORD dwPackets = 0;
+ uint32_t dwPackets = 0;
if (XmlFirstChild(item, "message"))
dwPackets |= JABBER_PL_RULE_TYPE_MESSAGE;
if (XmlFirstChild(item, "presence-in"))
@@ -345,7 +345,7 @@ public: m_cbAction.AddString(TranslateT("Allow"));
m_cbAction.SetCurSel(m_pRule->GetAction() ? 1 : 0);
- DWORD dwPackets = m_pRule->GetPackets();
+ uint32_t dwPackets = m_pRule->GetPackets();
if (!dwPackets)
dwPackets = JABBER_PL_RULE_TYPE_ALL;
if (dwPackets & JABBER_PL_RULE_TYPE_IQ)
@@ -390,7 +390,7 @@ public: m_pRule->SetType((PrivacyListRuleType)nItemData);
m_pRule->SetAction(m_cbAction.GetCurSel());
- DWORD dwPackets = 0;
+ uint32_t dwPackets = 0;
if (BST_CHECKED == IsDlgButtonChecked(m_hwnd, IDC_CHECK_MESSAGES))
dwPackets |= JABBER_PL_RULE_TYPE_MESSAGE;
if (BST_CHECKED == IsDlgButtonChecked(m_hwnd, IDC_CHECK_PRESENCE_IN))
@@ -592,7 +592,7 @@ class CJabberDlgPrivacyLists : public CJabberDlgBase CMStringA szPackets;
- DWORD dwPackets = pRule->GetPackets();
+ uint32_t dwPackets = pRule->GetPackets();
if (!dwPackets)
dwPackets = JABBER_PL_RULE_TYPE_ALL;
if (dwPackets == JABBER_PL_RULE_TYPE_ALL)
@@ -895,7 +895,7 @@ class CJabberDlgPrivacyLists : public CJabberDlgBase m_clcClist.SetExtraImage(hItem, i, hide ? EMPTY_EXTRA_ICON : 0);
}
- void CListSetupIcons(HANDLE hItem, int iSlot, DWORD dwProcess, BOOL bAction)
+ void CListSetupIcons(HANDLE hItem, int iSlot, uint32_t dwProcess, BOOL bAction)
{
if (dwProcess && !m_clcClist.GetExtraImage(hItem, iSlot))
m_clcClist.SetExtraImage(hItem, iSlot, iSlot * 2 + (bAction ? 1 : 2));
@@ -977,7 +977,7 @@ class CJabberDlgPrivacyLists : public CJabberDlgBase if (!hItem)
continue;
- DWORD dwPackets = pRule->GetPackets();
+ uint32_t dwPackets = pRule->GetPackets();
if (!dwPackets) dwPackets = JABBER_PL_RULE_TYPE_ALL;
CListSetupIcons(hItem, 0, dwPackets & JABBER_PL_RULE_TYPE_MESSAGE, pRule->GetAction());
CListSetupIcons(hItem, 1, dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN, pRule->GetAction());
@@ -989,9 +989,9 @@ lbl_return: clc_info.bChanged = false;
}
- DWORD CListGetPackets(HANDLE hItem, bool bAction)
+ uint32_t CListGetPackets(HANDLE hItem, bool bAction)
{
- DWORD result = 0;
+ uint32_t result = 0;
int iIcon = m_clcClist.GetExtraImage(hItem, 0);
if (bAction && (iIcon == 1)) result |= JABBER_PL_RULE_TYPE_MESSAGE;
@@ -1019,8 +1019,8 @@ lbl_return: clc_info.bChanged = false;
- DWORD dwOrder = 0;
- DWORD dwPackets = 0;
+ uint32_t dwOrder = 0;
+ uint32_t dwPackets = 0;
pList->RemoveAllRules();
@@ -1844,7 +1844,7 @@ public: else
itemTag << XATTR("action", "deny");
itemTag << XATTRI("order", pRule->GetOrder());
- DWORD dwPackets = pRule->GetPackets();
+ uint32_t dwPackets = pRule->GetPackets();
if (dwPackets != JABBER_PL_RULE_TYPE_ALL) {
if (dwPackets & JABBER_PL_RULE_TYPE_IQ)
itemTag << XCHILD("iq");
@@ -1892,7 +1892,7 @@ public: if (evt->info->iColumn == -1)
return;
- DWORD hitFlags;
+ uint32_t hitFlags;
HANDLE hItem = m_clcClist.HitTest(evt->info->pt.x, evt->info->pt.y, &hitFlags);
if (hItem == nullptr || !(hitFlags & CLCHT_ONITEMEXTRA))
return;
diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h index d2037b2a0b..df65014a88 100644 --- a/protocols/JabberG/src/jabber_privacy.h +++ b/protocols/JabberG/src/jabber_privacy.h @@ -59,7 +59,7 @@ protected: friend class CPrivacyList;
public:
- CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const char *szValue = "", bool bAction = true, DWORD dwOrder = 90, DWORD dwPackets = 0)
+ CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const char *szValue = "", bool bAction = true, uint32_t dwOrder = 90, uint32_t dwPackets = 0)
{
m_proto = ppro;
m_szValue = mir_strdup(szValue);
@@ -85,13 +85,13 @@ public: m_pNext = pNext;
return pRetVal;
}
- __inline DWORD GetOrder()
+ __inline uint32_t GetOrder()
{
return m_dwOrder;
}
- DWORD SetOrder(DWORD dwOrder)
+ uint32_t SetOrder(uint32_t dwOrder)
{
- DWORD dwRetVal = m_dwOrder;
+ uint32_t dwRetVal = m_dwOrder;
m_dwOrder = dwOrder;
return dwRetVal;
}
@@ -111,11 +111,11 @@ public: {
replaceStr(m_szValue, szValue);
}
- __inline DWORD GetPackets()
+ __inline uint32_t GetPackets()
{
return m_dwPackets;
}
- __inline void SetPackets(DWORD dwPackets)
+ __inline void SetPackets(uint32_t dwPackets)
{
m_dwPackets = dwPackets;
}
@@ -134,8 +134,8 @@ protected: PrivacyListRuleType m_nType;
char *m_szValue;
bool m_bAction;
- DWORD m_dwOrder;
- DWORD m_dwPackets;
+ uint32_t m_dwOrder;
+ uint32_t m_dwPackets;
CPrivacyListRule *m_pNext;
};
@@ -194,7 +194,7 @@ public: return pRetVal;
}
- void AddRule(PrivacyListRuleType type, const char *szValue, BOOL bAction, DWORD dwOrder, DWORD dwPackets)
+ void AddRule(PrivacyListRuleType type, const char *szValue, BOOL bAction, uint32_t dwOrder, uint32_t dwPackets)
{
CPrivacyListRule *pRule = new CPrivacyListRule(m_proto, type, szValue, bAction, dwOrder, dwPackets);
pRule->SetNext(m_pRules);
@@ -243,7 +243,7 @@ public: }
// get rules count
- DWORD dwCount = 0;
+ uint32_t dwCount = 0;
CPrivacyListRule *pRule = m_pRules;
while (pRule) {
dwCount++;
@@ -254,7 +254,7 @@ public: CPrivacyListRule **pRules = (CPrivacyListRule **)mir_alloc(dwCount * sizeof(CPrivacyListRule *));
if (!pRules)
return false;
- DWORD dwPos = 0;
+ uint32_t dwPos = 0;
pRule = m_pRules;
while (pRule) {
pRules[dwPos++] = pRule;
@@ -262,7 +262,7 @@ public: }
// sort array of pointers, slow, but working :)
- DWORD i, j;
+ uint32_t i, j;
CPrivacyListRule *pTmp;
for (i=0; i < dwCount; i++) {
for (j = dwCount - 1; j > i; j--) {
@@ -275,7 +275,7 @@ public: }
// reorder linked list
- DWORD dwOrder = 100;
+ uint32_t dwOrder = 100;
CPrivacyListRule **ppPtr = &m_pRules;
for (i=0; i < dwCount; i++) {
*ppPtr = pRules[ i ];
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 9ff764ecdc..411a64998d 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -357,7 +357,7 @@ void CJabberProto::OnShutdown() ////////////////////////////////////////////////////////////////////////////////////////
// JabberAddToList - adds a contact to the contact list
-MCONTACT CJabberProto::AddToListByJID(const char *newJid, DWORD flags)
+MCONTACT CJabberProto::AddToListByJID(const char *newJid, uint32_t flags)
{
debugLogA("AddToListByJID jid = %s", newJid);
@@ -452,7 +452,7 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
- char *nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
+ char *nick = (char*)(dbei.pBlob + sizeof(uint32_t) * 2);
char *firstName = nick + mir_strlen(nick) + 1;
char *lastName = firstName + mir_strlen(firstName) + 1;
char *jid = lastName + mir_strlen(lastName) + 1;
@@ -577,7 +577,7 @@ int CJabberProto::FileResume(HANDLE hTransfer, int, const wchar_t *szFilename) INT_PTR CJabberProto::GetCaps(int type, MCONTACT hContact)
{
- DWORD dwFlags;
+ uint32_t dwFlags;
switch (type) {
case PFLAGNUM_1:
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index b82abb54e4..71a6c498b8 100755 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -236,8 +236,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface CMOption<bool> m_bUseTLS;
CMOption<int> m_iMamMode;
- CMOption<DWORD> m_iConnectionKeepAliveInterval;
- CMOption<DWORD> m_iConnectionKeepAliveTimeout;
+ CMOption<uint32_t> m_iConnectionKeepAliveInterval;
+ CMOption<uint32_t> m_iConnectionKeepAliveTimeout;
PVOID m_sslCtx;
@@ -324,8 +324,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface strm_mgmt m_StrmMgmt;
int m_nSDBrowseMode;
- DWORD m_dwSDLastRefresh;
- DWORD m_dwSDLastAutoDisco;
+ uint32_t m_dwSDLastRefresh;
+ uint32_t m_dwSDLastAutoDisco;
HGENMENU m_hChooseMenuItem;
int m_privacyMenuServiceAllocated;
@@ -454,8 +454,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void ConsoleUninit(void);
- bool FilterXml(const TiXmlElement *node, DWORD flags);
- bool RecursiveCheckFilter(const TiXmlElement *node, DWORD flags);
+ bool FilterXml(const TiXmlElement *node, uint32_t flags);
+ bool RecursiveCheckFilter(const TiXmlElement *node, uint32_t flags);
//---- jabber_disco.cpp --------------------------------------------------------------
@@ -566,7 +566,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnIqResultSetPassword(const TiXmlElement *iqNode, CJabberIqInfo *pInfo);
void OnIqResultSetSearch(const TiXmlElement *iqNode, CJabberIqInfo *pInfo);
void OnIqResultSetVcard(const TiXmlElement *iqNode, CJabberIqInfo *pInfo);
- void OnProcessLoginRq(ThreadData *info, DWORD rq);
+ void OnProcessLoginRq(ThreadData *info, uint32_t rq);
void OnLoggedIn(void);
//---- jabber_iq_handlers.cpp -------------------------------------------------------
@@ -747,7 +747,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void __cdecl GetAwayMsgThread(void* hContact);
void __cdecl SendMessageAckThread(void* hContact);
- MCONTACT AddToListByJID(const char *newJid, DWORD flags);
+ MCONTACT AddToListByJID(const char *newJid, uint32_t flags);
void InfoFrame_OnSetup(CJabberInfoFrame_Event *evt);
void InfoFrame_OnTransport(CJabberInfoFrame_Event *evt);
@@ -892,7 +892,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_xml.c ------------------------------------------------------------------
- void OnConsoleProcessXml(const TiXmlElement *node, DWORD flags);
+ void OnConsoleProcessXml(const TiXmlElement *node, uint32_t flags);
//---- jabber_xmlns.c ----------------------------------------------------------------
@@ -928,7 +928,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface private:
char *m_szXmlStreamToBeInitialized;
- DWORD m_lastTicks;
+ uint32_t m_lastTicks;
HANDLE m_hPopupClass;
@@ -944,9 +944,9 @@ private: JabberFeatCapPairDynamic* FindFeature(const char *szFeature);
public:
- DWORD STDMETHODCALLTYPE GetFlags() const override; // Set of JIF_* flags.
+ uint32_t STDMETHODCALLTYPE GetFlags() const override; // Set of JIF_* flags.
int STDMETHODCALLTYPE GetVersion() const override; // Returns version of IJabberInterface.
- DWORD STDMETHODCALLTYPE GetJabberVersion() const override; // Returns Jabber plugin version.
+ uint32_t STDMETHODCALLTYPE GetJabberVersion() const override; // Returns Jabber plugin version.
MCONTACT STDMETHODCALLTYPE ContactFromJID(const char *jid) override; // Returns contact handle for given JID.
char* STDMETHODCALLTYPE ContactToJID(MCONTACT hContact) override; // Returns JID of hContact. You must free the result using mir_free().
diff --git a/protocols/JabberG/src/jabber_rc.h b/protocols/JabberG/src/jabber_rc.h index d3eb91a051..2563e8998f 100644 --- a/protocols/JabberG/src/jabber_rc.h +++ b/protocols/JabberG/src/jabber_rc.h @@ -44,12 +44,12 @@ class CJabberAdhocSession protected:
CMStringA m_szSessionId;
CJabberAdhocSession* m_pNext = nullptr;
- DWORD m_dwStartTime;
+ uint32_t m_dwStartTime;
void* m_pUserData = nullptr;
BOOL m_bAutofreeUserData;
- DWORD m_dwStage = 0;
+ uint32_t m_dwStage = 0;
public:
CJabberProto *ppro;
@@ -74,7 +74,7 @@ public: return pRetVal;
}
- DWORD GetSessionStartTime()
+ uint32_t GetSessionStartTime()
{
return m_dwStartTime;
}
@@ -92,14 +92,14 @@ public: m_bAutofreeUserData = bAutofree;
}
- DWORD SetStage(DWORD dwStage)
+ uint32_t SetStage(uint32_t dwStage)
{
- DWORD dwRetVal = m_dwStage;
+ uint32_t dwRetVal = m_dwStage;
m_dwStage = dwStage;
return dwRetVal;
}
- DWORD GetStage()
+ uint32_t GetStage()
{
return m_dwStage;
}
@@ -232,7 +232,7 @@ protected: return false;
}
- bool _ExpireSession(DWORD dwExpireTime)
+ bool _ExpireSession(uint32_t dwExpireTime)
{
if (!m_pSessions)
return false;
@@ -299,7 +299,7 @@ public: void ExpireSessions()
{
mir_cslock lck(m_cs);
- DWORD dwExpireTime = GetTickCount() - JABBER_ADHOC_SESSION_EXPIRE_TIME;
+ uint32_t dwExpireTime = GetTickCount() - JABBER_ADHOC_SESSION_EXPIRE_TIME;
while (_ExpireSession(dwExpireTime))
;
}
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index e04321e669..8522b396d7 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -149,7 +149,7 @@ char* TMD5Auth::getChallenge(const char *challenge) const char *realm = pairs["realm"], *nonce = pairs["nonce"];
char cnonce[40], tmpBuf[40];
- DWORD digest[4], hash1[4], hash2[4];
+ uint32_t digest[4], hash1[4], hash2[4];
mir_md5_state_t ctx;
Utils_GetRandom(digest, sizeof(digest));
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 38cb49427c..9735b9eb07 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -971,7 +971,7 @@ void CJabberProto::OnProcessPubsubEvent(const TiXmlElement *node) }
// returns 0, if error or no events
-DWORD JabberGetLastContactMessageTime(MCONTACT hContact)
+uint32_t JabberGetLastContactMessageTime(MCONTACT hContact)
{
// TODO: time cache can improve performance
MEVENT hDbEvent = db_event_last(hContact);
@@ -1404,7 +1404,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) if (bWasSent)
recv.flags |= PREF_SENT;
- recv.timestamp = (DWORD)msgTime;
+ recv.timestamp = (uint32_t)msgTime;
recv.szMessage = szMessage.GetBuffer();
recv.szMsgId = szMsgId;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 4ab95a77e6..a414fbed87 100755 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -69,7 +69,7 @@ enum INFOLINE_LASTACTIVE, }; -__forceinline DWORD sttInfoLineId(DWORD res, DWORD type, DWORD line = 0) +__forceinline uint32_t sttInfoLineId(uint32_t res, uint32_t type, uint32_t line = 0) { return (type << 24) & 0x7f000000 | @@ -274,7 +274,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti } } -static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, MCONTACT hContact, wchar_t *szTitle, char *pszSlot) +static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, uint32_t dwInfoLine, MCONTACT hContact, wchar_t *szTitle, char *pszSlot) { char *szAdvStatusIcon = ppro->ReadAdvStatusA(hContact, pszSlot, ADVSTATUS_VAL_ICON); wchar_t *szAdvStatusTitle = ppro->ReadAdvStatusT(hContact, pszSlot, ADVSTATUS_VAL_TITLE); diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index b8ddd22545..008faa9aff 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -799,8 +799,8 @@ const wchar_t *JabberStrIStr(const wchar_t *str, const wchar_t *substr) wchar_t *str_up = NEWWSTR_ALLOCA(str);
wchar_t *substr_up = NEWWSTR_ALLOCA(substr);
- CharUpperBuff(str_up, (DWORD)mir_wstrlen(str_up));
- CharUpperBuff(substr_up, (DWORD)mir_wstrlen(substr_up));
+ CharUpperBuff(str_up, (uint32_t)mir_wstrlen(str_up));
+ CharUpperBuff(substr_up, (uint32_t)mir_wstrlen(substr_up));
wchar_t *p = wcsstr(str_up, substr_up);
return p ? (str + (p - str_up)) : nullptr;
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 41902de81d..d72ba542c9 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1305,7 +1305,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM hContact, LPARAM lParam) // fill status name member
if (pData->flags & CSSF_MASK_NAME) {
if (pData->flags & CSSF_DEFAULT_NAME) {
- DWORD dwXStatus = (pData->wParam == nullptr) ? pepMood->m_mode : *pData->wParam;
+ uint32_t dwXStatus = (pData->wParam == nullptr) ? pepMood->m_mode : *pData->wParam;
if (dwXStatus >= _countof(g_arrMoods))
return 1;
@@ -1316,7 +1316,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM hContact, LPARAM lParam) if (dwStatusTitleSize > STATUS_TITLE_MAX)
dwStatusTitleSize = STATUS_TITLE_MAX;
- WideCharToMultiByte(CP_ACP, 0, g_arrMoods[dwXStatus].szName, (DWORD)dwStatusTitleSize, pData->pszName, MAX_PATH, nullptr, nullptr);
+ WideCharToMultiByte(CP_ACP, 0, g_arrMoods[dwXStatus].szName, (uint32_t)dwStatusTitleSize, pData->pszName, MAX_PATH, nullptr, nullptr);
pData->pszName[dwStatusTitleSize] = 0;
}
}
diff --git a/protocols/JabberG/src/stdafx.h b/protocols/JabberG/src/stdafx.h index 2cc9550b8f..74e6751817 100755 --- a/protocols/JabberG/src/stdafx.h +++ b/protocols/JabberG/src/stdafx.h @@ -367,7 +367,7 @@ struct ThreadData bool bIsReg;
bool reg_done, bIsSessionAvailable;
bool bBookmarksLoaded;
- DWORD dwLoginRqs;
+ uint32_t dwLoginRqs;
// connection & login data
JABBER_CONN_DATA conn;
|