summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r--protocols/Tox/src/tox_utils.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp
index b0f2b46b18..223d3b1b70 100644
--- a/protocols/Tox/src/tox_utils.cpp
+++ b/protocols/Tox/src/tox_utils.cpp
@@ -33,6 +33,33 @@ int CToxProto::ToxToMirandaStatus(TOX_USER_STATUS userstatus)
return status;
}
+TCHAR* CToxProto::ToxErrorToString(TOX_ERR_NEW error)
+{
+ switch (error)
+ {
+ case TOX_ERR_NEW_NULL:
+ return TranslateT("One of the arguments is not valid or ");
+ case TOX_ERR_NEW_MALLOC:
+ return TranslateT("Unable to allocate enough memory");
+ case TOX_ERR_NEW_PORT_ALLOC:
+ return TranslateT("Unable to bind to a port");
+ case TOX_ERR_NEW_PROXY_BAD_TYPE:
+ return TranslateT("The proxy type is not valid");
+ case TOX_ERR_NEW_PROXY_BAD_HOST:
+ return TranslateT("The proxy host is not valid");
+ case TOX_ERR_NEW_PROXY_BAD_PORT:
+ return TranslateT("The proxy port is not valid");
+ case TOX_ERR_NEW_PROXY_NOT_FOUND:
+ return TranslateT("The proxy address could not be resolved");
+ case TOX_ERR_NEW_LOAD_ENCRYPTED:
+ return TranslateT("The profile is encrypted");
+ case TOX_ERR_NEW_LOAD_BAD_FORMAT:
+ return TranslateT("The data format is not valid");
+ default:
+ return TranslateT("Unknown error");
+ }
+}
+
void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact)
{
if (Miranda_Terminated())