From 41ec75629ab19e84dd25a168797afe5fe8c01594 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 11 Aug 2014 19:45:13 +0000 Subject: Tox: some of message sending git-svn-id: http://svn.miranda-ng.org/main/trunk@10158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_events.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'protocols/Tox/src/tox_events.cpp') diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index d4ab8a8960..45060ab170 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -66,4 +66,21 @@ void CToxProto::OnConnectionStatusChanged(Tox *tox, const int friendId, const ui void CToxProto::OnAction(Tox *tox, const int friendId, const uint8_t *message, const uint16_t messageSize, void *arg) { +} + +void CToxProto::OnReadReceipt(Tox *tox, int32_t friendnumber, uint32_t receipt, void *arg) +{ + CToxProto *proto = (CToxProto*)arg; + + std::vector clientId(TOX_CLIENT_ID_SIZE); + tox_get_client_id(tox, friendnumber, &clientId[0]); + std::string toxId = proto->DataToHexString(clientId); + + MCONTACT hContact = proto->GetContactByClientId(toxId.c_str()); + + proto->ProtoBroadcastAck( + hContact, + ACKTYPE_MESSAGE, + ACKRESULT_SUCCESS, + (HANDLE)receipt, 0); } \ No newline at end of file -- cgit v1.2.3