From 32c5733e46590d47150cbddbd0ffc485502bccca Mon Sep 17 00:00:00 2001 From: Sergey Pisarchik Date: Tue, 8 Apr 2014 10:26:24 +0300 Subject: [Tizen] Moved FromTizenString to separate hpp --- platform/platform_tizen.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'platform/platform_tizen.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 -#include #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wignored-qualifiers" @@ -21,36 +20,7 @@ #include #include -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() { -- cgit v1.2.3