diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-05-06 15:11:20 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-05-06 15:11:20 +0000 |
commit | 14eec47b6101e1f96437f7bb1057ee04a3cc4f63 (patch) | |
tree | bf3d11b8902307da42674c38194fce35e8032958 /protocols/Skype/src/skype_hooks.cpp | |
parent | c7a87b51ee671f7c5a1bbdd80e001a863f9e7215 (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.cpp | 23 |
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 |