summaryrefslogtreecommitdiff
path: root/plugins/IEHistory/src/utils.cpp
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/IEHistory/src/utils.cpp
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/IEHistory/src/utils.cpp')
-rw-r--r--plugins/IEHistory/src/utils.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/plugins/IEHistory/src/utils.cpp b/plugins/IEHistory/src/utils.cpp
index 2b676f8235..e460e3d78d 100644
--- a/plugins/IEHistory/src/utils.cpp
+++ b/plugins/IEHistory/src/utils.cpp
@@ -198,32 +198,31 @@ void UnixTimeToSystemTime(time_t t, LPSYSTEMTIME pst)
SystemTimeToTzSpecificLocalTime(NULL, &st, pst);
}
-HANDLE GetNeededEvent(HANDLE hEvent, int num, int direction)
+MEVENT GetNeededEvent(MEVENT hEvent, int num, int direction)
{
int i;
- typedef HANDLE (__stdcall *db_event_step_t)(MCONTACT hContact,HANDLE hDbEvent);
+ typedef MEVENT (__stdcall *db_event_step_t)(MCONTACT hContact, MEVENT hDbEvent);
db_event_step_t db_event_step;
- if(direction==DIRECTION_BACK){
- db_event_step=db_event_prev;
- }else{
- db_event_step=db_event_next;
- }
+ if(direction == DIRECTION_BACK)
+ db_event_step = db_event_prev;
+ else
+ db_event_step = db_event_next;
- for (i = 0; i < num; ++i){
- hEvent = db_event_step(0,hEvent);
- }
+ for (i = 0; i < num; ++i)
+ hEvent = db_event_step(0, hEvent);
+
return hEvent;
}
-SearchResult SearchHistory(MCONTACT contact, HANDLE hFirstEvent, void *searchData, int direction, int type)
+SearchResult SearchHistory(MCONTACT contact, MEVENT hFirstEvent, void *searchData, int direction, int type)
{
if (hFirstEvent == NULL){
- typedef HANDLE (__stdcall *db_event_start_t)(MCONTACT contact);
- db_event_start_t db_event_start=(direction==DIRECTION_BACK) ? db_event_last : db_event_first;
- hFirstEvent=db_event_start(contact);
+ typedef MEVENT (__stdcall *db_event_start_t)(MCONTACT contact);
+ db_event_start_t db_event_start = (direction == DIRECTION_BACK) ? db_event_last : db_event_first;
+ hFirstEvent = db_event_start(contact);
}
int index = 0;
- HANDLE hEvent = hFirstEvent;
+ MEVENT hEvent = hFirstEvent;
void *buffer = NULL;
TCHAR *search;
bool found = false;