diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-11 20:31:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-11 20:31:51 +0300 |
commit | b69809d6331b17865cc657cfd2ad48ed7464a6f2 (patch) | |
tree | 24b0ff744ece8a17c6952db753872848295d558f /plugins | |
parent | 7fb93c40e30b6a88b1e8de5dfa09284aca50a891 (diff) |
mdbx-plugin: fix names for clarity (minor, but renaming).
# Conflicts:
# plugins/Dbx_mdbx/src/libmdbx
Diffstat (limited to 'plugins')
m--------- | plugins/Dbx_mdb/src/libmdbx | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/dbx_mdbx.vcxproj (renamed from plugins/Dbx_mdb/dbx_lmdb.vcxproj) | 4 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/dbx_mdbx.vcxproj.filters (renamed from plugins/Dbx_mdb/dbx_lmdb.vcxproj.filters) | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/res/dbx_mdbx.rc (renamed from plugins/Dbx_mdb/res/dbx_mdb.rc) | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/res/logo.ico (renamed from plugins/Dbx_mdb/res/logo.ico) | bin | 5430 -> 5430 bytes | |||
-rw-r--r-- | plugins/Dbx_mdbx/res/pass.ico (renamed from plugins/Dbx_mdb/res/pass.ico) | bin | 1150 -> 1150 bytes | |||
-rw-r--r-- | plugins/Dbx_mdbx/res/version.rc (renamed from plugins/Dbx_mdb/res/version.rc) | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbcontacts.cpp (renamed from plugins/Dbx_mdb/src/dbcontacts.cpp) | 32 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbcrypt.cpp (renamed from plugins/Dbx_mdb/src/dbcrypt.cpp) | 18 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbevents.cpp (renamed from plugins/Dbx_mdb/src/dbevents.cpp) | 32 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp (renamed from plugins/Dbx_mdb/src/dbintf.cpp) | 56 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.h (renamed from plugins/Dbx_mdb/src/dbintf.h) | 10 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbmodulechain.cpp (renamed from plugins/Dbx_mdb/src/dbmodulechain.cpp) | 10 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbsettings.cpp (renamed from plugins/Dbx_mdb/src/dbsettings.cpp) | 12 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/dbutils.cpp (renamed from plugins/Dbx_mdb/src/dbutils.cpp) | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/init.cpp (renamed from plugins/Dbx_mdb/src/init.cpp) | 16 | ||||
m--------- | plugins/Dbx_mdbx/src/libmdbx | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/resource.h (renamed from plugins/Dbx_mdb/src/resource.h) | 2 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/stdafx.cxx (renamed from plugins/Dbx_mdb/src/stdafx.cxx) | 0 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/stdafx.h (renamed from plugins/Dbx_mdb/src/stdafx.h) | 2 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/ui.cpp (renamed from plugins/Dbx_mdb/src/ui.cpp) | 14 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/ui.h (renamed from plugins/Dbx_mdb/src/ui.h) | 6 | ||||
-rw-r--r-- | plugins/Dbx_mdbx/src/version.h (renamed from plugins/Dbx_mdb/src/version.h) | 6 |
23 files changed, 111 insertions, 109 deletions
diff --git a/plugins/Dbx_mdb/src/libmdbx b/plugins/Dbx_mdb/src/libmdbx deleted file mode 160000 -Subproject 24a8bdec49ee360bf0412631ff8931de91e109f diff --git a/plugins/Dbx_mdb/dbx_lmdb.vcxproj b/plugins/Dbx_mdbx/dbx_mdbx.vcxproj index a4016eb5b6..54c0214bd5 100644 --- a/plugins/Dbx_mdb/dbx_lmdb.vcxproj +++ b/plugins/Dbx_mdbx/dbx_mdbx.vcxproj @@ -39,11 +39,13 @@ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\libmdbx\mdbx.h" />
+ </ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions Condition="'$(Configuration)'=='Debug'">MDB_DEBUG=5;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions>MDB_VL32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
</Project>
\ No newline at end of file diff --git a/plugins/Dbx_mdb/dbx_lmdb.vcxproj.filters b/plugins/Dbx_mdbx/dbx_mdbx.vcxproj.filters index de5ad9f66c..de5ad9f66c 100644 --- a/plugins/Dbx_mdb/dbx_lmdb.vcxproj.filters +++ b/plugins/Dbx_mdbx/dbx_mdbx.vcxproj.filters diff --git a/plugins/Dbx_mdb/res/dbx_mdb.rc b/plugins/Dbx_mdbx/res/dbx_mdbx.rc index 03c0486fe6..03c0486fe6 100644 --- a/plugins/Dbx_mdb/res/dbx_mdb.rc +++ b/plugins/Dbx_mdbx/res/dbx_mdbx.rc diff --git a/plugins/Dbx_mdb/res/logo.ico b/plugins/Dbx_mdbx/res/logo.ico Binary files differindex f49bbe83d6..f49bbe83d6 100644 --- a/plugins/Dbx_mdb/res/logo.ico +++ b/plugins/Dbx_mdbx/res/logo.ico diff --git a/plugins/Dbx_mdb/res/pass.ico b/plugins/Dbx_mdbx/res/pass.ico Binary files differindex dc47a6ed4f..dc47a6ed4f 100644 --- a/plugins/Dbx_mdb/res/pass.ico +++ b/plugins/Dbx_mdbx/res/pass.ico diff --git a/plugins/Dbx_mdb/res/version.rc b/plugins/Dbx_mdbx/res/version.rc index fdeb14668c..fdeb14668c 100644 --- a/plugins/Dbx_mdb/res/version.rc +++ b/plugins/Dbx_mdbx/res/version.rc diff --git a/plugins/Dbx_mdb/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index 04acc73c19..1195c0af6e 100644 --- a/plugins/Dbx_mdb/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -23,17 +23,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-STDMETHODIMP_(LONG) CDbxMdb::GetContactCount(void)
+STDMETHODIMP_(LONG) CDbxMDBX::GetContactCount(void)
{
return m_contactCount;
}
-STDMETHODIMP_(LONG) CDbxMdb::GetContactSize(void)
+STDMETHODIMP_(LONG) CDbxMDBX::GetContactSize(void)
{
return sizeof(DBCachedContact);
}
-STDMETHODIMP_(LONG) CDbxMdb::DeleteContact(MCONTACT contactID)
+STDMETHODIMP_(LONG) CDbxMDBX::DeleteContact(MCONTACT contactID)
{
if (contactID == 0) // global contact cannot be removed
return 1;
@@ -51,7 +51,7 @@ STDMETHODIMP_(LONG) CDbxMdb::DeleteContact(MCONTACT contactID) MDBX_val key, data;
DBSettingKey keyS = { contactID, 0, 0 };
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
cursor_ptr cursor(txn, m_dbSettings);
key.iov_len = sizeof(keyS); key.iov_base = &keyS;
@@ -68,7 +68,7 @@ STDMETHODIMP_(LONG) CDbxMdb::DeleteContact(MCONTACT contactID) MDBX_val key = { &contactID, sizeof(MCONTACT) };
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
MDBX_CHECK(mdbx_del(trnlck, m_dbContacts, &key, nullptr), 1);
if (trnlck.commit() == MDBX_SUCCESS)
break;
@@ -79,7 +79,7 @@ STDMETHODIMP_(LONG) CDbxMdb::DeleteContact(MCONTACT contactID) return 0;
}
-STDMETHODIMP_(MCONTACT) CDbxMdb::AddContact()
+STDMETHODIMP_(MCONTACT) CDbxMDBX::AddContact()
{
MCONTACT dwContactId = InterlockedIncrement(&m_maxContactId);
@@ -89,7 +89,7 @@ STDMETHODIMP_(MCONTACT) CDbxMdb::AddContact() MDBX_val data = { &cc->dbc, sizeof(cc->dbc) };
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
MDBX_CHECK(mdbx_put(trnlck, m_dbContacts, &key, &data, 0), 0);
if (trnlck.commit() == MDBX_SUCCESS)
break;
@@ -100,7 +100,7 @@ STDMETHODIMP_(MCONTACT) CDbxMdb::AddContact() return dwContactId;
}
-STDMETHODIMP_(BOOL) CDbxMdb::IsDbContact(MCONTACT contactID)
+STDMETHODIMP_(BOOL) CDbxMDBX::IsDbContact(MCONTACT contactID)
{
DBCachedContact *cc = m_cache->GetCachedContact(contactID);
return (cc != NULL);
@@ -108,7 +108,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::IsDbContact(MCONTACT contactID) /////////////////////////////////////////////////////////////////////////////////////////
-void CDbxMdb::GatherContactHistory(MCONTACT hContact, LIST<EventItem> &list)
+void CDbxMDBX::GatherContactHistory(MCONTACT hContact, LIST<EventItem> &list)
{
DBEventSortingKey keyVal = { 0, 0, hContact };
MDBX_val key = { &keyVal, sizeof(keyVal) }, data;
@@ -125,7 +125,7 @@ void CDbxMdb::GatherContactHistory(MCONTACT hContact, LIST<EventItem> &list) }
}
-BOOL CDbxMdb::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
+BOOL CDbxMDBX::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
{
LIST<EventItem> list(1000);
GatherContactHistory(ccSub->contactID, list);
@@ -134,7 +134,7 @@ BOOL CDbxMdb::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) EventItem *EI = list[i];
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
DBEventSortingKey insVal = { EI->eventId, EI->ts, ccMeta->contactID };
MDBX_val key = { &insVal, sizeof(insVal) }, data = { (void*)"", 1 };
mdbx_put(trnlck, m_dbEventsSort, &key, &data, 0);
@@ -148,7 +148,7 @@ BOOL CDbxMdb::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) MDBX_val keyc = { &ccMeta->contactID, sizeof(MCONTACT) }, datac = { &ccMeta->dbc, sizeof(ccMeta->dbc) };
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
MDBX_CHECK(mdbx_put(trnlck, m_dbContacts, &keyc, &datac, 0), 1);
if (trnlck.commit() == MDBX_SUCCESS)
break;
@@ -158,7 +158,7 @@ BOOL CDbxMdb::MetaMergeHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) /////////////////////////////////////////////////////////////////////////////////////////
-BOOL CDbxMdb::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
+BOOL CDbxMDBX::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub)
{
LIST<EventItem> list(1000);
GatherContactHistory(ccSub->contactID, list);
@@ -167,7 +167,7 @@ BOOL CDbxMdb::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) EventItem *EI = list[i];
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
DBEventSortingKey insVal = { EI->eventId, EI->ts, ccMeta->contactID };
MDBX_val key = { &insVal, sizeof(insVal) }, data = { (void*)"", 1 };
mdbx_del(trnlck, m_dbEventsSort, &key, &data);
@@ -181,7 +181,7 @@ BOOL CDbxMdb::MetaSplitHistory(DBCachedContact *ccMeta, DBCachedContact *ccSub) MDBX_val keyc = { &ccMeta->contactID, sizeof(MCONTACT) }, datac = { &ccMeta->dbc, sizeof(ccMeta->dbc) };
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
MDBX_CHECK(mdbx_put(trnlck, m_dbContacts, &keyc, &datac, 0), 1);
if (trnlck.commit() == MDBX_SUCCESS)
break;
@@ -217,7 +217,7 @@ void DBCachedContact::Revert() /////////////////////////////////////////////////////////////////////////////////////////
// initial cycle to fill the contacts' cache
-void CDbxMdb::FillContacts()
+void CDbxMDBX::FillContacts()
{
LIST<DBCachedContact> arContacts(m_contactCount);
diff --git a/plugins/Dbx_mdb/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp index e704420128..6142a7b577 100644 --- a/plugins/Dbx_mdb/src/dbcrypt.cpp +++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp @@ -29,7 +29,7 @@ char DBKey_Crypto_Provider[] = "Provider"; char DBKey_Crypto_Key[] = "Key";
char DBKey_Crypto_IsEncrypted[] = "EncryptedDB";
-CRYPTO_PROVIDER* CDbxMdb::SelectProvider()
+CRYPTO_PROVIDER* CDbxMDBX::SelectProvider()
{
CRYPTO_PROVIDER **ppProvs, *pProv;
int iNumProvs;
@@ -49,7 +49,7 @@ CRYPTO_PROVIDER* CDbxMdb::SelectProvider() else pProv = ppProvs[0];
for (;; Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_val key = { DBKey_Crypto_Provider, sizeof(DBKey_Crypto_Provider) }, value = { pProv->pszName, mir_strlen(pProv->pszName) + 1 };
MDBX_CHECK(mdbx_put(txn, m_dbCrypto, &key, &value, 0), nullptr);
@@ -64,7 +64,7 @@ CRYPTO_PROVIDER* CDbxMdb::SelectProvider() return pProv;
}
-int CDbxMdb::InitCrypt()
+int CDbxMDBX::InitCrypt()
{
CRYPTO_PROVIDER *pProvider;
@@ -119,14 +119,14 @@ int CDbxMdb::InitCrypt() return 0;
}
-void CDbxMdb::StoreKey()
+void CDbxMDBX::StoreKey()
{
size_t iKeyLength = m_crypto->getKeyLength();
BYTE *pKey = (BYTE*)_alloca(iKeyLength);
m_crypto->getKey(pKey, iKeyLength);
for (;; Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_val key = { DBKey_Crypto_Key, sizeof(DBKey_Crypto_Key) }, value = { pKey, iKeyLength };
mdbx_put(txn, m_dbCrypto, &key, &value, 0);
if (txn.commit() == MDBX_SUCCESS)
@@ -135,7 +135,7 @@ void CDbxMdb::StoreKey() SecureZeroMemory(pKey, iKeyLength);
}
-void CDbxMdb::SetPassword(const wchar_t *ptszPassword)
+void CDbxMDBX::SetPassword(const wchar_t *ptszPassword)
{
if (ptszPassword == NULL || *ptszPassword == 0) {
m_bUsesPassword = false;
@@ -150,7 +150,7 @@ void CDbxMdb::SetPassword(const wchar_t *ptszPassword) /////////////////////////////////////////////////////////////////////////////////////////
-int CDbxMdb::EnableEncryption(bool bEncrypted)
+int CDbxMDBX::EnableEncryption(bool bEncrypted)
{
if (m_bEncrypted == bEncrypted)
return 0;
@@ -195,7 +195,7 @@ int CDbxMdb::EnableEncryption(bool bEncrypted) }
for (;; Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
data.iov_len = sizeof(DBEvent) + nNewBlob;
MDBX_CHECK(mdbx_put(txn, m_dbEvents, &key, &data, MDBX_RESERVE), 1);
@@ -214,7 +214,7 @@ int CDbxMdb::EnableEncryption(bool bEncrypted) }
for (;; Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_val key = { DBKey_Crypto_IsEncrypted, sizeof(DBKey_Crypto_IsEncrypted) }, value = { &bEncrypted, sizeof(bool) };
MDBX_CHECK(mdbx_put(txn, m_dbCrypto, &key, &value, 0), 1);
if (txn.commit() == MDBX_SUCCESS)
diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdbx/src/dbevents.cpp index 75ba92e95b..3ad663a5a9 100644 --- a/plugins/Dbx_mdb/src/dbevents.cpp +++ b/plugins/Dbx_mdbx/src/dbevents.cpp @@ -23,13 +23,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-STDMETHODIMP_(LONG) CDbxMdb::GetEventCount(MCONTACT contactID)
+STDMETHODIMP_(LONG) CDbxMDBX::GetEventCount(MCONTACT contactID)
{
DBCachedContact *cc = m_cache->GetCachedContact(contactID);
return (cc == NULL) ? 0 : cc->dbc.dwEventCount;
}
-STDMETHODIMP_(MEVENT) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
+STDMETHODIMP_(MEVENT) CDbxMDBX::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei)
{
if (dbei == NULL) return 0;
if (dbei->timestamp == 0) return 0;
@@ -84,7 +84,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) const auto Revert = [&]() { cc->Revert(); if (ccSub) ccSub->Revert(); };
for (Snapshot();; Revert(), Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_val key = { &dwEventId, sizeof(MEVENT) }, data = { NULL, sizeof(DBEvent) + dbe.cbBlob };
MDBX_CHECK(mdbx_put(txn, m_dbEvents, &key, &data, MDBX_RESERVE), 0);
@@ -125,7 +125,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) return dwEventId;
}
-STDMETHODIMP_(BOOL) CDbxMdb::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent)
+STDMETHODIMP_(BOOL) CDbxMDBX::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent)
{
DBCachedContact *cc = m_cache->GetCachedContact(contactID), *cc2 = nullptr;
if (cc == NULL || cc->dbc.dwEventCount == 0)
@@ -150,7 +150,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) for (Snapshot();; Revert(), Remap()) {
DBEventSortingKey key2 = { contactID, hDbEvent, dbe.timestamp };
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_val key = { &key2, sizeof(key2) }, data;
MDBX_CHECK(mdbx_del(txn, m_dbEventsSort, &key, &data), 1)
@@ -192,7 +192,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteEvent(MCONTACT contactID, MEVENT hDbEvent) return 0;
}
-STDMETHODIMP_(LONG) CDbxMdb::GetBlobSize(MEVENT hDbEvent)
+STDMETHODIMP_(LONG) CDbxMDBX::GetBlobSize(MEVENT hDbEvent)
{
txn_ptr_ro txn(m_txn);
@@ -202,7 +202,7 @@ STDMETHODIMP_(LONG) CDbxMdb::GetBlobSize(MEVENT hDbEvent) return ((const DBEvent*)data.iov_base)->cbBlob;
}
-STDMETHODIMP_(BOOL) CDbxMdb::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
+STDMETHODIMP_(BOOL) CDbxMDBX::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
{
if (dbei == NULL) return 1;
if (dbei->cbBlob > 0 && dbei->pBlob == NULL) {
@@ -243,7 +243,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei) return 0;
}
-void CDbxMdb::FindNextUnread(const txn_ptr &txn, DBCachedContact *cc, DBEventSortingKey &key2)
+void CDbxMDBX::FindNextUnread(const txn_ptr &txn, DBCachedContact *cc, DBEventSortingKey &key2)
{
cursor_ptr cursor(txn, m_dbEventsSort);
@@ -263,7 +263,7 @@ void CDbxMdb::FindNextUnread(const txn_ptr &txn, DBCachedContact *cc, DBEventSor cc->dbc.evFirstUnread = cc->dbc.tsFirstUnread = 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent)
+STDMETHODIMP_(BOOL) CDbxMDBX::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent)
{
if (hDbEvent == 0) return -1;
@@ -274,7 +274,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) uint32_t wRetVal = -1;
for (cc->Snapshot();; cc->Revert(), Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_val key = { &hDbEvent, sizeof(MEVENT) }, data;
MDBX_CHECK(mdbx_get(txn, m_dbEvents, &key, &data), -1);
@@ -306,7 +306,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::MarkEventRead(MCONTACT contactID, MEVENT hDbEvent) return wRetVal;
}
-STDMETHODIMP_(MCONTACT) CDbxMdb::GetEventContact(MEVENT hDbEvent)
+STDMETHODIMP_(MCONTACT) CDbxMDBX::GetEventContact(MEVENT hDbEvent)
{
if (hDbEvent == 0)
return INVALID_CONTACT_ID;
@@ -323,7 +323,7 @@ STDMETHODIMP_(MCONTACT) CDbxMdb::GetEventContact(MEVENT hDbEvent) thread_local uint64_t t_tsLast = 0;
thread_local MEVENT t_evLast = 0;
-STDMETHODIMP_(MEVENT) CDbxMdb::FindFirstEvent(MCONTACT contactID)
+STDMETHODIMP_(MEVENT) CDbxMDBX::FindFirstEvent(MCONTACT contactID)
{
DBEventSortingKey keyVal = { contactID, 0, 0 };
MDBX_val key = { &keyVal, sizeof(keyVal) }, data;
@@ -339,13 +339,13 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindFirstEvent(MCONTACT contactID) return t_evLast = (pKey->hContact == contactID) ? pKey->hEvent : 0;
}
-STDMETHODIMP_(MEVENT) CDbxMdb::FindFirstUnreadEvent(MCONTACT contactID)
+STDMETHODIMP_(MEVENT) CDbxMDBX::FindFirstUnreadEvent(MCONTACT contactID)
{
DBCachedContact *cc = m_cache->GetCachedContact(contactID);
return (cc == NULL) ? 0 : cc->dbc.evFirstUnread;
}
-STDMETHODIMP_(MEVENT) CDbxMdb::FindLastEvent(MCONTACT contactID)
+STDMETHODIMP_(MEVENT) CDbxMDBX::FindLastEvent(MCONTACT contactID)
{
DBEventSortingKey keyVal = { contactID, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF };
MDBX_val key = { &keyVal, sizeof(keyVal) }, data;
@@ -367,7 +367,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindLastEvent(MCONTACT contactID) return t_evLast = (pKey->hContact == contactID) ? pKey->hEvent : 0;
}
-STDMETHODIMP_(MEVENT) CDbxMdb::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent)
+STDMETHODIMP_(MEVENT) CDbxMDBX::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent)
{
if (hDbEvent == 0)
return t_evLast = 0;
@@ -396,7 +396,7 @@ STDMETHODIMP_(MEVENT) CDbxMdb::FindNextEvent(MCONTACT contactID, MEVENT hDbEvent return t_evLast = (pKey->hContact == contactID) ? pKey->hEvent : 0;
}
-STDMETHODIMP_(MEVENT) CDbxMdb::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent)
+STDMETHODIMP_(MEVENT) CDbxMDBX::FindPrevEvent(MCONTACT contactID, MEVENT hDbEvent)
{
if (hDbEvent == 0)
return t_evLast = 0;
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index b0b2b6e1bf..09d350b6c9 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-CDbxMdb::CDbxMdb(const TCHAR *tszFileName, int iMode) :
+CDbxMDBX::CDbxMDBX(const TCHAR *tszFileName, int iMode) :
m_safetyMode(true),
m_bReadOnly((iMode & DBMODE_READONLY) != 0),
m_bShared((iMode & DBMODE_SHARED) != 0),
@@ -32,15 +32,15 @@ CDbxMdb::CDbxMdb(const TCHAR *tszFileName, int iMode) : m_tszProfileName = mir_wstrdup(tszFileName);
InitDbInstance(this);
- mdbx_env_create(&m_pMdbEnv);
- mdbx_env_set_maxdbs(m_pMdbEnv, 10);
- mdbx_env_set_userctx(m_pMdbEnv, this);
- // mdbx_env_set_assert(m_pMdbEnv, LMDBX_FailAssert);
+ mdbx_env_create(&m_env);
+ mdbx_env_set_maxdbs(m_env, 10);
+ mdbx_env_set_userctx(m_env, this);
+ // mdbx_env_set_assert(m_env, MDBX_FailAssert);
}
-CDbxMdb::~CDbxMdb()
+CDbxMDBX::~CDbxMDBX()
{
- mdbx_env_close(m_pMdbEnv);
+ mdbx_env_close(m_env);
DestroyServiceFunction(hService);
UnhookEvent(hHook);
@@ -61,13 +61,13 @@ CDbxMdb::~CDbxMdb() mir_free(m_tszProfileName);
}
-int CDbxMdb::Load(bool bSkipInit)
+int CDbxMDBX::Load(bool bSkipInit)
{
if (Map() != MDBX_SUCCESS)
return EGROKPRF_CANTREAD;
if (!bSkipInit) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
unsigned int defFlags = MDBX_CREATE;
@@ -102,7 +102,7 @@ int CDbxMdb::Load(bool bSkipInit) {
MDBX_val key, val;
- mdbx_txn_begin(m_pMdbEnv, nullptr, MDBX_RDONLY, &m_txn);
+ mdbx_txn_begin(m_env, nullptr, MDBX_RDONLY, &m_txn);
mdbx_cursor_open(m_txn, m_dbEvents, &m_curEvents);
if (mdbx_cursor_get(m_curEvents, &key, &val, MDBX_LAST) == MDBX_SUCCESS)
@@ -146,7 +146,7 @@ int CDbxMdb::Load(bool bSkipInit) return EGROKPRF_NOERROR;
}
-int CDbxMdb::Create(void)
+int CDbxMDBX::Create(void)
{
return (Map() == MDBX_SUCCESS) ? 0 : EGROKPRF_CANTREAD;
}
@@ -154,7 +154,7 @@ int CDbxMdb::Create(void) size_t iDefHeaderOffset = 0;
BYTE bDefHeader[] = { 0 };
-int CDbxMdb::Check(void)
+int CDbxMDBX::Check(void)
{
FILE *pFile = _wfopen(m_tszProfileName, L"rb");
if (pFile == nullptr)
@@ -170,32 +170,32 @@ int CDbxMdb::Check(void) return (memcmp(buf, bDefHeader, _countof(bDefHeader))) ? EGROKPRF_UNKHEADER : 0;
}
-int CDbxMdb::PrepareCheck(int*)
+int CDbxMDBX::PrepareCheck(int*)
{
InitModules();
return InitCrypt();
}
-STDMETHODIMP_(void) CDbxMdb::SetCacheSafetyMode(BOOL bIsSet)
+STDMETHODIMP_(void) CDbxMDBX::SetCacheSafetyMode(BOOL bIsSet)
{
m_safetyMode = bIsSet != 0;
}
-int CDbxMdb::Map()
+int CDbxMDBX::Map()
{
unsigned int mode = MDBX_NOSUBDIR | MDBX_MAPASYNC | MDBX_WRITEMAP | MDBX_NOSYNC;
if (m_bReadOnly)
mode |= MDBX_RDONLY;
- mdbx_env_open(m_pMdbEnv, _T2A(m_tszProfileName), mode, 0664);
- mdbx_env_set_mapsize(m_pMdbEnv, 0x1000000);
+ mdbx_env_open(m_env, _T2A(m_tszProfileName), mode, 0664);
+ mdbx_env_set_mapsize(m_env, 0x1000000);
return MDBX_SUCCESS;
}
-bool CDbxMdb::Remap()
+bool CDbxMDBX::Remap()
{
MDBX_envinfo ei;
- mdbx_env_info(m_pMdbEnv, &ei, sizeof(ei));
- return mdbx_env_set_geometry(m_pMdbEnv, -1, -1, ei.mi_mapsize + 0x100000, 0x100000, -1, -1) == MDBX_SUCCESS;
+ mdbx_env_info(m_env, &ei, sizeof(ei));
+ return mdbx_env_set_geometry(m_env, -1, -1, ei.mi_mapsize + 0x100000, 0x100000, -1, -1) == MDBX_SUCCESS;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -221,12 +221,12 @@ EXTERN_C void __cdecl dbpanic(void *) }
-EXTERN_C void LMDBX_FailAssert(MDBX_env *env, const char *text)
+EXTERN_C void MDBX_FailAssert(MDBX_env *env, const char *text)
{
- ((CDbxMdb*)mdbx_env_get_userctx(env))->DatabaseCorruption(_A2T(text));
+ ((CDbxMDBX*)mdbx_env_get_userctx(env))->DatabaseCorruption(_A2T(text));
}
-EXTERN_C void LMDBX_Log(const char *fmt, ...)
+EXTERN_C void MDBX_Log(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -234,7 +234,7 @@ EXTERN_C void LMDBX_Log(const char *fmt, ...) va_end(args);
}
-void CDbxMdb::DatabaseCorruption(const TCHAR *text)
+void CDbxMDBX::DatabaseCorruption(const TCHAR *text)
{
int kill = 0;
@@ -260,20 +260,20 @@ void CDbxMdb::DatabaseCorruption(const TCHAR *text) ///////////////////////////////////////////////////////////////////////////////
// MIDatabaseChecker
-typedef int (CDbxMdb::*CheckWorker)(int);
+typedef int (CDbxMDBX::*CheckWorker)(int);
-int CDbxMdb::Start(DBCHeckCallback *callback)
+int CDbxMDBX::Start(DBCHeckCallback *callback)
{
cb = callback;
return ERROR_SUCCESS;
}
-int CDbxMdb::CheckDb(int, int)
+int CDbxMDBX::CheckDb(int, int)
{
return ERROR_OUT_OF_PAPER;
}
-void CDbxMdb::Destroy()
+void CDbxMDBX::Destroy()
{
delete this;
}
diff --git a/plugins/Dbx_mdb/src/dbintf.h b/plugins/Dbx_mdbx/src/dbintf.h index 9c9b88fcf9..fa5595dba3 100644 --- a/plugins/Dbx_mdb/src/dbintf.h +++ b/plugins/Dbx_mdbx/src/dbintf.h @@ -124,12 +124,12 @@ struct EventItem MEVENT eventId;
};
-struct CDbxMdb : public MDatabaseCommon, public MIDatabaseChecker, public MZeroedObject
+struct CDbxMDBX : public MDatabaseCommon, public MIDatabaseChecker, public MZeroedObject
{
- friend class LMDBEventCursor;
+ friend class MDBXEventCursor;
- CDbxMdb(const TCHAR *tszFileName, int mode);
- virtual ~CDbxMdb();
+ CDbxMDBX(const TCHAR *tszFileName, int mode);
+ virtual ~CDbxMDBX();
int Load(bool bSkipInit);
int Create(void);
@@ -203,7 +203,7 @@ public: MICryptoEngine *m_crypto;
protected:
- MDBX_env *m_pMdbEnv;
+ MDBX_env *m_env;
CMDBX_txn_ro m_txn;
MDBX_dbi m_dbGlobal;
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp index dc59798eb3..b9b29b4c5a 100644 --- a/plugins/Dbx_mdb/src/dbmodulechain.cpp +++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-int CDbxMdb::InitModules()
+int CDbxMDBX::InitModules()
{
txn_ptr_ro trnlck(m_txn);
cursor_ptr_ro cursor(m_curModules);
@@ -38,14 +38,14 @@ int CDbxMdb::InitModules() }
// will create the offset if it needs to
-uint32_t CDbxMdb::GetModuleID(const char *szName)
+uint32_t CDbxMDBX::GetModuleID(const char *szName)
{
uint32_t iHash = mir_hashstr(szName);
if (m_Modules.find(iHash) == m_Modules.end()) {
MDBX_val key = { &iHash, sizeof(iHash) }, data = { (void*)szName, strlen(szName) + 1 };
for (;; Remap()) {
- txn_ptr txn(m_pMdbEnv);
+ txn_ptr txn(m_env);
MDBX_CHECK(mdbx_put(txn, m_dbModules, &key, &data, 0), -1);
if (txn.commit() == MDBX_SUCCESS)
break;
@@ -56,13 +56,13 @@ uint32_t CDbxMdb::GetModuleID(const char *szName) return iHash;
}
-char* CDbxMdb::GetModuleName(uint32_t dwId)
+char* CDbxMDBX::GetModuleName(uint32_t dwId)
{
auto it = m_Modules.find(dwId);
return it != m_Modules.end() ? const_cast<char*>(it->second.c_str()) : nullptr;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam)
+STDMETHODIMP_(BOOL) CDbxMDBX::EnumModuleNames(DBMODULEENUMPROC pFunc, void *pParam)
{
for (auto it = m_Modules.begin(); it != m_Modules.end(); ++it)
if (int ret = pFunc(it->second.c_str(), pParam))
diff --git a/plugins/Dbx_mdb/src/dbsettings.cpp b/plugins/Dbx_mdbx/src/dbsettings.cpp index 0337dce06c..eacf9d82c4 100644 --- a/plugins/Dbx_mdb/src/dbsettings.cpp +++ b/plugins/Dbx_mdbx/src/dbsettings.cpp @@ -36,7 +36,7 @@ static bool ValidLookupName(LPCSTR szModule, LPCSTR szSetting) return true;
}
-int CDbxMdb::GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic)
+int CDbxMDBX::GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic)
{
if (szSetting == NULL || szModule == NULL)
return 1;
@@ -193,7 +193,7 @@ LBL_Seek: return 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::WriteContactSetting(MCONTACT contactID, DBCONTACTWRITESETTING *dbcws)
+STDMETHODIMP_(BOOL) CDbxMDBX::WriteContactSetting(MCONTACT contactID, DBCONTACTWRITESETTING *dbcws)
{
if (dbcws == NULL || dbcws->szSetting == NULL || dbcws->szModule == NULL || m_bReadOnly)
return 1;
@@ -306,7 +306,7 @@ LBL_WriteString: }
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
MDBX_CHECK(mdbx_put(trnlck, m_dbSettings, &key, &data, MDBX_RESERVE), 1);
BYTE *pBlob = (BYTE*)data.iov_base;
@@ -339,7 +339,7 @@ LBL_WriteString: return 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting)
+STDMETHODIMP_(BOOL) CDbxMDBX::DeleteContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting)
{
if (!szModule || !szSetting)
return 1;
@@ -359,7 +359,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteContactSetting(MCONTACT contactID, LPCSTR szM MDBX_val key = { keyVal, sizeof(DBSettingKey) + settingNameLen };
for (;; Remap()) {
- txn_ptr trnlck(m_pMdbEnv);
+ txn_ptr trnlck(m_env);
MDBX_CHECK(mdbx_del(trnlck, m_dbSettings, &key, nullptr), 1);
if (trnlck.commit() == MDBX_SUCCESS)
break;
@@ -377,7 +377,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::DeleteContactSetting(MCONTACT contactID, LPCSTR szM return 0;
}
-STDMETHODIMP_(BOOL) CDbxMdb::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param)
+STDMETHODIMP_(BOOL) CDbxMDBX::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnumProc, const char *szModule, void *param)
{
int result = -1;
diff --git a/plugins/Dbx_mdb/src/dbutils.cpp b/plugins/Dbx_mdbx/src/dbutils.cpp index 147b43ef30..147b43ef30 100644 --- a/plugins/Dbx_mdb/src/dbutils.cpp +++ b/plugins/Dbx_mdbx/src/dbutils.cpp diff --git a/plugins/Dbx_mdb/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp index 3af9855292..5ab23c14f8 100644 --- a/plugins/Dbx_mdb/src/init.cpp +++ b/plugins/Dbx_mdbx/src/init.cpp @@ -41,21 +41,21 @@ static PLUGININFOEX pluginInfo = HINSTANCE g_hInst = NULL;
-LIST<CDbxMdb> g_Dbs(1, HandleKeySortT);
+LIST<CDbxMDBX> g_Dbs(1, HandleKeySortT);
/////////////////////////////////////////////////////////////////////////////////////////
// returns 0 if the profile is created, EMKPRF*
static int makeDatabase(const TCHAR *profile)
{
- std::unique_ptr<CDbxMdb> db(new CDbxMdb(profile, 0));
+ std::unique_ptr<CDbxMDBX> db(new CDbxMDBX(profile, 0));
return db->Create();
}
// returns 0 if the given profile has a valid header
static int grokHeader(const TCHAR *profile)
{
- std::unique_ptr<CDbxMdb> db(new CDbxMdb(profile, DBMODE_SHARED | DBMODE_READONLY));
+ std::unique_ptr<CDbxMDBX> db(new CDbxMDBX(profile, DBMODE_SHARED | DBMODE_READONLY));
return db->Check();
}
@@ -65,7 +65,7 @@ static MIDatabase* LoadDatabase(const TCHAR *profile, BOOL bReadOnly) // set the memory, lists & UTF8 manager
mir_getLP(&pluginInfo);
- std::unique_ptr<CDbxMdb> db(new CDbxMdb(profile, (bReadOnly) ? DBMODE_READONLY : 0));
+ std::unique_ptr<CDbxMDBX> db(new CDbxMDBX(profile, (bReadOnly) ? DBMODE_READONLY : 0));
if (db->Load(false) != ERROR_SUCCESS)
return NULL;
@@ -75,14 +75,14 @@ static MIDatabase* LoadDatabase(const TCHAR *profile, BOOL bReadOnly) static int UnloadDatabase(MIDatabase *db)
{
- g_Dbs.remove((CDbxMdb*)db);
- delete (CDbxMdb*)db;
+ g_Dbs.remove((CDbxMDBX*)db);
+ delete (CDbxMDBX*)db;
return 0;
}
MIDatabaseChecker* CheckDb(const TCHAR *profile, int *error)
{
- std::unique_ptr<CDbxMdb> db(new CDbxMdb(profile, DBMODE_READONLY));
+ std::unique_ptr<CDbxMDBX> db(new CDbxMDBX(profile, DBMODE_READONLY));
if (db->Load(true) != ERROR_SUCCESS) {
*error = ERROR_ACCESS_DENIED;
return NULL;
@@ -98,7 +98,7 @@ static DATABASELINK dblink = {
sizeof(DATABASELINK),
"dbx_mdbx",
- L"LMDBx database driver",
+ L"MDBX database driver",
makeDatabase,
grokHeader,
LoadDatabase,
diff --git a/plugins/Dbx_mdbx/src/libmdbx b/plugins/Dbx_mdbx/src/libmdbx new file mode 160000 +Subproject 18432ebfab158ad2ae68a8a993040952f814dd9 diff --git a/plugins/Dbx_mdb/src/resource.h b/plugins/Dbx_mdbx/src/resource.h index 21f82d6f05..564189306d 100644 --- a/plugins/Dbx_mdb/src/resource.h +++ b/plugins/Dbx_mdbx/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}}
// Включаемый файл, созданный в Microsoft Visual C++.
-// Используется d:\Others\SVN\MirandaNG\trunk\plugins\Dbx_mdb\res\dbx_mdb.rc
+// Используется d:\Others\SVN\MirandaNG\trunk\plugins\Dbx_mdb\res\dbx_mdbx.rc
//
#define IDREMOVE 3
#define IDI_ICONPASS 100
diff --git a/plugins/Dbx_mdb/src/stdafx.cxx b/plugins/Dbx_mdbx/src/stdafx.cxx index e579779bcc..e579779bcc 100644 --- a/plugins/Dbx_mdb/src/stdafx.cxx +++ b/plugins/Dbx_mdbx/src/stdafx.cxx diff --git a/plugins/Dbx_mdb/src/stdafx.h b/plugins/Dbx_mdbx/src/stdafx.h index c6a4edc01e..25e91a4001 100644 --- a/plugins/Dbx_mdb/src/stdafx.h +++ b/plugins/Dbx_mdbx/src/stdafx.h @@ -164,6 +164,6 @@ public: #include "version.h"
extern HINSTANCE g_hInst;
-extern LIST<CDbxMdb> g_Dbs;
+extern LIST<CDbxMDBX> g_Dbs;
#include "ui.h"
diff --git a/plugins/Dbx_mdb/src/ui.cpp b/plugins/Dbx_mdbx/src/ui.cpp index 6067a0d3d2..6cf2f6bee8 100644 --- a/plugins/Dbx_mdb/src/ui.cpp +++ b/plugins/Dbx_mdbx/src/ui.cpp @@ -42,7 +42,7 @@ void LanguageChanged(HWND hwndDlg) /////////////////////////////////////////////////////////////////////////////////////////
-static bool CheckOldPassword(HWND hwndDlg, CDbxMdb *db)
+static bool CheckOldPassword(HWND hwndDlg, CDbxMDBX *db)
{
if (db->usesPassword())
{
@@ -144,7 +144,7 @@ static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam static INT_PTR ChangePassword(void* obj, WPARAM, LPARAM)
{
- CDbxMdb *db = (CDbxMdb*)obj;
+ CDbxMDBX *db = (CDbxMDBX*)obj;
DlgChangePassParam param = { db };
DialogBoxParam(g_hInst, MAKEINTRESOURCE(db->usesPassword() ? IDD_CHANGEPASS : IDD_NEWPASS), 0, sttChangePassword, (LPARAM)¶m);
return 0;
@@ -159,23 +159,23 @@ static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM) odp.position = -790000000;
odp.flags = ODPF_BOLDGROUPS;
odp.szTitle.a = LPGEN("Database");
- odp.pDialog = new COptionsDialog((CDbxMdb*)obj);
+ odp.pDialog = new COptionsDialog((CDbxMDBX*)obj);
Options_AddPage(wParam, &odp);
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
-void CDbxMdb::UpdateMenuItem()
+void CDbxMDBX::UpdateMenuItem()
{
Menu_ModifyItem(hSetPwdMenu, _A2T(GetMenuTitle()), iconList[1].hIcolib);
}
static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
{
- CDbxMdb *db = (CDbxMdb*)obj;
+ CDbxMDBX *db = (CDbxMDBX*)obj;
- Icon_Register(g_hInst, LPGEN("Database"), iconList, _countof(iconList), "lmdb");
+ Icon_Register(g_hInst, LPGEN("Database"), iconList, _countof(iconList), "mdbx");
HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, db);
@@ -195,7 +195,7 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
-void CDbxMdb::InitDialogs()
+void CDbxMDBX::InitDialogs()
{
hService = CreateServiceFunctionObj(MS_DB_CHANGEPASSWORD, ChangePassword, this);
hHook = HookEventObj(ME_SYSTEM_MODULESLOADED, OnModulesLoaded, this);
diff --git a/plugins/Dbx_mdb/src/ui.h b/plugins/Dbx_mdbx/src/ui.h index b20a43d623..704c380cfa 100644 --- a/plugins/Dbx_mdb/src/ui.h +++ b/plugins/Dbx_mdbx/src/ui.h @@ -11,7 +11,7 @@ class COptionsDialog : public CDlgBase CCtrlCheck m_chkStandart;
CCtrlCheck m_chkTotal;
CCtrlButton m_btnChangePass;
- CDbxMdb *m_db;
+ CDbxMDBX *m_db;
void OnInitDialog()
{
@@ -33,7 +33,7 @@ class COptionsDialog : public CDlgBase }
public:
- COptionsDialog(CDbxMdb *db) :
+ COptionsDialog(CDbxMDBX *db) :
CDlgBase(g_hInst, IDD_OPTIONS),
m_chkStandart(this, IDC_STANDARD),
m_chkTotal(this, IDC_TOTAL),
@@ -101,7 +101,7 @@ public: struct DlgChangePassParam
{
- CDbxMdb *db;
+ CDbxMDBX *db;
TCHAR newPass[100];
unsigned short wrongPass;
};
diff --git a/plugins/Dbx_mdb/src/version.h b/plugins/Dbx_mdbx/src/version.h index 6d7f18b748..0b97e64886 100644 --- a/plugins/Dbx_mdb/src/version.h +++ b/plugins/Dbx_mdbx/src/version.h @@ -5,9 +5,9 @@ #include <stdver.h>
-#define __PLUGIN_NAME "Miranda NG LMDB database driver"
-#define __FILENAME "Dbx_mdb.dll"
+#define __PLUGIN_NAME "Miranda NG MDBX database driver (https://github.com/leo-yuriev/libmdbx)"
+#define __FILENAME "dbx_mdbx.dll"
#define __DESCRIPTION "Provides Miranda database support: global settings, contacts, history, settings per contact."
#define __AUTHOR "Miranda-NG project"
-#define __AUTHORWEB "https://miranda-ng.org/p/Dbx_mdb/"
+#define __AUTHORWEB "https://miranda-ng.org/p/dbx_mdbx/"
#define __COPYRIGHT "© 2015-18 Miranda NG team"
|