diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-23 17:27:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-23 17:27:12 +0300 |
commit | 95b66d773710bfdc4784ebac07bbb86868fdea8a (patch) | |
tree | ff053043d665086c1c97ebe331c42974eca52614 /plugins | |
parent | e5902c3524be5c1473563521c3e6e99acdf3ec3c (diff) |
db_event_edit - new stub for editing messages
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Db3x_mmap/src/dbevents.cpp | 29 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/dbintf.h | 1 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbevents.cpp | 7 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.h | 1 | ||||
-rw-r--r-- | plugins/Dbx_sqlite/src/dbevents.cpp | 5 | ||||
-rw-r--r-- | plugins/Dbx_sqlite/src/dbintf.h | 1 | ||||
-rw-r--r-- | plugins/Import/src/dbrw/dbevents.cpp | 5 | ||||
-rw-r--r-- | plugins/Import/src/dbrw/dbintf.h | 1 |
8 files changed, 38 insertions, 12 deletions
diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp index 34a0ae2d3f..3f6d575329 100644 --- a/plugins/Db3x_mmap/src/dbevents.cpp +++ b/plugins/Db3x_mmap/src/dbevents.cpp @@ -23,14 +23,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-STDMETHODIMP_(LONG) CDb3Mmap::GetEventCount(MCONTACT contactID)
+LONG CDb3Mmap::GetEventCount(MCONTACT contactID)
{
mir_cslock lck(m_csDbAccess);
DBContact *dbc = (DBContact*)DBRead(GetContactOffset(contactID), nullptr);
return (dbc->signature != DBCONTACT_SIGNATURE) ? -1 : dbc->eventCount;
}
-STDMETHODIMP_(MEVENT) CDb3Mmap::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
+MEVENT CDb3Mmap::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
{
if (dbei == nullptr) return 0;
if (dbei->timestamp == 0) return 0;
@@ -162,7 +162,7 @@ STDMETHODIMP_(MEVENT) CDb3Mmap::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) return (MEVENT)ofsNew;
}
-STDMETHODIMP_(BOOL) CDb3Mmap::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent)
+BOOL CDb3Mmap::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc;
if (contactID) {
@@ -257,14 +257,19 @@ STDMETHODIMP_(BOOL) CDb3Mmap::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) return 0;
}
-STDMETHODIMP_(LONG) CDb3Mmap::GetBlobSize(MEVENT hDbEvent)
+BOOL CDb3Mmap::EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe)
+{
+ return 1;
+}
+
+LONG CDb3Mmap::GetBlobSize(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, 0);
return (dbe->signature != DBEVENT_SIGNATURE) ? -1 : dbe->cbBlob;
}
-STDMETHODIMP_(BOOL) CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
+BOOL CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
{
if (dbei == nullptr) return 1;
if (dbei->cbBlob > 0 && dbei->pBlob == nullptr) {
@@ -306,7 +311,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) return 0;
}
-STDMETHODIMP_(BOOL) CDb3Mmap::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent)
+BOOL CDb3Mmap::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc;
if (contactID) {
@@ -356,14 +361,14 @@ STDMETHODIMP_(BOOL) CDb3Mmap::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) return ret;
}
-STDMETHODIMP_(MCONTACT) CDb3Mmap::GetEventContact(MEVENT hDbEvent)
+MCONTACT CDb3Mmap::GetEventContact(MEVENT hDbEvent)
{
mir_cslock lck(m_csDbAccess);
DBEvent *dbe = AdaptEvent((DWORD)hDbEvent, INVALID_CONTACT_ID);
return (dbe->signature != DBEVENT_SIGNATURE) ? INVALID_CONTACT_ID : dbe->contactID;
}
-STDMETHODIMP_(MEVENT) CDb3Mmap::FindFirstEvent(MCONTACT contactID)
+MEVENT CDb3Mmap::FindFirstEvent(MCONTACT contactID)
{
DBCachedContact *cc;
DWORD ofsContact = GetContactOffset(contactID, &cc);
@@ -392,7 +397,7 @@ STDMETHODIMP_(MEVENT) CDb3Mmap::FindFirstEvent(MCONTACT contactID) return 0;
}
-STDMETHODIMP_(MEVENT) CDb3Mmap::FindFirstUnreadEvent(MCONTACT contactID)
+MEVENT CDb3Mmap::FindFirstUnreadEvent(MCONTACT contactID)
{
DBCachedContact *cc;
DWORD ofsContact = GetContactOffset(contactID, &cc);
@@ -421,7 +426,7 @@ STDMETHODIMP_(MEVENT) CDb3Mmap::FindFirstUnreadEvent(MCONTACT contactID) return 0;
}
-STDMETHODIMP_(MEVENT) CDb3Mmap::FindLastEvent(MCONTACT contactID)
+MEVENT CDb3Mmap::FindLastEvent(MCONTACT contactID)
{
DBCachedContact *cc;
DWORD ofsContact = GetContactOffset(contactID, &cc);
@@ -450,7 +455,7 @@ STDMETHODIMP_(MEVENT) CDb3Mmap::FindLastEvent(MCONTACT contactID) return 0;
}
-STDMETHODIMP_(MEVENT) CDb3Mmap::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent)
+MEVENT CDb3Mmap::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc = (contactID) ? m_cache->GetCachedContact(contactID) : nullptr;
@@ -472,7 +477,7 @@ STDMETHODIMP_(MEVENT) CDb3Mmap::FindNextEvent(MCONTACT contactID, MEVENT hDbEven return 0;
}
-STDMETHODIMP_(MEVENT) CDb3Mmap::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent)
+MEVENT CDb3Mmap::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc = (contactID) ? m_cache->GetCachedContact(contactID) : nullptr;
diff --git a/plugins/Db3x_mmap/src/dbintf.h b/plugins/Db3x_mmap/src/dbintf.h index 8f5970ff99..c00c6d8321 100644 --- a/plugins/Db3x_mmap/src/dbintf.h +++ b/plugins/Db3x_mmap/src/dbintf.h @@ -220,6 +220,7 @@ public: STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID) override;
STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe) override;
STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) override;
+ STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) override;
STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent) override;
STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override;
STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override;
diff --git a/plugins/Dbx_mdbx/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 27b9c1c52e..4485cf0dc0 100644 --- a/plugins/Dbx_mdbx/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -230,6 +230,13 @@ BOOL CDbxMDBX::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) ///////////////////////////////////////////////////////////////////////////////
+BOOL CDbxMDBX::EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe)
+{
+ return 1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
LONG CDbxMDBX::GetBlobSize(MEVENT hDbEvent)
{
txn_ptr_ro txn(m_txn_ro);
diff --git a/plugins/Dbx_mdbx/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h index f7986e2b5c..8f1b6ab24b 100644 --- a/plugins/Dbx_mdbx/src/dbintf.h +++ b/plugins/Dbx_mdbx/src/dbintf.h @@ -254,6 +254,7 @@ public: STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID) override;
STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe) override;
STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) override;
+ STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) override;
STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent) override;
STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override;
STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override;
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index d6af4ee98e..22324d96e1 100644 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -135,6 +135,11 @@ BOOL CDbxSQLite::DeleteEvent(MCONTACT hContact, MEVENT hDbEvent) return 0; } +BOOL CDbxSQLite::EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) +{ + return 1; // not supported +} + LONG CDbxSQLite::GetBlobSize(MEVENT hDbEvent) { if (hDbEvent == 0) diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h index 4ab30580a5..08e3e419f2 100644 --- a/plugins/Dbx_sqlite/src/dbintf.h +++ b/plugins/Dbx_sqlite/src/dbintf.h @@ -43,6 +43,7 @@ public: STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID) override; STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe) override; STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) override; + STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) override; STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent) override; STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override; STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override; diff --git a/plugins/Import/src/dbrw/dbevents.cpp b/plugins/Import/src/dbrw/dbevents.cpp index 062cc79069..d6db3c1ae2 100644 --- a/plugins/Import/src/dbrw/dbevents.cpp +++ b/plugins/Import/src/dbrw/dbevents.cpp @@ -44,6 +44,11 @@ STDMETHODIMP_(BOOL) CDbxSQLite::DeleteEvent(MCONTACT, MEVENT) return FALSE; } +BOOL CDbxSQLite::EditEvent(MCONTACT, MEVENT, DBEVENTINFO*) +{ + return 1; +} + STDMETHODIMP_(LONG) 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 692316c38f..eb23330477 100644 --- a/plugins/Import/src/dbrw/dbintf.h +++ b/plugins/Import/src/dbrw/dbintf.h @@ -135,6 +135,7 @@ public: STDMETHODIMP_(LONG) GetEventCount(MCONTACT contactID) override; STDMETHODIMP_(MEVENT) AddEvent(MCONTACT contactID, DBEVENTINFO *dbe) override; STDMETHODIMP_(BOOL) DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) override; + STDMETHODIMP_(BOOL) EditEvent(MCONTACT contactID, MEVENT hDbEvent, DBEVENTINFO *dbe) override; STDMETHODIMP_(LONG) GetBlobSize(MEVENT hDbEvent) override; STDMETHODIMP_(BOOL) GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbe) override; STDMETHODIMP_(BOOL) MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) override; |