diff options
author | George Hazan <ghazan@miranda.im> | 2021-01-18 21:57:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-01-18 21:57:04 +0300 |
commit | a0a5ee70f1e5021df606a01a212144f4fe955daa (patch) | |
tree | 5a2e33c2f6b1481318f11a9c38e0732cb53be802 /plugins/Import/src | |
parent | 007d5cd3398c7e82a5bbfe29131323c7c2ea379b (diff) |
fixes #2698 (Add current db format (mdbx, sqlite) to version info report)
Diffstat (limited to 'plugins/Import/src')
-rw-r--r-- | plugins/Import/src/dbrw/dbintf.h | 2 | ||||
-rw-r--r-- | plugins/Import/src/dbrw/dbrw.cpp | 5 | ||||
-rw-r--r-- | plugins/Import/src/mcontacts.cpp | 7 | ||||
-rw-r--r-- | plugins/Import/src/patterns.cpp | 7 | ||||
-rw-r--r-- | plugins/Import/src/textjson.cpp | 7 |
5 files changed, 28 insertions, 0 deletions
diff --git a/plugins/Import/src/dbrw/dbintf.h b/plugins/Import/src/dbrw/dbintf.h index 3c5fbef3c5..481ff173de 100644 --- a/plugins/Import/src/dbrw/dbintf.h +++ b/plugins/Import/src/dbrw/dbintf.h @@ -154,4 +154,6 @@ public: STDMETHODIMP_(BOOL) MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) override; STDMETHODIMP_(MEVENT) GetEventById(LPCSTR szModule, LPCSTR szId) override; + + STDMETHODIMP_(DATABASELINK *) GetDriver(); }; diff --git a/plugins/Import/src/dbrw/dbrw.cpp b/plugins/Import/src/dbrw/dbrw.cpp index a43f8da910..0779374d62 100644 --- a/plugins/Import/src/dbrw/dbrw.cpp +++ b/plugins/Import/src/dbrw/dbrw.cpp @@ -94,6 +94,11 @@ static DATABASELINK dblink = dbrw_Load }; +STDMETHODIMP_(DATABASELINK *) CDbxSQLite::GetDriver() +{ + return &g_patternDbLink; +} + void RegisterDbrw() { RegisterDatabasePlugin(&dblink); diff --git a/plugins/Import/src/mcontacts.cpp b/plugins/Import/src/mcontacts.cpp index 37e7a4f8a1..6764d9ae66 100644 --- a/plugins/Import/src/mcontacts.cpp +++ b/plugins/Import/src/mcontacts.cpp @@ -274,6 +274,8 @@ public: --m_curr; return *m_curr; } + + STDMETHODIMP_(DATABASELINK *) GetDriver() override; }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -309,6 +311,11 @@ static DATABASELINK dblink = mc_load }; +STDMETHODIMP_(DATABASELINK *) CDbxMc::GetDriver() +{ + return &dblink; +} + void RegisterMContacts() { RegisterDatabasePlugin(&dblink); diff --git a/plugins/Import/src/patterns.cpp b/plugins/Import/src/patterns.cpp index 5fb789d26b..cdd69cdfeb 100644 --- a/plugins/Import/src/patterns.cpp +++ b/plugins/Import/src/patterns.cpp @@ -690,6 +690,8 @@ public: { return (idx >= 1) ? idx-1 : 0; } + + STDMETHODIMP_(DATABASELINK *) GetDriver(); }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -723,3 +725,8 @@ DATABASELINK g_patternDbLink = pattern_grokHeader, pattern_load }; + +STDMETHODIMP_(DATABASELINK *) CDbxPattern::GetDriver() +{ + return &g_patternDbLink; +} diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index 81457ff2b9..b6f890c86b 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -207,6 +207,8 @@ public: return iEvent-1; } + + STDMETHODIMP_(DATABASELINK *) GetDriver(); }; static int mc_grokHeader(const wchar_t *profile) @@ -234,6 +236,11 @@ static DATABASELINK dblink = mc_load }; +STDMETHODIMP_(DATABASELINK *) CDbxJson::GetDriver() +{ + return &g_patternDbLink; +} + void RegisterJson() { RegisterDatabasePlugin(&dblink); |