diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-13 16:09:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-13 16:09:27 +0300 |
commit | 2b30685427500c9eedac4c0c4862b32af144a90c (patch) | |
tree | a34df3dd8446a4ec9cb466ddd0632b2fcbcde448 /plugins/Dbx_sqlite/src | |
parent | e27e90cf6167d5d23a4458ae99479df6135a16b2 (diff) |
kinda first working version of database event cursors
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbevents.cpp | 12 | ||||
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbintf.h | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index cec73e5a50..25755334a4 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -718,18 +718,18 @@ BOOL CDbxSQLite::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact*) return TRUE; } -STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursor(MCONTACT hContact, DBEVENTINFO &dbei) +STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursor(MCONTACT hContact, MEVENT hDbEvent) { - return new CDbxSQLiteEventCursor(hContact, dbei, m_db); + return new CDbxSQLiteEventCursor(hContact, m_db); } -STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursorRev(MCONTACT hContact, DBEVENTINFO &dbei) +STDMETHODIMP_(DB::EventCursor*) CDbxSQLite::EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) { - return new CDbxSQLiteEventCursor(hContact, dbei, m_db, true); + return new CDbxSQLiteEventCursor(hContact, m_db, true); } -CDbxSQLiteEventCursor::CDbxSQLiteEventCursor(MCONTACT _1, DBEVENTINFO& _2, sqlite3* _db, bool reverse) - : EventCursor(_1, _2), m_db(_db) +CDbxSQLiteEventCursor::CDbxSQLiteEventCursor(MCONTACT _1, sqlite3* _db, bool reverse) + : EventCursor(_1), m_db(_db) { if (reverse) sqlite3_prepare_v2(m_db, reverse_order_query, -1, &cursor, nullptr); diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h index 1f0d44f54d..a1810f3f38 100755 --- a/plugins/Dbx_sqlite/src/dbintf.h +++ b/plugins/Dbx_sqlite/src/dbintf.h @@ -24,7 +24,7 @@ struct DBCachedContact : public DBCachedContactBase struct CDbxSQLiteEventCursor : public DB::EventCursor { - CDbxSQLiteEventCursor(MCONTACT _1, DBEVENTINFO& _2, sqlite3* m_db, bool reverse = false); + CDbxSQLiteEventCursor(MCONTACT _1, sqlite3* m_db, bool reverse = false); ~CDbxSQLiteEventCursor() override; MEVENT FetchNext() override; private: @@ -102,6 +102,6 @@ public: STDMETHODIMP_(BOOL) Compact() override; STDMETHODIMP_(BOOL) Backup(LPCWSTR) override; - STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, DBEVENTINFO& dbei) override; - STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, DBEVENTINFO& dbei) override; + STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, MEVENT hDbEvent) override; + STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) override; }; |