summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/db.cpp63
-rw-r--r--src/mir_core/mir_core.def12
2 files changed, 75 insertions, 0 deletions
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp
index df1a83d83a..82013cc3f3 100644
--- a/src/mir_core/db.cpp
+++ b/src/mir_core/db.cpp
@@ -217,6 +217,69 @@ MIR_CORE_DLL(INT_PTR) db_set_blob(HANDLE hContact, const char *szModule, const c
}
/////////////////////////////////////////////////////////////////////////////////////////
+// events
+
+MIR_CORE_DLL(HANDLE) db_event_add(HANDLE hContact, DBEVENTINFO *dbei)
+{
+ return (currDb == NULL) ? 0 : currDb->AddEvent(hContact, dbei);
+}
+
+MIR_CORE_DLL(int) db_event_count(HANDLE hContact)
+{
+ return (currDb == NULL) ? 0 : currDb->GetEventCount(hContact);
+}
+
+MIR_CORE_DLL(int) db_event_delete(HANDLE hContact, HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->DeleteEvent(hContact, hDbEvent);
+}
+
+MIR_CORE_DLL(HANDLE) db_event_first(HANDLE hContact)
+{
+ return (currDb == NULL) ? 0 : currDb->FindFirstEvent(hContact);
+}
+
+MIR_CORE_DLL(HANDLE) db_event_firstUnread(HANDLE hContact)
+{
+ return (currDb == NULL) ? 0 : currDb->FindFirstUnreadEvent(hContact);
+}
+
+MIR_CORE_DLL(int) db_event_get(HANDLE hDbEvent, DBEVENTINFO *dbei)
+{
+ return (currDb == NULL) ? 1 : currDb->GetEvent(hDbEvent, dbei);
+}
+
+MIR_CORE_DLL(int) db_event_getBlobSize(HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->GetBlobSize(hDbEvent);
+}
+
+MIR_CORE_DLL(HANDLE) db_event_getContact(HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->GetEventContact(hDbEvent);
+}
+
+MIR_CORE_DLL(HANDLE) db_event_last(HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->FindLastEvent(hDbEvent);
+}
+
+MIR_CORE_DLL(int) db_event_markRead(HANDLE hContact, HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->MarkEventRead(hContact, hDbEvent);
+}
+
+MIR_CORE_DLL(HANDLE) db_event_next(HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->FindNextEvent(hDbEvent);
+}
+
+MIR_CORE_DLL(HANDLE) db_event_prev(HANDLE hDbEvent)
+{
+ return (currDb == NULL) ? 0 : currDb->FindPrevEvent(hDbEvent);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// misc functions
MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv)
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index 6858f16234..6e923548b6 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -142,3 +142,15 @@ KillModuleSubclassing @139
mir_wstrndup @140
mir_unsubclassWindow @141
mir_urlEncode @142
+db_event_add @143
+db_event_count @144
+db_event_delete @145
+db_event_first @146
+db_event_firstUnread @147
+db_event_get @148
+db_event_getBlobSize @149
+db_event_getContact @150
+db_event_last @151
+db_event_markRead @152
+db_event_next @153
+db_event_prev @154