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/SkypeWeb/src/skype_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/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 459bfe04bf..e1a702e565 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -81,7 +81,20 @@ CSkypeProto::~CSkypeProto() SkypeUnsetTimer(); } -int CSkypeProto::OnExit() +void CSkypeProto::OnModulesLoaded() +{ + setAllContactStatuses(ID_STATUS_OFFLINE, true); + + HookProtoEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit); + HookProtoEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnPreCreateMessage); + HookProtoEvent(ME_DB_EVENT_MARKED_READ, &CSkypeProto::OnDbEventRead); + + InitDBEvents(); + InitPopups(); + InitGroupChatModule(); +} + +void CSkypeProto::OnShutdown() { debugLogA(__FUNCTION__); @@ -91,11 +104,9 @@ int CSkypeProto::OnExit() m_hPollingEvent.Set(); m_hTrouterEvent.Set(); - - return 0; } -DWORD_PTR CSkypeProto::GetCaps(int type, MCONTACT) +INT_PTR CSkypeProto::GetCaps(int type, MCONTACT) { switch (type) { case PFLAGNUM_1: @@ -107,7 +118,7 @@ DWORD_PTR CSkypeProto::GetCaps(int type, MCONTACT) case PFLAGNUM_4: return PF4_FORCEADDED | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_IMSENDOFFLINE | PF4_OFFLINEFILES; case PFLAG_UNIQUEIDTEXT: - return (DWORD_PTR)Translate("Skypename"); + return (INT_PTR)Translate("Skypename"); } return 0; } @@ -290,17 +301,11 @@ int CSkypeProto::UserIsTyping(MCONTACT hContact, int type) int CSkypeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) { switch (iEventType) { - case EV_PROTO_ONLOAD: - return OnAccountLoaded(wParam, lParam); - case EV_PROTO_ONCONTACTDELETED: return OnContactDeleted(wParam, lParam); case EV_PROTO_ONMENU: return OnInitStatusMenu(); - - case EV_PROTO_ONEXIT: - return OnExit(); } return 1; |