summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/mir_app.def2
-rw-r--r--src/mir_app/src/mir_app64.def2
-rw-r--r--src/mir_app/src/proto_utils.cpp24
3 files changed, 28 insertions, 0 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 39e0e08b34..a7a3b3312b 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -807,3 +807,5 @@ Srmm_CreateHotkey @886 NONAME
?bStripFormat@Chat@@3V?$CMOption@_N@@A @908 NONAME
?bTimeStampEventColour@Chat@@3V?$CMOption@_N@@A @909 NONAME
?bTopicOnClist@Chat@@3V?$CMOption@_N@@A @910 NONAME
+?getBlob@PROTO_INTERFACE@@QAE?AVMBinBuffer@@IPBD@Z @911 NONAME
+?getBlob@PROTO_INTERFACE@@QAE?AVMBinBuffer@@PBD@Z @912 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 2a03307191..7cfbe15e28 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -807,3 +807,5 @@ Srmm_CreateHotkey @886 NONAME
?bStripFormat@Chat@@3V?$CMOption@_N@@A @908 NONAME
?bTimeStampEventColour@Chat@@3V?$CMOption@_N@@A @909 NONAME
?bTopicOnClist@Chat@@3V?$CMOption@_N@@A @910 NONAME
+?getBlob@PROTO_INTERFACE@@QEAA?AVMBinBuffer@@IPEBD@Z @911 NONAME
+?getBlob@PROTO_INTERFACE@@QEAA?AVMBinBuffer@@PEBD@Z @912 NONAME
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp
index 1c2944120e..79bd7012fa 100644
--- a/src/mir_app/src/proto_utils.cpp
+++ b/src/mir_app/src/proto_utils.cpp
@@ -120,6 +120,30 @@ void PROTO_INTERFACE::setAllContactStatuses(int iStatus, bool bSkipChats)
}
/////////////////////////////////////////////////////////////////////////////////////////
+
+MBinBuffer PROTO_INTERFACE::getBlob(const char *pszSetting)
+{
+ MBinBuffer buf;
+ DBVARIANT dbv = {DBVT_BLOB};
+ if (!db_get(0, m_szModuleName, pszSetting, &dbv)) {
+ buf.assign(dbv.pbVal, dbv.cpbVal);
+ db_free(&dbv);
+ }
+ return buf;
+}
+
+MBinBuffer PROTO_INTERFACE::getBlob(MCONTACT hContact, const char *pszSetting)
+{
+ MBinBuffer buf;
+ DBVARIANT dbv = {DBVT_BLOB};
+ if (!db_get(hContact, m_szModuleName, pszSetting, &dbv)) {
+ buf.assign(dbv.pbVal, dbv.cpbVal);
+ db_free(&dbv);
+ }
+ return buf;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// protocol services
MIR_APP_DLL(void) ProtoCreateService(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFunc serviceProc)