summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_hooks.cpp
blob: 07ad8d2dc9b3b62b35ee05a25dddcb4f71e9075f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "skype_proto.h"

LIST<void> CSkypeProto::hookList(1);

void CSkypeProto::InitHookList()
{
	CSkypeProto::hookList.insert(
		::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSkypeProto::PrebuildContactMenu));
}

void CSkypeProto::UninitHookList()
{
	for (int i = 0; i < CSkypeProto::hookList.getCount(); i++)
	{
		::UnhookEvent(CSkypeProto::hookList[i]);
	}
}

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

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

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

void CSkypeProto::UninitInstanceHookList()
{
	for (int i = 0; i < this->instanceHookList.getCount(); i++)
	{
		::UnhookEvent(this->instanceHookList[i]);
	}
}