diff options
author | Sergey Pisarchik <pisarchik@mapswithme.com> | 2014-04-08 11:26:24 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:14:32 +0300 |
commit | 32c5733e46590d47150cbddbd0ffc485502bccca (patch) | |
tree | c1c95e4c751227ea3b6bcd32ec69e75973077511 /platform | |
parent | 31051431ef7bf717a4a4fd52c1b827b13816939f (diff) |
[Tizen] Moved FromTizenString to separate hpp
Diffstat (limited to 'platform')
-rw-r--r-- | platform/platform.pro | 8 | ||||
-rw-r--r-- | platform/platform_tizen.cpp | 32 | ||||
-rw-r--r-- | platform/tizen_string_utils.cpp | 0 | ||||
-rw-r--r-- | platform/tizen_string_utils.hpp | 4 |
4 files changed, 10 insertions, 34 deletions
diff --git a/platform/platform.pro b/platform/platform.pro index c8b1dc080a..6bd74d1a14 100644 --- a/platform/platform.pro +++ b/platform/platform.pro @@ -41,7 +41,9 @@ INCLUDEPATH += $$ROOT_DIR/3party/jansson/src SOURCES += platform_android.cpp \ pthread_video_timer.cpp } else:tizen* { - SOURCES += platform_tizen.cpp + HEADERS += tizen_string_utils.hpp + SOURCES += platform_tizen.cpp \ + tizen_string_utils.cpp } macx-*|iphone* { @@ -66,7 +68,7 @@ HEADERS += \ http_thread_callback.hpp \ chunks_download_strategy.hpp \ servers_list.hpp \ - constants.hpp \ + constants.hpp SOURCES += \ preferred_languages.cpp \ @@ -75,4 +77,4 @@ SOURCES += \ http_request.cpp \ chunks_download_strategy.cpp \ platform.cpp \ - servers_list.cpp \ + servers_list.cpp diff --git a/platform/platform_tizen.cpp b/platform/platform_tizen.cpp index 3538dc6fbe..47da63179d 100644 --- a/platform/platform_tizen.cpp +++ b/platform/platform_tizen.cpp @@ -2,7 +2,6 @@ #include "platform.hpp" #include <FAppApp.h> -#include <FBaseUtilStringUtil.h> #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wignored-qualifiers" @@ -21,36 +20,7 @@ #include <sys/stat.h> #include <sys/types.h> -string FromTizenString(Tizen::Base::String const & str_tizen) -{ - string utf8Str; - if (str_tizen.GetLength() == 0) - return utf8Str; -// str_tizen.GetPointer(); - Tizen::Base::ByteBuffer* pBuffer = Tizen::Base::Utility::StringUtil::StringToUtf8N(str_tizen); - if (pBuffer != null) - { - int byteCount = pBuffer->GetLimit(); - char* chPtrBuf = new char[byteCount + 1]; - if (chPtrBuf != null) { - pBuffer->GetArray((byte*) chPtrBuf, 0, byteCount); - utf8Str.assign(chPtrBuf, byteCount - 1); - delete[] chPtrBuf; - } - if (pBuffer != null) - delete pBuffer; - } - return utf8Str; -} - - -/// @return directory where binary resides, including slash at the end -static bool GetBinaryFolder(string & outPath) -{ - Tizen::App::App * pApp = Tizen::App::App::GetInstance(); - outPath = FromTizenString(pApp->GetAppRootPath()); - return true; -} +#include "tizen_string_utils.hpp" Platform::Platform() { diff --git a/platform/tizen_string_utils.cpp b/platform/tizen_string_utils.cpp new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/platform/tizen_string_utils.cpp diff --git a/platform/tizen_string_utils.hpp b/platform/tizen_string_utils.hpp new file mode 100644 index 0000000000..b9b27ae44d --- /dev/null +++ b/platform/tizen_string_utils.hpp @@ -0,0 +1,4 @@ +#ifndef TIZEN_STRING_UTILS_HPP +#define TIZEN_STRING_UTILS_HPP + +#endif // TIZEN_STRING_UTILS_HPP |