summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-10 12:01:55 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-10 12:01:55 +0000
commit78f97fe198286a120370f6c56921205191f986b0 (patch)
tree96629174df34f22697c5eaad7cfe102f8f7fd5eb /protocols/Tox/src/tox_utils.cpp
parentbff791f9bd1828c66e1462a4a3f86a800b58ad13 (diff)
Tox:
- switched to new api - updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@12726 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r--protocols/Tox/src/tox_utils.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp
index ccbb41effd..29e43d425b 100644
--- a/protocols/Tox/src/tox_utils.cpp
+++ b/protocols/Tox/src/tox_utils.cpp
@@ -1,32 +1,32 @@
#include "common.h"
-TOX_USERSTATUS CToxProto::MirandaToToxStatus(int status)
+TOX_USER_STATUS CToxProto::MirandaToToxStatus(int status)
{
- TOX_USERSTATUS userstatus = TOX_USERSTATUS_NONE;
+ TOX_USER_STATUS userstatus = TOX_USER_STATUS_NONE;
switch (status)
{
case ID_STATUS_AWAY:
- userstatus = TOX_USERSTATUS_AWAY;
+ userstatus = TOX_USER_STATUS_AWAY;
break;
case ID_STATUS_OCCUPIED:
- userstatus = TOX_USERSTATUS_BUSY;
+ userstatus = TOX_USER_STATUS_BUSY;
break;
}
return userstatus;
}
-int CToxProto::ToxToMirandaStatus(TOX_USERSTATUS userstatus)
+int CToxProto::ToxToMirandaStatus(TOX_USER_STATUS userstatus)
{
int status = ID_STATUS_OFFLINE;
switch (userstatus)
{
- case TOX_USERSTATUS_NONE:
+ case TOX_USER_STATUS_NONE:
status = ID_STATUS_ONLINE;
break;
- case TOX_USERSTATUS_AWAY:
+ case TOX_USER_STATUS_AWAY:
status = ID_STATUS_AWAY;
break;
- case TOX_USERSTATUS_BUSY:
+ case TOX_USER_STATUS_BUSY:
status = ID_STATUS_OCCUPIED;
break;
}
@@ -62,13 +62,5 @@ void CToxProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hCont
bool CToxProto::IsFileExists(std::tstring path)
{
- //return ::GetFileAttributes(fileName) != DWORD(-1)
- WIN32_FIND_DATA wfd;
- HANDLE hFind = FindFirstFile(path.c_str(), &wfd);
- if (INVALID_HANDLE_VALUE != hFind)
- {
- FindClose(hFind);
- return true;
- }
- return false;
+ return _taccess(path.c_str(), 0) == 0;
} \ No newline at end of file