summaryrefslogtreecommitdiff
path: root/include/m_db_int.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-12 20:55:18 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-12 20:55:18 +0300
commitcdf4c110510a39c162b469ecbd6f69571019cf69 (patch)
treef7e47d684c94d877a141fc64ade0ca471aa1fce1 /include/m_db_int.h
parent376f5d4859ba96bff4a3c4d7c9622664b9e578d7 (diff)
initial version of profile compactor for MDBX
Diffstat (limited to 'include/m_db_int.h')
-rw-r--r--include/m_db_int.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/m_db_int.h b/include/m_db_int.h
index 036fc8446b..b549291385 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -125,8 +125,12 @@ interface MIR_APP_EXPORT MIDatabase
STDMETHOD_(BOOL, MetaSetDefault)(DBCachedContact*) PURE;
STDMETHOD_(BOOL, MetaMergeHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE;
STDMETHOD_(BOOL, MetaSplitHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE;
+
+ STDMETHOD_(BOOL, Compact)(void) PURE;
};
+/////////////////////////////////////////////////////////////////////////////////////////
+
class MIR_APP_EXPORT MDatabaseCommon : public MIDatabase
{
@@ -164,6 +168,8 @@ public:
STDMETHODIMP_(BOOL) EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam);
STDMETHODIMP_(BOOL) SetSettingResident(BOOL bIsResident, const char *pszSettingName);
+
+ STDMETHODIMP_(BOOL) Compact(void);
};
///////////////////////////////////////////////////////////////////////////////
@@ -184,9 +190,11 @@ public:
// makeDatabase() error codes
#define EMKPRF_CREATEFAILED 1 // for some reason CreateFile() didnt like something
+#define MDB_CAPS_COMPACT 0x0001 // database can be compacted
+
struct DATABASELINK
{
- int cbSize;
+ int capabilities;
char* szShortName; // uniqie short database name
wchar_t* szFullName; // in English, auto-translated by the core