From 44ac2cea0d7dee5b2fdd085d3a4051d844b18728 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 23 Nov 2015 19:15:20 +0000 Subject: Tox: updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@15761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_utils.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'protocols/Tox/src/tox_utils.cpp') diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index da18be8bdb..0ad5015340 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -82,6 +82,27 @@ TCHAR* CToxProto::ToxErrorToString(TOX_ERR_NEW error) } } +TCHAR* CToxProto::ToxErrorToString(TOX_ERR_FRIEND_SEND_MESSAGE error) +{ + switch (error) + { + case TOX_ERR_FRIEND_SEND_MESSAGE_NULL: + return TranslateT("One of the arguments is missing"); + case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_FOUND: + return TranslateT("The friend number did not designate a valid friend"); + case TOX_ERR_FRIEND_SEND_MESSAGE_FRIEND_NOT_CONNECTED: + return TranslateT("This client is currently not connected to the friend"); + case TOX_ERR_FRIEND_SEND_MESSAGE_SENDQ: + return TranslateT("An allocation error occurred while increasing the send queue size"); + case TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG: + return TranslateT("Message length exceeded TOX_MAX_MESSAGE_LENGTH"); + case TOX_ERR_FRIEND_SEND_MESSAGE_EMPTY: + return TranslateT("Attempted to send a zero-length message"); + default: + return TranslateT("Unknown error"); + } +} + void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact) { if (Miranda_Terminated()) -- cgit v1.2.3