summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp6
-rw-r--r--plugins/Db3x_mmap/src/dbevents.cpp4
-rw-r--r--plugins/Db3x_mmap/src/dbintf.h10
-rw-r--r--plugins/Dbx_mdbx/src/dbcontacts.cpp6
-rw-r--r--plugins/Dbx_mdbx/src/dbevents.cpp4
-rw-r--r--plugins/Dbx_mdbx/src/dbintf.h10
-rwxr-xr-xplugins/Dbx_sqlite/src/dbcontacts.cpp6
-rwxr-xr-xplugins/Dbx_sqlite/src/dbevents.cpp4
-rwxr-xr-xplugins/Dbx_sqlite/src/dbintf.h10
-rw-r--r--plugins/Import/src/dbrw/dbcontacts.cpp6
-rw-r--r--plugins/Import/src/dbrw/dbevents.cpp4
-rw-r--r--plugins/Import/src/dbrw/dbintf.h10
-rw-r--r--plugins/Import/src/mcontacts.cpp8
-rw-r--r--plugins/Import/src/patterns.cpp12
-rw-r--r--plugins/Import/src/textjson.cpp4
15 files changed, 52 insertions, 52 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index 6056f8dc9f..19aebdc779 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -23,18 +23,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-STDMETHODIMP_(LONG) CDb3Mmap::GetContactCount(void)
+STDMETHODIMP_(int) CDb3Mmap::GetContactCount(void)
{
mir_cslock lck(m_csDbAccess);
return m_dbHeader.contactCount;
}
-STDMETHODIMP_(LONG) CDb3Mmap::GetContactSize(void)
+STDMETHODIMP_(int) CDb3Mmap::GetContactSize(void)
{
return sizeof(DBCachedContact);
}
-STDMETHODIMP_(LONG) CDb3Mmap::DeleteContact(MCONTACT contactID)
+STDMETHODIMP_(int) CDb3Mmap::DeleteContact(MCONTACT contactID)
{
if (contactID == 0) // global contact cannot be removed
return 1;
diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp
index 68384fa348..0b4aeb4a18 100644
--- a/plugins/Db3x_mmap/src/dbevents.cpp
+++ b/plugins/Db3x_mmap/src/dbevents.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-LONG CDb3Mmap::GetEventCount(MCONTACT contactID)
+int CDb3Mmap::GetEventCount(MCONTACT contactID)
{
mir_cslock lck(m_csDbAccess);
DBContact *dbc = (DBContact*)DBRead(GetContactOffset(contactID), nullptr);
@@ -268,7 +268,7 @@ BOOL CDb3Mmap::EditEvent(MCONTACT, MEVENT, const DBEVENTINFO*)
return 1;
}
-LONG CDb3Mmap::GetBlobSize(MEVENT hDbEvent)
+int CDb3Mmap::GetBlobSize(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, 0);
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h
index 8e09a9ba1c..67dc4b084e 100644
--- a/plugins/Db3x_mmap/src/dbintf.h
+++ b/plugins/Db3x_mmap/src/dbintf.h
@@ -201,17 +201,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/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp
index 2199ff2aa1..5e56410ac0 100644
--- a/plugins/Dbx_mdbx/src/dbcontacts.cpp
+++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp
@@ -23,19 +23,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-LONG CDbxMDBX::GetContactCount(void)
+int CDbxMDBX::GetContactCount(void)
{
MDBX_stat st;
mdbx_dbi_stat(StartTran(), m_dbContacts, &st, sizeof(st));
return st.ms_entries;
}
-LONG CDbxMDBX::GetContactSize(void)
+int CDbxMDBX::GetContactSize(void)
{
return sizeof(DBCachedContact);
}
-LONG CDbxMDBX::DeleteContact(MCONTACT contactID)
+int CDbxMDBX::DeleteContact(MCONTACT contactID)
{
if (contactID == 0) // global contact cannot be removed
return 1;
diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp
index aa7f634f64..cb0b910abe 100644
--- a/plugins/Dbx_mdbx/src/dbevents.cpp
+++ b/plugins/Dbx_mdbx/src/dbevents.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-LONG CDbxMDBX::GetEventCount(MCONTACT contactID)
+int CDbxMDBX::GetEventCount(MCONTACT contactID)
{
if (!contactID)
return m_ccDummy.dbc.dwEventCount;
@@ -278,7 +278,7 @@ bool CDbxMDBX::EditEvent(MCONTACT contactID, MEVENT hDbEvent, const DBEVENTINFO
/////////////////////////////////////////////////////////////////////////////////////////
-LONG CDbxMDBX::GetBlobSize(MEVENT hDbEvent)
+int CDbxMDBX::GetBlobSize(MEVENT hDbEvent)
{
MDBX_val key = { &hDbEvent, sizeof(MEVENT) }, data;
if (mdbx_get(StartTran(), m_dbEvents, &key, &data) != MDBX_SUCCESS)
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h
index 25469bc606..f847c43730 100644
--- a/plugins/Dbx_mdbx/src/dbintf.h
+++ b/plugins/Dbx_mdbx/src/dbintf.h
@@ -240,17 +240,17 @@ public:
STDMETHODIMP_(BOOL) IsRelational(void) override { return TRUE; }
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/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp
index bd012ee4c8..8ea6d122ae 100755
--- a/plugins/Dbx_sqlite/src/dbcontacts.cpp
+++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp
@@ -14,7 +14,7 @@ void CDbxSQLite::InitContacts()
sqlite3_finalize(stmt);
}
-LONG CDbxSQLite::GetContactCount()
+int CDbxSQLite::GetContactCount()
{
mir_cslock lock(m_csDbAccess);
sqlite3_stmt *stmt = InitQuery("SELECT COUNT(1) FROM contacts LIMIT 1;", qCntCount);
@@ -48,7 +48,7 @@ MCONTACT CDbxSQLite::AddContact()
return hContact;
}
-LONG CDbxSQLite::DeleteContact(MCONTACT hContact)
+int CDbxSQLite::DeleteContact(MCONTACT hContact)
{
// global contact cannot be removed
if (hContact == 0)
@@ -107,7 +107,7 @@ BOOL CDbxSQLite::IsDbContact(MCONTACT hContact)
return (cc != nullptr);
}
-LONG CDbxSQLite::GetContactSize(void)
+int CDbxSQLite::GetContactSize(void)
{
return sizeof(DBCachedContact);
}
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 94249e508f..a4a56eed84 100755
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -30,7 +30,7 @@ void CDbxSQLite::UninitEvents()
m_modules.destroy();
}
-LONG CDbxSQLite::GetEventCount(MCONTACT hContact)
+int CDbxSQLite::GetEventCount(MCONTACT hContact)
{
DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system;
if (cc == nullptr)
@@ -257,7 +257,7 @@ BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO
return 0;
}
-LONG CDbxSQLite::GetBlobSize(MEVENT hDbEvent)
+int CDbxSQLite::GetBlobSize(MEVENT hDbEvent)
{
if (hDbEvent == 0)
return -1;
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h
index c9425d8c67..e0f74a165e 100755
--- a/plugins/Dbx_sqlite/src/dbintf.h
+++ b/plugins/Dbx_sqlite/src/dbintf.h
@@ -118,17 +118,17 @@ public:
STDMETHODIMP_(BOOL) IsRelational(void) override;
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/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();
}