From 910486f051234fb8e24426152af98ab90319aa16 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 24 Oct 2015 18:53:28 +0000 Subject: Tox: remove custom db event adding git-svn-id: http://svn.miranda-ng.org/main/trunk@15606 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_messages.cpp | 19 ------------------- protocols/Tox/src/tox_proto.cpp | 5 ----- protocols/Tox/src/tox_proto.h | 2 -- 3 files changed, 26 deletions(-) diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp index 6212ab91a4..0ce57c1a35 100644 --- a/protocols/Tox/src/tox_messages.cpp +++ b/protocols/Tox/src/tox_messages.cpp @@ -22,7 +22,6 @@ void CToxProto::OnFriendMessage(Tox*, uint32_t friendNumber, TOX_MESSAGE_TYPE ty rawMessage[length] = 0; PROTORECVEVENT recv = { 0 }; - recv.flags = 0; recv.timestamp = time(NULL); recv.szMessage = rawMessage; recv.lParam = type == TOX_MESSAGE_TYPE_NORMAL ? EVENTTYPE_MESSAGE : DB_EVENT_ACTION; @@ -31,24 +30,6 @@ void CToxProto::OnFriendMessage(Tox*, uint32_t friendNumber, TOX_MESSAGE_TYPE ty CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF); } -// writing message/even into db -int CToxProto::OnReceiveMessage(MCONTACT hContact, PROTORECVEVENT *pre) -{ - //return Proto_RecvMessage(hContact, pre); - if (pre->szMessage == NULL) - return NULL; - - DBEVENTINFO dbei = { sizeof(dbei) }; - dbei.szModule = GetContactProto(hContact); - dbei.timestamp = pre->timestamp; - dbei.flags = DBEF_UTF; - dbei.eventType = pre->lParam; - dbei.cbBlob = (DWORD)mir_strlen(pre->szMessage) + 1; - dbei.pBlob = (PBYTE)pre->szMessage; - - return (INT_PTR)db_event_add(hContact, &dbei); -} - /* MESSAGE SENDING */ // outcoming message flow diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 9937562adb..a95ec968e3 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -125,11 +125,6 @@ HWND CToxProto::CreateExtendedSearchUI(HWND owner) return OnCreateExtendedSearchUI(owner); } -int CToxProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre) -{ - return OnReceiveMessage(hContact, pre); -} - int CToxProto::SendMsg(MCONTACT hContact, int, const char *msg) { return OnSendMessage(hContact, msg); diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index d67a2df97f..a00d512d85 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -37,7 +37,6 @@ public: virtual HWND __cdecl SearchAdvanced(HWND owner); virtual HWND __cdecl CreateExtendedSearchUI(HWND owner); - 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 TCHAR*, TCHAR **ppszFiles); @@ -203,7 +202,6 @@ private: static INT_PTR CALLBACK ChatRoomInviteProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); // messages - int OnReceiveMessage(MCONTACT hContact, PROTORECVEVENT *pre); int OnSendMessage(MCONTACT hContact, const char *message); static void OnFriendMessage(Tox *tox, uint32_t friendNumber, TOX_MESSAGE_TYPE type, const uint8_t *message, size_t length, void *arg); -- cgit v1.2.3