summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_events.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-08-11 19:45:13 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-08-11 19:45:13 +0000
commit41ec75629ab19e84dd25a168797afe5fe8c01594 (patch)
tree688a9f1cb8df882de08c3a199aa1bdaf467b2b8b /protocols/Tox/src/tox_events.cpp
parent9f7023fdefc4bbdc888c8bb208bc79bbaa8df225 (diff)
Tox: some of message sending
git-svn-id: http://svn.miranda-ng.org/main/trunk@10158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_events.cpp')
-rw-r--r--protocols/Tox/src/tox_events.cpp17
1 files changed, 17 insertions, 0 deletions
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<uint8_t> 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