summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-22 14:49:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-22 14:49:00 +0300
commitfcae50377289915682e56fcbd49297d76da38b51 (patch)
tree1aceb0a6cb033b6be709401a42cc13eea6b4c928 /protocols
parent9300399ed59f4d82f5e62f5ef43b752da4dd0735 (diff)
no more PROTO_INTERFACE::OnEvent
Diffstat (limited to 'protocols')
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp21
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.h2
-rw-r--r--protocols/MSN/src/msn_proto.cpp13
-rw-r--r--protocols/MSN/src/msn_proto.h3
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp6
-rw-r--r--protocols/Sametime/src/sametime_proto.h1
-rw-r--r--protocols/Tox/src/tox_profile.cpp3
-rw-r--r--protocols/Tox/src/tox_proto.cpp10
-rw-r--r--protocols/Tox/src/tox_proto.h3
9 files changed, 16 insertions, 46 deletions
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 89222ebf96..ec5c940eaf 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -1809,18 +1809,13 @@ int CIcqProto::UserIsTyping(MCONTACT hContact, int type)
/////////////////////////////////////////////////////////////////////////////////////////
// OnEvent - maintain protocol events
-int CIcqProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
+void CIcqProto::OnErase()
{
- switch (eventType) {
- case EV_PROTO_ONERASE:
- char szDbSetting[MAX_PATH];
- mir_snprintf(szDbSetting, "%sP2P", m_szModuleName);
- db_delete_module(0, szDbSetting);
- mir_snprintf(szDbSetting, "%sSrvGroups", m_szModuleName);
- db_delete_module(0, szDbSetting);
- mir_snprintf(szDbSetting, "%sGroups", m_szModuleName);
- db_delete_module(0, szDbSetting);
- break;
- }
- return 1;
+ char szDbSetting[MAX_PATH];
+ mir_snprintf(szDbSetting, "%sP2P", m_szModuleName);
+ db_delete_module(0, szDbSetting);
+ mir_snprintf(szDbSetting, "%sSrvGroups", m_szModuleName);
+ db_delete_module(0, szDbSetting);
+ mir_snprintf(szDbSetting, "%sGroups", m_szModuleName);
+ db_delete_module(0, szDbSetting);
}
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h
index e653ef9a3b..e6cce5e4c6 100644
--- a/protocols/IcqOscarJ/src/icq_proto.h
+++ b/protocols/IcqOscarJ/src/icq_proto.h
@@ -93,8 +93,8 @@ struct CIcqProto : public PROTO<CIcqProto>
int UserIsTyping(MCONTACT hContact, int type) override;
- int OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) override;
void OnContactDeleted(MCONTACT) override;
+ void OnErase() override;
void OnModulesLoaded() override;
void OnShutdown() override;
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index 276d1e7af2..1361d363e0 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -954,14 +954,9 @@ int CMsnProto::SetApparentMode(MCONTACT hContact, int mode)
return 1;
}
-int CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM, LPARAM)
+void CMsnProto::OnErase()
{
- switch (eventType) {
- case EV_PROTO_ONERASE:
- char szDbsettings[64];
- mir_snprintf(szDbsettings, "%s_HTTPS", m_szModuleName);
- db_delete_module(0, szDbsettings);
- break;
- }
- return 1;
+ char szDbsettings[64];
+ mir_snprintf(szDbsettings, "%s_HTTPS", m_szModuleName);
+ db_delete_module(0, szDbsettings);
}
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index 20674b0986..da80f418fb 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -65,10 +65,9 @@ struct CMsnProto : public PROTO<CMsnProto>
int UserIsTyping(MCONTACT hContact, int type) override;
- int OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) override;
-
void OnBuildProtoMenu(void) override;
void OnContactDeleted(MCONTACT) override;
+ void OnErase() override;
void OnModulesLoaded() override;
void OnShutdown() override;
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index 3a814b932a..9b6abed685 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -290,9 +290,3 @@ int CSametimeProto::UserIsTyping(MCONTACT hContact, int type)
SendTyping(hContact, type == PROTOTYPE_SELFTYPING_ON);
return 0;
}
-
-int CSametimeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam)
-{
- return TRUE;
-}
-
diff --git a/protocols/Sametime/src/sametime_proto.h b/protocols/Sametime/src/sametime_proto.h
index 09923eeed3..84407541de 100644
--- a/protocols/Sametime/src/sametime_proto.h
+++ b/protocols/Sametime/src/sametime_proto.h
@@ -43,7 +43,6 @@ struct CSametimeProto : public PROTO<CSametimeProto>
int UserIsTyping(MCONTACT hContact, int type) override;
- int OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) override;
void OnModulesLoaded() override;
void OnShutdown() override;
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index 4458e0e6c7..76744445e5 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -142,11 +142,10 @@ void CToxProto::SaveToxProfile(Tox *tox)
mir_free(data);
}
-int CToxProto::OnDeleteToxProfile()
+void CToxProto::OnErase()
{
ptrW profilePath(GetToxProfilePath());
_wunlink(profilePath);
- return 0;
}
INT_PTR CToxProto::OnCopyToxID(WPARAM, LPARAM)
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index c8c66012a1..0ae5b521ec 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -224,13 +224,3 @@ int CToxProto::UserIsTyping(MCONTACT hContact, int type)
{
return OnUserIsTyping(hContact, type);
}
-
-int CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM, LPARAM)
-{
- switch (iEventType) {
- case EV_PROTO_ONERASE:
- return OnDeleteToxProfile();
- }
-
- return 1;
-}
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index e29fceaa14..9e1ce07d97 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -46,9 +46,9 @@ public:
int UserIsTyping(MCONTACT hContact, int type) override;
- int OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) override;
void OnBuildProtoMenu(void) override;
void OnContactDeleted(MCONTACT) override;
+ void OnErase() override;
void OnModulesLoaded() override;
// icons
@@ -82,7 +82,6 @@ private:
bool LoadToxProfile(Tox_Options *options);
void SaveToxProfile(Tox *tox);
- int OnDeleteToxProfile();
INT_PTR __cdecl OnCopyToxID(WPARAM, LPARAM);
INT_PTR __cdecl OnCreatePassword(WPARAM, LPARAM);