summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-23 11:37:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-23 11:37:58 +0000
commit05ccb4dcd0b507fb000426667ed3f25c0b93db2b (patch)
tree653046dd7cf8fad5449706c1c97edf5e915c5881 /src/mir_core
parent295ead17d6d2d2eb9c82cd12d8b119572f30fe3d (diff)
db_set_resident - helper for MIDataBase::SetSettingResident
git-svn-id: http://svn.miranda-ng.org/main/trunk@5093 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-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