From 2d3b4b958926b3ed7d4a5d997121fe91a12f83cc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Nov 2021 19:24:53 +0300 Subject: update for system includes & import libraries --- plugins/Import/src/dbrw/dbcontacts.cpp | 6 +++--- plugins/Import/src/dbrw/dbevents.cpp | 4 ++-- plugins/Import/src/dbrw/dbintf.h | 10 +++++----- plugins/Import/src/mcontacts.cpp | 8 ++++---- plugins/Import/src/patterns.cpp | 12 ++++++------ plugins/Import/src/textjson.cpp | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/dbrw/dbcontacts.cpp b/plugins/Import/src/dbrw/dbcontacts.cpp index 110e5ad322..a100788717 100644 --- a/plugins/Import/src/dbrw/dbcontacts.cpp +++ b/plugins/Import/src/dbrw/dbcontacts.cpp @@ -43,7 +43,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::IsDbContact(MCONTACT contactID) return (cc != nullptr); } -STDMETHODIMP_(LONG) CDbxSQLite::GetContactCount(void) +STDMETHODIMP_(int) CDbxSQLite::GetContactCount(void) { int res = 0; if (sql_step(ctc_stmts_prep[SQL_CTC_STMT_COUNT]) == SQLITE_ROW) @@ -52,7 +52,7 @@ STDMETHODIMP_(LONG) CDbxSQLite::GetContactCount(void) return res; } -STDMETHODIMP_(LONG) CDbxSQLite::GetContactSize(void) +STDMETHODIMP_(int) CDbxSQLite::GetContactSize(void) { return sizeof(DBCachedContact); } @@ -62,7 +62,7 @@ STDMETHODIMP_(MCONTACT) CDbxSQLite::AddContact(void) return INVALID_CONTACT_ID; } -STDMETHODIMP_(LONG) CDbxSQLite::DeleteContact(MCONTACT) +STDMETHODIMP_(int) CDbxSQLite::DeleteContact(MCONTACT) { return 1; } diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp index 4fcfa650fe..92e100737d 100644 --- a/plugins/Import/src/dbrw/dbevents.cpp +++ b/plugins/Import/src/dbrw/dbevents.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../stdafx.h" -STDMETHODIMP_(LONG) CDbxSQLite::GetEventCount(MCONTACT contactID) +STDMETHODIMP_(int) CDbxSQLite::GetEventCount(MCONTACT contactID) { mir_cslock lock(m_csDbAccess); @@ -49,7 +49,7 @@ BOOL CDbxSQLite::EditEvent(MCONTACT, MEVENT, const DBEVENTINFO*) return 1; } -STDMETHODIMP_(LONG) CDbxSQLite::GetBlobSize(MEVENT hDbEvent) +STDMETHODIMP_(int) CDbxSQLite::GetBlobSize(MEVENT hDbEvent) { mir_cslock lock(m_csDbAccess); diff --git a/plugins/Import/src/dbrw/dbintf.h b/plugins/Import/src/dbrw/dbintf.h index 481ff173de..e77842de21 100644 --- a/plugins/Import/src/dbrw/dbintf.h +++ b/plugins/Import/src/dbrw/dbintf.h @@ -125,17 +125,17 @@ public: STDMETHODIMP_(BOOL) IsRelational(void) override { return FALSE; } STDMETHODIMP_(void) SetCacheSafetyMode(BOOL) override; - STDMETHODIMP_(LONG) GetContactCount(void) override; - STDMETHODIMP_(LONG) DeleteContact(MCONTACT contactID) override; + STDMETHODIMP_(int) GetContactCount(void) override; + STDMETHODIMP_(int) DeleteContact(MCONTACT contactID) override; STDMETHODIMP_(MCONTACT) AddContact(void) override; STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID) override; - STDMETHODIMP_(LONG) GetContactSize(void) override; + STDMETHODIMP_(int) GetContactSize(void) override; - STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID) override; + STDMETHODIMP_(int) GetEventCount(MCONTACT contactID) override; STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, const DBEVENTINFO *dbe) override; STDMETHODIMP_(BOOL) DeleteEvent(MEVENT hDbEvent) override; STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO *dbe) override; - STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent) override; + STDMETHODIMP_(int) GetBlobSize(MEVENT hDbEvent) override; STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override; STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override; STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT hDbEvent) override; diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp index 6764d9ae66..415f580ca9 100644 --- a/plugins/Import/src/mcontacts.cpp +++ b/plugins/Import/src/mcontacts.cpp @@ -151,7 +151,7 @@ public: } // mcontacts format always store history for one contact only - STDMETHODIMP_(LONG) GetBlobSize(MEVENT dwOffset) override + STDMETHODIMP_(int) GetBlobSize(MEVENT dwOffset) override { if (INVALID_SET_FILE_POINTER == SetFilePointer(m_hFile, dwOffset, 0, FILE_BEGIN)) return 0; @@ -180,14 +180,14 @@ public: return 0; } - STDMETHODIMP_(LONG) GetContactCount(void) override + STDMETHODIMP_(int) GetContactCount(void) override { return 1; } - STDMETHODIMP_(LONG) GetEventCount(MCONTACT) override + STDMETHODIMP_(int) GetEventCount(MCONTACT) override { - return (LONG)m_events.size(); + return (int)m_events.size(); } STDMETHODIMP_(BOOL) GetEvent(MEVENT dwOffset, DBEVENTINFO *dbei) override diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp index cdd69cdfeb..74fb9620dc 100644 --- a/plugins/Import/src/patterns.cpp +++ b/plugins/Import/src/patterns.cpp @@ -422,7 +422,7 @@ public: } // patterns file always stores history for the single contact only - STDMETHODIMP_(LONG) GetBlobSize(MEVENT idx) override + STDMETHODIMP_(int) GetBlobSize(MEVENT idx) override { if (m_events.size() == 0 || idx < 1 || idx > m_events.size()) return 0; @@ -440,9 +440,9 @@ public: return RLWord(&pMsg[m_iMsgHeaderSize - 2]) + 1; } - STDMETHODIMP_(LONG) GetContactCount(void) override + STDMETHODIMP_(int) GetContactCount(void) override { - return (LONG)m_files.size(); + return (int)m_files.size(); } STDMETHODIMP_(MCONTACT) FindFirstContact(const char *szProto) override @@ -463,9 +463,9 @@ public: return ret; } - STDMETHODIMP_(LONG) GetEventCount(MCONTACT) override + STDMETHODIMP_(int) GetEventCount(MCONTACT) override { - return (LONG)m_events.size(); + return (int)m_events.size(); } STDMETHODIMP_(BOOL) GetContactSettingWorker(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT* dbv, int isStatic) @@ -570,7 +570,7 @@ public: dbei->pBlob = (PBYTE)mir_alloc(dbei->cbBlob + 1); memcpy(dbei->pBlob, pMsg + m_iMsgHeaderSize, dbei->cbBlob); if (m_iFileVersion != 1) - for (unsigned i = 0; i < dbei->cbBlob; i++) { + for (int i = 0; i < dbei->cbBlob; i++) { dbei->pBlob[i] += i+1; dbei->pBlob[i] = 255 - dbei->pBlob[i]; } diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index 1cde97c6ba..06d5cd50ea 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -88,12 +88,12 @@ public: } // mcontacts format always store history for one contact only - STDMETHODIMP_(LONG) GetContactCount(void) override + STDMETHODIMP_(int) GetContactCount(void) override { return 1; } - STDMETHODIMP_(LONG) GetEventCount(MCONTACT) override + STDMETHODIMP_(int) GetEventCount(MCONTACT) override { return m_events.getCount(); } -- cgit v1.2.3