summaryrefslogtreecommitdiff
path: root/plugins/MessageState/src/messagestate.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-06-09 14:36:59 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-06-09 14:36:59 +0000
commitdde84ca4afb4b626ed563bbab7f644a7d0bc396b (patch)
tree48ee7025d568c35d5dc7af5f2336c02a04bea416 /plugins/MessageState/src/messagestate.cpp
parent35d50950b5c60523f5a4a4959ee5e5a370ceabef (diff)
MessageState: Added dummy service.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14073 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MessageState/src/messagestate.cpp')
-rw-r--r--plugins/MessageState/src/messagestate.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp
index 8f8d450730..3595553ee1 100644
--- a/plugins/MessageState/src/messagestate.cpp
+++ b/plugins/MessageState/src/messagestate.cpp
@@ -1,5 +1,7 @@
#include "stdafx.h"
+HANDLE hDummyService;
+
LONGLONG GetLastSentMessageTime(MCONTACT hContact)
{
for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent))
@@ -87,7 +89,7 @@ int IconsUpdate(WPARAM hContact, LONGLONG readtime)
return 0;
}
-int OnProtoAck(WPARAM wParam, LPARAM lParam)
+int OnProtoAck(WPARAM, LPARAM lParam)
{
ACKDATA *pAck = (ACKDATA *)lParam;
if (pAck && pAck->type == ACKTYPE_MESSAGE && CheckProtoSupport(GetContactProto(pAck->hContact)))
@@ -140,12 +142,23 @@ int OnSrmmWindowEvent(WPARAM, LPARAM lParam)
return 0;
}
+INT_PTR DummyService(WPARAM, LPARAM){ return 0; }
+
+void UnInitModule()
+{
+ if (hDummyService)
+ DestroyServiceFunction(hDummyService);
+}
+
int OnModulesLoaded(WPARAM, LPARAM)
{
HookEvent(ME_MSG_WINDOWEVENT, OnSrmmWindowEvent);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
HookEvent(ME_PROTO_ACK, OnProtoAck);
HookEvent(ME_DB_EVENT_FILTER_ADD, OnEventFilterAdd);
+
+ hDummyService = CreateServiceFunction(MODULENAME "/DummyService", DummyService);
+
// IcoLib support
for (size_t i = 0; i < SIZEOF(Icons); i++)
Icon_Register(g_hInst, MODULENAME, &Icons[i], 1);