From 7748903e5c28d9e30a3970dfaaf464f163da2a1d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Jan 2021 20:13:39 +0300 Subject: Password change dialog also became common --- include/m_db_int.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/m_db_int.h b/include/m_db_int.h index b4fef07719..0293111bb1 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -189,20 +189,6 @@ protected: bool LockName(const wchar_t *pwszProfileName); void UnlockName(); - //////////////////////////////////////////////////////////////////////////////////////// - // encryption support - - int InitCrypt(); - - CRYPTO_PROVIDER* SelectProvider(); - STDMETHOD_(CRYPTO_PROVIDER*, ReadProvider)() PURE; - STDMETHOD_(BOOL, StoreProvider)(CRYPTO_PROVIDER*) PURE; - - STDMETHOD_(BOOL, ReadCryptoKey)(MBinBuffer&) PURE; - STDMETHOD_(BOOL, StoreCryptoKey)() PURE; - - STDMETHOD_(BOOL, ReadEncryption)() PURE; - STDMETHOD_(BOOL, GetContactSettingWorker)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic); STDMETHOD_(BOOL, WriteContactSettingWorker)(MCONTACT contactID, DBCONTACTWRITESETTING &dbcws) PURE; @@ -215,6 +201,8 @@ public: __forceinline MIDatabaseCache* getCache() const { return m_cache; } __forceinline bool usesPassword() const { return m_bUsesPassword; } + void SetPassword(const wchar_t *ptszPassword); + STDMETHODIMP_(BOOL) DeleteModule(MCONTACT contactID, LPCSTR szModule) override; STDMETHODIMP_(MCONTACT) FindFirstContact(const char *szProto = nullptr) override; @@ -241,6 +229,20 @@ public: STDMETHODIMP_(DB::EventCursor*) EventCursor(MCONTACT hContact, MEVENT hDbEvent) override; STDMETHODIMP_(DB::EventCursor*) EventCursorRev(MCONTACT hContact, MEVENT hDbEvent) override; + + //////////////////////////////////////////////////////////////////////////////////////// + // encryption support + + int InitCrypt(); + + CRYPTO_PROVIDER* SelectProvider(); + STDMETHOD_(CRYPTO_PROVIDER*, ReadProvider)() PURE; + STDMETHOD_(BOOL, StoreProvider)(CRYPTO_PROVIDER*) PURE; + + STDMETHOD_(BOOL, ReadCryptoKey)(MBinBuffer&) PURE; + STDMETHOD_(BOOL, StoreCryptoKey)() PURE; + + STDMETHOD_(BOOL, ReadEncryption)() PURE; }; #pragma warning(pop) -- cgit v1.2.3