diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-23 21:08:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-23 21:08:39 +0300 |
commit | 01b51542b22ea4c36001324b6014e3f7667c0981 (patch) | |
tree | 7cbd3d36be89dec75649529e441a23d1e3ebe8c1 /include/m_db_int.h | |
parent | f37c4afa26480bddde72d97c96ae9c8f3ef0ccea (diff) |
common database code to be concentrated in mir_app
Diffstat (limited to 'include/m_db_int.h')
-rw-r--r-- | include/m_db_int.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/m_db_int.h b/include/m_db_int.h index f989e91344..7ab866f884 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -80,7 +80,7 @@ interface MIDatabaseCache : public MZeroedObject STDMETHOD_(DBVARIANT*, GetCachedValuePtr)(MCONTACT contactID, char *szSetting, int bAllocate) PURE;
};
-interface MIDatabase
+interface MIR_APP_EXPORT MIDatabase
{
MIDatabaseCache* m_cache;
@@ -128,6 +128,28 @@ interface MIDatabase STDMETHOD_(BOOL, MetaSplitHistory)(DBCachedContact *ccMeta, DBCachedContact *ccSub) PURE;
};
+class MIR_APP_EXPORT MDatabaseCommon : public MIDatabase
+{
+
+protected:
+ int m_codePage;
+
+ mir_cs m_csDbAccess;
+ LIST<char> m_lResidentSettings;
+
+protected:
+ MDatabaseCommon();
+
+ STDMETHOD_(BOOL, GetContactSettingWorker)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic) PURE;
+
+public:
+ STDMETHODIMP_(BOOL) GetContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+ STDMETHODIMP_(BOOL) GetContactSettingStr(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+ STDMETHODIMP_(BOOL) GetContactSettingStatic(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+ STDMETHODIMP_(BOOL) FreeVariant(DBVARIANT *dbv);
+ STDMETHODIMP_(BOOL) SetSettingResident(BOOL bIsResident, const char *pszSettingName);
+};
+
///////////////////////////////////////////////////////////////////////////////
// basic database checker interface
|