diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:12:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:12:06 +0000 |
commit | fee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (patch) | |
tree | 436277f178110f563b35d32f9138995f4b65b045 /src | |
parent | 70a64eeacc569df929b8c502e069355e203194be (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')
-rw-r--r-- | src/mir_core/db.cpp | 63 | ||||
-rw-r--r-- | src/mir_core/mir_core.def | 12 |
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
|