summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/db.cpp11
-rw-r--r--src/mir_core/mir_core.def1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp
index 82013cc3f3..7b04b6eab4 100644
--- a/src/mir_core/db.cpp
+++ b/src/mir_core/db.cpp
@@ -311,3 +311,14 @@ extern "C" MIR_CORE_DLL(void) db_setCurrent(MIDatabase* _db)
{
currDb = _db;
}
+
+MIR_CORE_DLL(BOOL) db_set_resident(const char *szModule, const char *szService, BOOL bEnable)
+{
+ if (currDb == NULL || szModule == NULL || szService == NULL)
+ return FALSE;
+
+ char str[MAXMODULELABELLENGTH * 2];
+ strncpy_s(str,szModule,strlen(szModule));
+ strncat_s(str,szService,strlen(szService));
+ return currDb->SetSettingResident(bEnable, str);
+}
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index 4a57e3a945..d72f8e0087 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -164,3 +164,4 @@ mir_base64_decode @161
ProtoServiceExists @162
ProtoBroadcastAck @163
ProtoCallService @164
+db_set_resident @165