summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-11-24 14:23:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-11-24 14:23:57 +0300
commit4854f0db22d0648823d30bc2f1f56b056d893b97 (patch)
tree9365b82bfd9240ea65d8166846df276bd997c091 /src
parent12c7118ad289e7089c60f4cd30905e8eb3e98923 (diff)
EnumResidentSettings moved to MDatabaseCommon
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/MDatabaseCommon.cpp18
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/mir_app/src/MDatabaseCommon.cpp b/src/mir_app/src/MDatabaseCommon.cpp
index 67e13b8614..34f1d68caf 100644
--- a/src/mir_app/src/MDatabaseCommon.cpp
+++ b/src/mir_app/src/MDatabaseCommon.cpp
@@ -55,6 +55,7 @@ int MDatabaseCommon::CheckProto(DBCachedContact *cc, const char *proto)
}
/////////////////////////////////////////////////////////////////////////////////////////
+// Modules
static int sttEnumVars(const char *szVarName, void *param)
{
@@ -76,6 +77,7 @@ BOOL MDatabaseCommon::DeleteModule(MCONTACT hContact, LPCSTR szModule)
}
/////////////////////////////////////////////////////////////////////////////////////////
+// Contacts
STDMETHODIMP_(MCONTACT) MDatabaseCommon::FindFirstContact(const char *szProto)
{
@@ -108,6 +110,7 @@ STDMETHODIMP_(MCONTACT) MDatabaseCommon::FindNextContact(MCONTACT contactID, con
}
/////////////////////////////////////////////////////////////////////////////////////////
+// Encryption support
BOOL MDatabaseCommon::IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting)
{
@@ -125,6 +128,7 @@ BOOL MDatabaseCommon::IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting)
}
/////////////////////////////////////////////////////////////////////////////////////////
+// Meta-contacts support
BOOL MDatabaseCommon::MetaDetouchSub(DBCachedContact *cc, int nSub)
{
@@ -142,6 +146,7 @@ BOOL MDatabaseCommon::MetaSetDefault(DBCachedContact *cc)
}
/////////////////////////////////////////////////////////////////////////////////////////
+// Getting settings
STDMETHODIMP_(BOOL) MDatabaseCommon::GetContactSetting(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv)
{
@@ -277,6 +282,19 @@ STDMETHODIMP_(BOOL) MDatabaseCommon::FreeVariant(DBVARIANT *dbv)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// Resident settings
+
+STDMETHODIMP_(BOOL) MDatabaseCommon::EnumResidentSettings(DBMODULEENUMPROC pFunc, void *pParam)
+{
+ for (int i = 0; i < m_lResidentSettings.getCount(); i++) {
+ int ret = pFunc(m_lResidentSettings[i], pParam);
+ if (ret)
+ return ret;
+ }
+ return 0;
+}
+
STDMETHODIMP_(BOOL) MDatabaseCommon::SetSettingResident(BOOL bIsResident, const char *pszSettingName)
{
char *szSetting = m_cache->GetCachedSetting(nullptr, pszSettingName, 0, (int)mir_strlen(pszSettingName));
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index cff4a26030..089e2f3ae4 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -486,3 +486,4 @@ Clist_SetStatusMode @464
?FindNextContact@MDatabaseCommon@@UAGIIPBD@Z @491 NONAME
?MetaDetouchSub@MDatabaseCommon@@UAGHPAUDBCachedContact@@H@Z @492 NONAME
?MetaSetDefault@MDatabaseCommon@@UAGHPAUDBCachedContact@@@Z @493 NONAME
+?EnumResidentSettings@MDatabaseCommon@@UAGHP6AHPBDPAX@Z1@Z @494 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 4bb67009d7..6970a920e7 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -486,3 +486,4 @@ Clist_SetStatusMode @464
?FindNextContact@MDatabaseCommon@@UEAAIIPEBD@Z @491 NONAME
?MetaDetouchSub@MDatabaseCommon@@UEAAHPEAUDBCachedContact@@H@Z @492 NONAME
?MetaSetDefault@MDatabaseCommon@@UEAAHPEAUDBCachedContact@@@Z @493 NONAME
+?EnumResidentSettings@MDatabaseCommon@@UEAAHP6AHPEBDPEAX@Z1@Z @494 NONAME