diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-21 12:33:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-21 12:33:31 +0300 |
commit | ca5001026a94f702c4012c5e8d2093ad3f51c1fa (patch) | |
tree | 554ad80633528d530057fc61035b15f901860ed2 /protocols/Tox/src/tox_proto.cpp | |
parent | e0799755b3966d1d6d8275ee5127242ec029a4e6 (diff) |
code cleaning:
- in conformance to C++'11 rules, we don't declare a method as virtual if it's declared as override;
- cause this code isn't visible in Pascal anymore, there's no need to use __cdecl calling convention for virtual methods;
- since PROTO_INTERFACE is a regular C++ class, there's no need to use old style service declarations for virtual methods like OnModulesLoaded / OnShutdown
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index f5a169797b..6e95610f26 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -43,7 +43,18 @@ CToxProto::~CToxProto() UninitNetlib();
}
-DWORD_PTR CToxProto::GetCaps(int type, MCONTACT)
+void CToxProto::OnModulesLoaded()
+{
+ Clist_GroupCreate(0, m_defaultGroup);
+
+ HookProtoEvent(ME_OPT_INITIALISE, &CToxProto::OnOptionsInit);
+ HookProtoEvent(ME_USERINFO_INITIALISE, &CToxProto::OnUserInfoInit);
+ HookProtoEvent(ME_MSG_PRECREATEEVENT, &CToxProto::OnPreCreateMessage);
+
+ InitCustomDbEvents();
+}
+
+INT_PTR CToxProto::GetCaps(int type, MCONTACT)
{
switch (type) {
case PFLAGNUM_1:
@@ -216,9 +227,6 @@ int CToxProto::UserIsTyping(MCONTACT hContact, int type) int CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam)
{
switch (iEventType) {
- case EV_PROTO_ONLOAD:
- return OnAccountLoaded(wParam, lParam);
-
case EV_PROTO_ONRENAME:
return OnAccountRenamed(wParam, lParam);
|