summaryrefslogtreecommitdiff
path: root/plugins/NoHistory
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
commit85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c (patch)
treefe07935255b7432938f282419c3ab1378524c02f /plugins/NoHistory
parent8a09c895c4cd0e9cc87c38181ae2913dba77c30b (diff)
MEVENT - the strict type for events, they are not HANDLE anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@11866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NoHistory')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 93f2f3c9f5..53c4df12b4 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -21,7 +21,7 @@ CRITICAL_SECTION list_cs;
// a list of db events - we'll check them for the 'read' flag periodically and delete them whwen marked as read
struct EventListNode {
MCONTACT hContact;
- HANDLE hDBEvent;
+ MEVENT hDBEvent;
EventListNode *next;
};
@@ -99,9 +99,9 @@ void RemoveReadEvents(MCONTACT hContact = 0)
void RemoveAllEvents(MCONTACT hContact)
{
- HANDLE hDBEvent = db_event_first(hContact);
+ MEVENT hDBEvent = db_event_first(hContact);
while(hDBEvent) {
- HANDLE hDBEventNext = db_event_next(hContact, hDBEvent);
+ MEVENT hDBEventNext = db_event_next(hContact, hDBEvent);
db_event_delete(hContact, hDBEvent);
hDBEvent = hDBEventNext;
}
@@ -112,16 +112,14 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
RemoveReadEvents();
}
-int OnDatabaseEventAdd(WPARAM hContact, LPARAM lParam)
+int OnDatabaseEventAdd(WPARAM hContact, LPARAM hDBEvent)
{
- HANDLE hDBEvent = (HANDLE)lParam;
-
// history not disabled for this contact
if (db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) == 0)
return 0;
DBEVENTINFO info = { sizeof(info) };
- if ( !db_event_get(hDBEvent, &info)) {
+ if (!db_event_get(hDBEvent, &info)) {
if (info.eventType == EVENTTYPE_MESSAGE) {
EventListNode *node = (EventListNode *)malloc(sizeof(EventListNode));
node->hContact = hContact;