diff --git a/base/base.cpp b/base/base.cpp index fbb306bf89..36430da855 100644 --- a/base/base.cpp +++ b/base/base.cpp @@ -7,7 +7,7 @@ #include -#ifdef OMIM_OS_BADA +#ifdef OMIM_OS_TIZEN #include #endif @@ -15,7 +15,7 @@ namespace my { void OnAssertFailedDefault(SrcPoint const & srcPoint, string const & msg) { -#ifdef OMIM_OS_BADA +#ifdef OMIM_OS_TIZEN AppLog("ASSERT FAILED%s:%d:%s", srcPoint.FileName(), srcPoint.Line(), msg.c_str()); AppAssert(false); diff --git a/base/condition.cpp b/base/condition.cpp index c55c8c926f..4fe713ef56 100644 --- a/base/condition.cpp +++ b/base/condition.cpp @@ -1,8 +1,6 @@ #include "../std/target_os.hpp" -#if defined(OMIM_OS_BADA) - #include "condition_bada.cpp" -#elif defined(OMIM_OS_WINDOWS_NATIVE) +#if defined(OMIM_OS_WINDOWS_NATIVE) #include "condition_windows_native.cpp" #else #include "condition_posix.cpp" diff --git a/base/condition_posix.cpp b/base/condition_posix.cpp index 339e52650e..0610427bf6 100644 --- a/base/condition_posix.cpp +++ b/base/condition_posix.cpp @@ -1,6 +1,6 @@ #include "../std/target_os.hpp" -#if !defined(OMIM_OS_BADA) && !defined(OMIM_OS_WINDOWS_NATIVE) +#if !defined(OMIM_OS_WINDOWS_NATIVE) #include "condition.hpp" #include "mutex.hpp" diff --git a/base/mutex.hpp b/base/mutex.hpp index 95173b27fb..e4e8b95d21 100644 --- a/base/mutex.hpp +++ b/base/mutex.hpp @@ -4,9 +4,7 @@ #include "../std/target_os.hpp" -#if defined(OMIM_OS_BADA) - #include -#elif defined(OMIM_OS_WINDOWS_NATIVE) +#if defined(OMIM_OS_WINDOWS_NATIVE) #include "../std/windows.hpp" #else #include @@ -30,9 +28,7 @@ namespace threads { private: -#if defined(OMIM_OS_BADA) - Osp::Base::Runtime::Mutex m_Mutex; -#elif defined(OMIM_OS_WINDOWS_NATIVE) +#if defined(OMIM_OS_WINDOWS_NATIVE) CRITICAL_SECTION m_Mutex; #else pthread_mutex_t m_Mutex; @@ -49,9 +45,7 @@ namespace threads Mutex() { -#if defined(OMIM_OS_BADA) - m_Mutex.Create(); -#elif defined(OMIM_OS_WINDOWS_NATIVE) +#if defined(OMIM_OS_WINDOWS_NATIVE) ::InitializeCriticalSection(&m_Mutex); #else ::pthread_mutex_init(&m_Mutex, 0); @@ -62,16 +56,14 @@ namespace threads { #if defined(OMIM_OS_WINDOWS_NATIVE) ::DeleteCriticalSection(&m_Mutex); -#elif !defined(OMIM_OS_BADA) +#else ::pthread_mutex_destroy(&m_Mutex); #endif } void Lock() { -#if defined(OMIM_OS_BADA) - m_Mutex.Acquire(); -#elif defined(OMIM_OS_WINDOWS_NATIVE) +#if defined(OMIM_OS_WINDOWS_NATIVE) ::EnterCriticalSection(&m_Mutex); #else VERIFY(0 == ::pthread_mutex_lock(&m_Mutex), ()); @@ -89,9 +81,7 @@ namespace threads void Unlock() { -#if defined(OMIM_OS_BADA) - m_Mutex.Release(); -#elif defined(OMIM_OS_WINDOWS_NATIVE) +#if defined(OMIM_OS_WINDOWS_NATIVE) ::LeaveCriticalSection(&m_Mutex); #else VERIFY(0 == ::pthread_mutex_unlock(&m_Mutex), ()); diff --git a/base/thread.cpp b/base/thread.cpp index db7887a92e..6d50d58f48 100644 --- a/base/thread.cpp +++ b/base/thread.cpp @@ -1,8 +1,8 @@ #include "thread.hpp" #include "assert.hpp" -#if defined(OMIM_OS_BADA) - #include +#if defined(OMIM_OS_TIZEN) + #include "../../tizen/inc/FBase.hpp" #elif defined(OMIM_OS_WINDOWS_NATIVE) #include "../std/windows.hpp" #else @@ -17,20 +17,20 @@ namespace threads { -#if defined(OMIM_OS_BADA) - /// BADA specific implementation - class ThreadImpl : public Osp::Base::Runtime::Thread +#if defined(OMIM_OS_TIZEN) + /// TIZEN specific implementation + class ThreadImpl : public Tizen::Base::Runtime::Thread { - typedef Osp::Base::Runtime::Thread BaseT; + typedef Tizen::Base::Runtime::Thread BaseT; IRoutine * m_pRoutine; public: /// Doesn't own pRoutine ThreadImpl() : m_pRoutine(0) { - result error = Construct(Osp::Base::Runtime::THREAD_TYPE_WORKER, - Osp::Base::Runtime::Thread::DEFAULT_STACK_SIZE, - Osp::Base::Runtime::THREAD_PRIORITY_MID); + result error = Construct(Tizen::Base::Runtime::THREAD_TYPE_WORKER, + Tizen::Base::Runtime::Thread::DEFAULT_STACK_SIZE, + Tizen::Base::Runtime::THREAD_PRIORITY_MID); ASSERT_EQUAL(error, E_SUCCESS, ("Constructing thread error")); } @@ -45,7 +45,7 @@ namespace threads return BaseT::Join(); } - virtual Osp::Base::Object * Run() + virtual Tizen::Base::Object * Run() { m_pRoutine->Do(); return 0; diff --git a/coding/internal/file64_api.hpp b/coding/internal/file64_api.hpp index 1b30cd5e4b..7600dfa28d 100644 --- a/coding/internal/file64_api.hpp +++ b/coding/internal/file64_api.hpp @@ -6,8 +6,8 @@ #define fseek64 _fseeki64 #define ftell64 _ftelli64 -#elif defined(OMIM_OS_BADA) - STATIC_ASSERT(sizeof(_off64_t) == 8); +#elif defined(OMIM_OS_TIZEN) + //STATIC_ASSERT(sizeof(_off64_t) == 8); #define fseek64 fseeko64 #define ftell64 ftello64 diff --git a/graphics/opengl/opengl.cpp b/graphics/opengl/opengl.cpp index f11f300905..2e6a387f78 100644 --- a/graphics/opengl/opengl.cpp +++ b/graphics/opengl/opengl.cpp @@ -6,8 +6,8 @@ #include "../../std/bind.hpp" -#ifdef OMIM_OS_BADA - #include +#ifdef OMIM_OS_TIZEN + #include #endif @@ -148,9 +148,6 @@ namespace graphics { if (err) { -#ifdef OMIM_OS_BADA - AppLog("%s", err); -#endif LOG(LERROR, (err, srcPt.FileName(), srcPt.Line())); } } @@ -165,7 +162,7 @@ namespace graphics // case GL_STACK_OVERFLOW: return "GL_STACK_OVERFLOW"; //< not supported in OpenGL ES2.0 // case GL_STACK_UNDERFLOW: return "GL_STACK_UNDERFLOW"; //< not supported in OpenGL ES2.0 case GL_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY"; -#ifdef OMIM_OS_BADA /* Errors / GetError return values */ +#ifdef OMIM_OS_TIZEN /* Errors / GetError return values */ case EGL_SUCCESS : return 0; case EGL_NOT_INITIALIZED : return "EGL_NOT_INITIALIZED"; case EGL_BAD_ACCESS : return "EGL_BAD_ACCESS"; @@ -191,7 +188,7 @@ namespace graphics LogError(Error2String(glGetError()), srcPt); } -#ifdef OMIM_OS_BADA +#ifdef OMIM_OS_TIZEN void CheckEGLError(my::SrcPoint const & srcPt) { LogError(Error2String(eglGetError()), srcPt); diff --git a/graphics/opengl/opengl.hpp b/graphics/opengl/opengl.hpp index 11545381f0..1295c98f59 100644 --- a/graphics/opengl/opengl.hpp +++ b/graphics/opengl/opengl.hpp @@ -11,9 +11,9 @@ #define GL_GLEXT_PROTOTYPES #include "../../3party/GL/glext.h" -#elif defined(OMIM_OS_BADA) - #include - using namespace Osp::Graphics::Opengl; +#elif defined(OMIM_OS_TIZEN) + #include + using namespace Tizen::Graphics::Opengl; #define OMIM_GL_ES #elif defined(OMIM_OS_MAC) || defined(OMIM_OS_IPHONE)