summaryrefslogtreecommitdiff
path: root/src/mir_core/db.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:12:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:12:06 +0000
commitfee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (patch)
tree436277f178110f563b35d32f9138995f4b65b045 /src/mir_core/db.cpp
parent70a64eeacc569df929b8c502e069355e203194be (diff)
12 binary replacements for MS_DB_EVENT_* services:
HANDLE db_event_add(HANDLE hContact, DBEVENTINFO *dbei); int db_event_count(HANDLE hContact); int db_event_delete(HANDLE hContact, HANDLE hDbEvent); HANDLE db_event_first(HANDLE hContact); HANDLE db_event_firstUnread(HANDLE hContact); int db_event_get(HANDLE hDbEvent, DBEVENTINFO *dbei); int db_event_getBlobSize(HANDLE hDbEvent); HANDLE db_event_getContact(HANDLE hDbEvent); HANDLE db_event_last(HANDLE hDbEvent); int db_event_markRead(HANDLE hContact, HANDLE hDbEvent); HANDLE db_event_next(HANDLE hDbEvent); HANDLE db_event_prev(HANDLE hDbEvent); git-svn-id: http://svn.miranda-ng.org/main/trunk@4254 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/db.cpp')
-rw-r--r--src/mir_core/db.cpp63
1 files changed, 63 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)