summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_hooks.cpp
blob: a1184cc325c21716bb2466127bc00e652a9fc614 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "skype.h"

void CSkypeProto::InitHookList()
{
	::HookEvent(ME_SYSTEM_MODULESLOADED, &CSkypeProto::OnModulesLoaded);
	::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSkypeProto::PrebuildContactMenu);	
}

HANDLE CSkypeProto::HookEvent(const char* szEvent, SkypeEventFunc handler)
{
	return ::HookEventObj(szEvent, (MIRANDAHOOKOBJ)*( void**)&handler, this);
}

void CSkypeProto::InitInstanceHookList()
{
	this->HookEvent(ME_OPT_INITIALISE,		&CSkypeProto::OnOptionsInit);
	this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit);

	this->HookEvent(ME_MSG_PRECREATEEVENT,	&CSkypeProto::OnMessagePreCreate);

	this->HookEvent(ME_MSG_BUTTONPRESSED,	&CSkypeProto::OnTabSRMMButtonPressed); 
}