summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_hooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_hooks.cpp')
-rw-r--r--protocols/Skype/src/skype_hooks.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_hooks.cpp b/protocols/Skype/src/skype_hooks.cpp
new file mode 100644
index 0000000000..9fb927f1a2
--- /dev/null
+++ b/protocols/Skype/src/skype_hooks.cpp
@@ -0,0 +1,31 @@
+#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->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit);
+ this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit);
+}
+
+void CSkypeProto::UninitInstanceHookList()
+{
+ for (int i = 0; i < this->instanceHookList.getCount(); i++)
+ {
+ ::UnhookEvent(this->instanceHookList[i]);
+ }
+} \ No newline at end of file