summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-01-08 14:54:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-01-08 14:54:51 +0300
commit64579d553e4089d55c136140bd0058696d2cf526 (patch)
tree7b7e6c5cd03b9060bd7080b5981938005436b432 /plugins/Dbx_sqlite/src
parentdae0d079ad629d499034ff911e0b1a807c19fce0 (diff)
another bunch of duplicate code moved to the core
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-rw-r--r--plugins/Dbx_sqlite/src/dbcrypt.cpp11
-rwxr-xr-xplugins/Dbx_sqlite/src/dbintf.h2
-rw-r--r--plugins/Dbx_sqlite/src/stdafx.h5
3 files changed, 15 insertions, 3 deletions
diff --git a/plugins/Dbx_sqlite/src/dbcrypt.cpp b/plugins/Dbx_sqlite/src/dbcrypt.cpp
new file mode 100644
index 0000000000..f0dca5a0bc
--- /dev/null
+++ b/plugins/Dbx_sqlite/src/dbcrypt.cpp
@@ -0,0 +1,11 @@
+#include "stdafx.h"
+
+STDMETHODIMP_(BOOL) CDbxSQLite::StoreProvider(CRYPTO_PROVIDER *pProvider)
+{
+ DBCONTACTWRITESETTING dbcws = { "CryptoEngine", "Provider" };
+ dbcws.value.type = DBVT_BLOB;
+ dbcws.value.pbVal = (PBYTE)pProvider->pszName;
+ dbcws.value.cpbVal = (WORD)mir_strlen(pProvider->pszName) + 1;
+ WriteContactSetting(0, &dbcws);
+ return TRUE;
+}
diff --git a/plugins/Dbx_sqlite/src/dbintf.h b/plugins/Dbx_sqlite/src/dbintf.h
index 9fb06f84d8..ca220289c0 100755
--- a/plugins/Dbx_sqlite/src/dbintf.h
+++ b/plugins/Dbx_sqlite/src/dbintf.h
@@ -91,6 +91,8 @@ public:
STDMETHODIMP_(BOOL) EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam) override;
+ STDMETHODIMP_(BOOL) StoreProvider(CRYPTO_PROVIDER*);
+
STDMETHODIMP_(BOOL) WriteContactSettingWorker(MCONTACT contactID, DBCONTACTWRITESETTING &dbcws) override;
STDMETHODIMP_(BOOL) DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting) override;
STDMETHODIMP_(BOOL) EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param) override;
diff --git a/plugins/Dbx_sqlite/src/stdafx.h b/plugins/Dbx_sqlite/src/stdafx.h
index d1cbb5ec17..edeed11711 100644
--- a/plugins/Dbx_sqlite/src/stdafx.h
+++ b/plugins/Dbx_sqlite/src/stdafx.h
@@ -6,12 +6,11 @@
#include <memory>
#include <malloc.h>
-#include <newpluginapi.h>
#include <win2k.h>
#include <assert.h>
-#include <m_core.h>
-#include <m_system.h>
+#include <newpluginapi.h>
+#include <m_crypto.h>
#include <m_database.h>
#include <m_protocols.h>
#include <m_metacontacts.h>