summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
commit85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c (patch)
treefe07935255b7432938f282419c3ab1378524c02f /plugins/Dbx_mdb/src
parent8a09c895c4cd0e9cc87c38181ae2913dba77c30b (diff)
MEVENT - the strict type for events, they are not HANDLE anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@11866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src')
-rw-r--r--plugins/Dbx_mdb/src/dbevents.cpp24
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp1
-rw-r--r--plugins/Dbx_mdb/src/dbintf.h22
3 files changed, 24 insertions, 23 deletions
diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp
index 6b7085575c..949c6eab64 100644
--- a/plugins/Dbx_mdb/src/dbevents.cpp
+++ b/plugins/Dbx_mdb/src/dbevents.cpp
@@ -31,7 +31,7 @@ STDMETHODIMP_(LONG) CDbxMdb::GetEventCount(MCONTACT contactID)
return -1;
}
-STDMETHODIMP_(HANDLE) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
+STDMETHODIMP_(MEVENT) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
{
if (dbei == NULL || dbei->cbSize != sizeof(DBEVENTINFO)) return 0;
if (dbei->timestamp == 0) return 0;
@@ -84,10 +84,10 @@ STDMETHODIMP_(HANDLE) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
// Notify only in safe mode or on really new events
NotifyEventHooks(hEventAddedEvent, contactNotifyID, (LPARAM)-1);
- return (HANDLE)0;
+ return (MEVENT)0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::DeleteEvent(MCONTACT contactID, HANDLE hDbEvent)
+STDMETHODIMP_(BOOL) CDbxMdb::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc;
if (contactID) {
@@ -110,13 +110,13 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteEvent(MCONTACT contactID, HANDLE hDbEvent)
return 0;
}
-STDMETHODIMP_(LONG) CDbxMdb::GetBlobSize(HANDLE hDbEvent)
+STDMETHODIMP_(LONG) CDbxMdb::GetBlobSize(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
return -1;
}
-STDMETHODIMP_(BOOL) CDbxMdb::GetEvent(HANDLE hDbEvent, DBEVENTINFO *dbei)
+STDMETHODIMP_(BOOL) CDbxMdb::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
{
if (dbei == NULL || dbei->cbSize != sizeof(DBEVENTINFO)) return 1;
if (dbei->cbBlob > 0 && dbei->pBlob == NULL) {
@@ -128,7 +128,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::GetEvent(HANDLE hDbEvent, DBEVENTINFO *dbei)
return 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, HANDLE hDbEvent)
+STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc;
if (contactID) {
@@ -147,31 +147,31 @@ STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, HANDLE hDbEvent)
return -11;
}
-STDMETHODIMP_(MCONTACT) CDbxMdb::GetEventContact(HANDLE hDbEvent)
+STDMETHODIMP_(MCONTACT) CDbxMdb::GetEventContact(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
return INVALID_CONTACT_ID;
}
-STDMETHODIMP_(HANDLE) CDbxMdb::FindFirstEvent(MCONTACT contactID)
+STDMETHODIMP_(MEVENT) CDbxMdb::FindFirstEvent(MCONTACT contactID)
{
mir_cslock lck(m_csDbAccess);
return NULL;
}
-STDMETHODIMP_(HANDLE) CDbxMdb::FindFirstUnreadEvent(MCONTACT contactID)
+STDMETHODIMP_(MEVENT) CDbxMdb::FindFirstUnreadEvent(MCONTACT contactID)
{
mir_cslock lck(m_csDbAccess);
return NULL;
}
-STDMETHODIMP_(HANDLE) CDbxMdb::FindLastEvent(MCONTACT contactID)
+STDMETHODIMP_(MEVENT) CDbxMdb::FindLastEvent(MCONTACT contactID)
{
mir_cslock lck(m_csDbAccess);
return NULL;
}
-STDMETHODIMP_(HANDLE) CDbxMdb::FindNextEvent(MCONTACT contactID, HANDLE hDbEvent)
+STDMETHODIMP_(MEVENT) CDbxMdb::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc = (contactID) ? m_cache->GetCachedContact(contactID) : NULL;
@@ -179,7 +179,7 @@ STDMETHODIMP_(HANDLE) CDbxMdb::FindNextEvent(MCONTACT contactID, HANDLE hDbEvent
return NULL;
}
-STDMETHODIMP_(HANDLE) CDbxMdb::FindPrevEvent(MCONTACT contactID, HANDLE hDbEvent)
+STDMETHODIMP_(MEVENT) CDbxMdb::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc = (contactID) ? m_cache->GetCachedContact(contactID) : NULL;
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index 48f7deb1db..f519d3dd4b 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -93,6 +93,7 @@ int CDbxMdb::Load(bool bSkipInit)
mdb_open(trnlck, "contacts", MDB_CREATE | MDB_INTEGERKEY, &m_dbContacts);
mdb_open(trnlck, "modules", MDB_CREATE | MDB_INTEGERKEY, &m_dbModules);
mdb_open(trnlck, "events", MDB_CREATE | MDB_INTEGERKEY, &m_dbEvents);
+ mdb_open(trnlck, "eventsrt", MDB_CREATE, &m_dbEvents);
mdb_open(trnlck, "settings", MDB_CREATE, &m_dbSettings);
trnlck.commit();
diff --git a/plugins/Dbx_mdb/src/dbintf.h b/plugins/Dbx_mdb/src/dbintf.h
index e83f559634..26f7c29629 100644
--- a/plugins/Dbx_mdb/src/dbintf.h
+++ b/plugins/Dbx_mdb/src/dbintf.h
@@ -156,17 +156,17 @@ public:
STDMETHODIMP_(BOOL) IsDbContact(MCONTACT contactID);
STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID);
- STDMETHODIMP_(HANDLE) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe);
- STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, HANDLE hDbEvent);
- STDMETHODIMP_(LONG) GetBlobSize(HANDLE hDbEvent);
- STDMETHODIMP_(BOOL) GetEvent(HANDLE hDbEvent, DBEVENTINFO *dbe);
- STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, HANDLE hDbEvent);
- STDMETHODIMP_(MCONTACT) GetEventContact(HANDLE hDbEvent);
- STDMETHODIMP_(HANDLE) FindFirstEvent(MCONTACT contactID);
- STDMETHODIMP_(HANDLE) FindFirstUnreadEvent(MCONTACT contactID);
- STDMETHODIMP_(HANDLE) FindLastEvent(MCONTACT contactID);
- STDMETHODIMP_(HANDLE) FindNextEvent(MCONTACT contactID, HANDLE hDbEvent);
- STDMETHODIMP_(HANDLE) FindPrevEvent(MCONTACT contactID, HANDLE hDbEvent);
+ STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe);
+ STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, MEVENT hDbEvent);
+ STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent);
+ STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe);
+ STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent);
+ STDMETHODIMP_(MCONTACT) GetEventContact(MEVENT hDbEvent);
+ STDMETHODIMP_(MEVENT) FindFirstEvent(MCONTACT contactID);
+ STDMETHODIMP_(MEVENT) FindFirstUnreadEvent(MCONTACT contactID);
+ STDMETHODIMP_(MEVENT) FindLastEvent(MCONTACT contactID);
+ STDMETHODIMP_(MEVENT) FindNextEvent(MCONTACT contactID, MEVENT hDbEvent);
+ STDMETHODIMP_(MEVENT) FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent);
STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam);