summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-30 10:50:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-30 10:50:46 +0000
commita546606709e6bb72e01eb38b2c8c8756608fd5d6 (patch)
tree33110aeaabdf001d7cc10973c2d2c5fba621ae21 /src
parent6e158816887eb9421fa5c1d3f182aafe829dda0d (diff)
forgotten helper - db_set (writes a DBVARIANT)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5190 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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 08703f6581..f665899073 100644
--- a/src/mir_core/db.cpp
+++ b/src/mir_core/db.cpp
@@ -131,6 +131,17 @@ MIR_CORE_DLL(wchar_t*) db_get_wsa(HANDLE hContact, const char *szModule, const c
/////////////////////////////////////////////////////////////////////////////////////////
// setting data
+MIR_CORE_DLL(INT_PTR) db_set(HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+{
+ if (currDb == NULL) return 1;
+
+ DBCONTACTWRITESETTING cws;
+ cws.szModule = szModule;
+ cws.szSetting = szSetting;
+ cws.value = *dbv;
+ return currDb->WriteContactSetting(hContact, &cws);
+}
+
MIR_CORE_DLL(INT_PTR) db_set_b(HANDLE hContact, const char *szModule, const char *szSetting, BYTE val)
{
if (currDb == NULL) return 1;
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index d72f8e0087..1b3fbd6df1 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -165,3 +165,4 @@ ProtoServiceExists @162
ProtoBroadcastAck @163
ProtoCallService @164
db_set_resident @165
+db_set @166