summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-09-19 15:34:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-09-19 15:34:32 +0300
commit77ea5b95cd68a295068394e9d0c505f0b26221ba (patch)
tree5b3dca3184ba08a040df418bd638efbe8a9ed7c2 /src
parent8dd934a1e0e80b1c14194195f4664bc9a6e685cc (diff)
GetEventById & SetEventId - two new methods to operate with events by their server ids
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/MDatabaseReadonly.cpp12
-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_core/src/db.cpp10
-rw-r--r--src/mir_core/src/mir_core.def2
-rw-r--r--src/mir_core/src/mir_core64.def2
6 files changed, 30 insertions, 0 deletions
diff --git a/src/mir_app/src/MDatabaseReadonly.cpp b/src/mir_app/src/MDatabaseReadonly.cpp
index 7a75f0a9d3..4464715ae1 100644
--- a/src/mir_app/src/MDatabaseReadonly.cpp
+++ b/src/mir_app/src/MDatabaseReadonly.cpp
@@ -129,3 +129,15 @@ BOOL MDatabaseReadonly::MetaSplitHistory(DBCachedContact*, DBCachedContact*)
{
return 1;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+MEVENT MDatabaseReadonly::GetEventById(LPCSTR, LPCSTR)
+{
+ return 0;
+}
+
+BOOL MDatabaseReadonly::SetEventId(LPCSTR, MEVENT, LPCSTR)
+{
+ return FALSE;
+}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index a2ee225220..bbf32ae9ce 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -650,3 +650,5 @@ Miranda_WaitOnHandleEx @663
?WriteContactSetting@MDatabaseReadonly@@UAGHIPAUDBCONTACTWRITESETTING@@@Z @683 NONAME
??0MDatabaseReadonly@@QAE@XZ @684 NONAME
??_7MDatabaseReadonly@@6B@ @685 NONAME
+?GetEventById@MDatabaseReadonly@@UAGIPBD0@Z @686 NONAME
+?SetEventId@MDatabaseReadonly@@UAGHPBDI0@Z @687 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index de3b993d81..e57021e5ed 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -650,3 +650,5 @@ Miranda_WaitOnHandleEx @663
?WriteContactSetting@MDatabaseReadonly@@UEAAHIPEAUDBCONTACTWRITESETTING@@@Z @683 NONAME
??0MDatabaseReadonly@@QEAA@XZ @684 NONAME
??_7MDatabaseReadonly@@6B@ @685 NONAME
+?GetEventById@MDatabaseReadonly@@UEAAIPEBD0@Z @686 NONAME
+?SetEventId@MDatabaseReadonly@@UEAAHPEBDI0@Z @687 NONAME
diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp
index cb0a4d58ac..1fae803761 100644
--- a/src/mir_core/src/db.cpp
+++ b/src/mir_core/src/db.cpp
@@ -406,6 +406,16 @@ MIR_CORE_DLL(MEVENT) db_event_prev(MCONTACT hContact, MEVENT hDbEvent)
return (currDb == nullptr) ? 0 : currDb->FindPrevEvent(hContact, hDbEvent);
}
+MIR_CORE_DLL(MEVENT) db_event_getById(const char *szModule, const char *szId)
+{
+ return (currDb == nullptr) ? 0 : currDb->GetEventById(szModule, szId);
+}
+
+MIR_CORE_DLL(MEVENT) db_event_setId(const char *szModule, MEVENT hDbEvent, const char *szId)
+{
+ return (currDb == nullptr) ? 0 : currDb->SetEventId(szModule, hDbEvent, szId);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// misc functions
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index 7e9b81dd67..968b8f764f 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1065,3 +1065,5 @@ CallObjectEventHook @1259
?CreateLink@CDlgBase@@IAEXAAVCCtrlData@@PBDPA_W@Z @1263 NONAME
?CheckRowCount@CCtrlPages@@AAEXXZ @1264 NONAME
?VerifyControls@CDlgBase@@AAE_NP8CCtrlBase@@AE_NXZ@Z @1265 NONAME
+db_event_getById @1266
+db_event_setId @1267
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index 0a3759fa9f..17079509be 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1065,3 +1065,5 @@ CallObjectEventHook @1259
?CreateLink@CDlgBase@@IEAAXAEAVCCtrlData@@PEBDPEA_W@Z @1263 NONAME
?CheckRowCount@CCtrlPages@@AEAAXXZ @1264 NONAME
?VerifyControls@CDlgBase@@AEAA_NP8CCtrlBase@@EAA_NXZ@Z @1265 NONAME
+db_event_getById @1266
+db_event_setId @1267