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 /include/m_database.h | |
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 'include/m_database.h')
-rw-r--r-- | include/m_database.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/include/m_database.h b/include/m_database.h index 5bd82589f9..6e29b7d3ce 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -413,27 +413,6 @@ modules are free to define their own, beginning at 2000 DBEVENTINFO.timestamp is in GMT, as returned by time(). There are services
db/time/x below with useful stuff for dealing with it.
*/
-#define DBEF_FIRST 1 //this is the first event in the chain;
- //internal only: *do not* use this flag
-#define DBEF_SENT 2 //this event was sent by the user. If not set this
- //event was received.
-#define DBEF_READ 4 //event has been read by the user. It does not need
- //to be processed any more except for history.
-#define DBEF_RTL 8 //event contains the right-to-left aligned text
-#define DBEF_UTF 16 //event contains a text in utf-8
-
-typedef struct {
- int cbSize; //size of the structure in bytes
- char *szModule; //pointer to name of the module that 'owns' this
- //event, ie the one that is in control of the data format
- DWORD timestamp; //seconds since 00:00, 01/01/1970. Gives us times until
- //2106 unless you use the standard C library which is
- //signed and can only do until 2038. In GMT.
- DWORD flags; //the omnipresent flags
- WORD eventType; //module-defined event type field
- DWORD cbBlob; //size of pBlob in bytes
- PBYTE pBlob; //pointer to buffer containing module-defined event data
-} DBEVENTINFO;
#define EVENTTYPE_MESSAGE 0
#define EVENTTYPE_URL 1
@@ -488,7 +467,7 @@ of modules. Look but don't touch. Retrieves the event's text
wParam = (WPARAM)0 (unused)
lParam = (LPARAM)(DBEVENTGETTEXT*)egt - pointer to structure with parameters
- egt->dbei should be the valid database event read via MS_DB_EVENT_GET
+ egt->dbei should be the valid database event read via db_event_get()
egt->datatype = DBVT_WCHAR or DBVT_ASCIIZ or DBVT_TCHAR. If a caller wants to
suppress Unicode part of event in answer, add DBVTF_DENYUNICODE to this field.
egt->codepage is any valid codepage, CP_ACP by default.
@@ -526,7 +505,7 @@ __forceinline TCHAR* DbGetEventTextT(DBEVENTINFO* dbei, int codepage) Retrieves the event's icon
wParam = (WPARAM)(int)flags - use LR_SHARED for shared HICON
lParam = (LPARAM)(DBEVENTINFO*)dbei
-dbei should be a valid database event read via MS_DB_EVENT_GET
+dbei should be a valid database event read via db_event_get()
Function returns HICON (use DestroyIcon to release resources if not LR_SHARED)
@@ -777,7 +756,7 @@ at any particular position in the chain. Called **before** a new event is made of a DBEVENTINFO structure, this
hook is not SAFE unless you know what you're doing with it, the arguments
are passed as-is (with errors, pointer problems, if any) from any arguments
-passed to MS_DB_EVENT_ADD.
+passed to db_event_add.
The point of this hook is to stop any unwanted database events, to stop
an event being added, return 1, to allow the event to pass through return
|