summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_hooks.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-05-06 15:11:20 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-05-06 15:11:20 +0000
commit14eec47b6101e1f96437f7bb1057ee04a3cc4f63 (patch)
treebf3d11b8902307da42674c38194fce35e8032958 /protocols/Skype/src/skype_hooks.cpp
parentc7a87b51ee671f7c5a1bbdd80e001a863f9e7215 (diff)
- partly fixed chat reaction on incoming call
git-svn-id: http://svn.miranda-ng.org/main/trunk@4591 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_hooks.cpp')
-rw-r--r--protocols/Skype/src/skype_hooks.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/protocols/Skype/src/skype_hooks.cpp b/protocols/Skype/src/skype_hooks.cpp
index 07ad8d2dc9..42155750c9 100644
--- a/protocols/Skype/src/skype_hooks.cpp
+++ b/protocols/Skype/src/skype_hooks.cpp
@@ -11,29 +11,28 @@ void CSkypeProto::InitHookList()
void CSkypeProto::UninitHookList()
{
for (int i = 0; i < CSkypeProto::hookList.getCount(); i++)
- {
::UnhookEvent(CSkypeProto::hookList[i]);
- }
+}
+
+HANDLE CSkypeProto::HookEvent(const char* szEvent, SkypeEventFunc handler)
+{
+ HANDLE hook = ::HookEventObj(szEvent, (MIRANDAHOOKOBJ)*( void**)&handler, this);
+ this->instanceHookList.insert(hook);
+ return hook;
}
void CSkypeProto::InitInstanceHookList()
{
- this->instanceHookList.insert(
- this->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit));
- this->instanceHookList.insert(
- this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit));
+ this->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit);
+ this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit);
- this->instanceHookList.insert(
- this->HookEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnMessagePreCreate));
+ this->HookEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnMessagePreCreate);
- this->instanceHookList.insert(
- this->HookEvent(ME_MSG_BUTTONPRESSED, &CSkypeProto::OnTabSRMMButtonPressed));
+ this->HookEvent(ME_MSG_BUTTONPRESSED, &CSkypeProto::OnTabSRMMButtonPressed);
}
void CSkypeProto::UninitInstanceHookList()
{
for (int i = 0; i < this->instanceHookList.getCount(); i++)
- {
::UnhookEvent(this->instanceHookList[i]);
- }
} \ No newline at end of file