diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-31 19:48:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-31 19:48:57 +0300 |
commit | 7bb41bcc7824ab4ae248992df3ac82e6b148720f (patch) | |
tree | e150a54654f8735e0540ce92b79a521c68037e66 /protocols | |
parent | bdd6a8a6b981a019e6818230077567b4fb51604c (diff) |
useless wrappers removed & replaced with PROTO_INTERFACE method calls
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/filetransfer.cpp | 8 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.h | 2 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.cpp | 3 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 3 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Steam/src/steam_history.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_polling.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.cpp | 8 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.h | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 9 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 1 |
13 files changed, 8 insertions, 40 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index ab1253571e..0b450a9fda 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -337,8 +337,7 @@ int CDiscordProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt) T2Utf szResUtf((const wchar_t*)evt->lParam); evt->pCustomData = (char*)szResUtf; evt->cbCustomDataSize = (DWORD)mir_strlen(szResUtf); - Proto_RecvMessage(hContact, evt); - return 0; + return CSuper::RecvMsg(hContact, evt); } //////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 5c128d5bb2..263f33a462 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -26,7 +26,7 @@ int FacebookProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) { StopTyping(hContact); - return Proto_RecvMessage(hContact, pre); + return CSuper::RecvMsg(hContact, pre); } void FacebookProto::SendMsgWorker(void *p) diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp index 65e3ce7a1b..4d95ef5828 100644 --- a/protocols/Gadu-Gadu/src/filetransfer.cpp +++ b/protocols/Gadu-Gadu/src/filetransfer.cpp @@ -925,14 +925,6 @@ int GaduProto::FileDeny(MCONTACT, HANDLE hTransfer, const wchar_t *) }
////////////////////////////////////////////////////////////
-// Called when received an file
-//
-int GaduProto::RecvFile(MCONTACT hContact, PROTORECVFILE* pre)
-{
- return Proto_RecvFile(hContact, pre);
-}
-
-////////////////////////////////////////////////////////////
// Called when user sends a file
//
HANDLE GaduProto::SendFile(MCONTACT hContact, const wchar_t *, wchar_t** ppszFiles)
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index f342797018..543c936ea4 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -45,8 +45,6 @@ struct GaduProto : public PROTO<GaduProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILE*);
-
virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 037094c27c..a360260186 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -752,8 +752,7 @@ int __cdecl CJabberProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt) T2Utf szResUtf((LPCTSTR)evt->lParam);
evt->pCustomData = (char*)szResUtf;
evt->cbCustomDataSize = (DWORD)mir_strlen(szResUtf);
- Proto_RecvMessage(hContact, evt);
- return 0;
+ return CSuper::RecvMsg(hContact, evt);
}
////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 8be8598f2a..d4498913e1 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -672,8 +672,7 @@ int __cdecl CMsnProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) db_unset(hContact, "CList", "Hidden");
}
-
- return Proto_RecvMessage(hContact, pre);
+ return CSuper::RecvMsg(hContact, pre);
}
int CMsnProto::GetInfo(MCONTACT hContact, int)
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 9adfa781f7..5ff1285790 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -188,7 +188,7 @@ int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILE* pre) db_unset(hContact, "CList", "Hidden");
db_unset(hContact, "CList", "NotOnList");
- return Proto_RecvFile(hContact, pre);
+ return CSuper::RecvFile(hContact, pre);
}
int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
@@ -198,7 +198,7 @@ int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) db_unset(hContact, "CList", "Hidden");
db_unset(hContact, "CList", "NotOnList");
- return Proto_RecvMessage(hContact, pre);
+ return CSuper::RecvMsg(hContact, pre);
}
HANDLE CSametimeProto::SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles)
diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp index d78da4b4bd..987b96ecea 100644 --- a/protocols/Steam/src/steam_history.cpp +++ b/protocols/Steam/src/steam_history.cpp @@ -74,6 +74,6 @@ void CSteamProto::OnGotHistoryMessages(const JSONNode &root, void *arg) if (IsMe(steamId)) recv.flags = PREF_SENT; - Proto_RecvMessage(hContact, &recv); + RecvMsg(hContact, &recv); } } diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index b2a85ff670..24b9047d9b 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -21,7 +21,7 @@ void CSteamProto::ParsePollData(const JSONNode &data) recv.timestamp = timestamp; recv.szMessage = (char*)text.c_str(); recv.flags = PREF_SENT; - Proto_RecvMessage(hContact, &recv); + RecvMsg(hContact, &recv); } else if (type == "saytext" || type =="emote") { json_string text = item["text"].as_string(); diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 1cb498226b..588c866a0e 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -98,14 +98,6 @@ DWORD_PTR TwitterProto::GetCaps(int type, MCONTACT) // *************************
-int TwitterProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
-{
- Proto_RecvMessage(hContact, pre);
- return 0;
-}
-
-// *************************
-
struct send_direct
{
__inline send_direct(MCONTACT _hContact, const std::string &_msg, int _msgid) :
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h index f381516075..e1e7dd051e 100644 --- a/protocols/Twitter/src/proto.h +++ b/protocols/Twitter/src/proto.h @@ -36,7 +36,6 @@ public: virtual HANDLE __cdecl SearchBasic(const wchar_t *);
virtual HANDLE __cdecl SearchByEmail(const wchar_t *);
- virtual int __cdecl RecvMsg(MCONTACT, PROTORECVEVENT *);
virtual int __cdecl SendMsg(MCONTACT, int, const char *);
virtual int __cdecl SetStatus(int);
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index cd3661e119..839066adb1 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -19,15 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////////////
-int CVkProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
-{
- debugLogA("CVkProto::RecvMsg");
- Proto_RecvMessage(hContact, pre);
- return 0;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
void CVkProto::SendMsgAck(void *param)
{
debugLogA("CVkProto::SendMsgAck");
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 1a53fd325f..8b7abdbb8a 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -61,7 +61,6 @@ struct CVkProto : public PROTO<CVkProto> virtual HANDLE __cdecl SearchBasic(const wchar_t *id);
virtual HANDLE __cdecl SearchByEmail(const wchar_t *email);
virtual HANDLE __cdecl SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName);
- virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles);
virtual int __cdecl SetStatus(int iNewStatus);
|