X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=platform-abstractions%2Ftizen%2Ftizen-platform-abstraction.h;h=13db481811931d24829d0cf7b1e805838eb5be1a;hb=c52ee0458e550b1a9c1441d554f8bd489a27cfde;hp=99c54a9b541326af374e7a0986c6f4bbb1852d9f;hpb=03467948f0d40e4e732b101ff1407d188b5dc0f4;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/platform-abstractions/tizen/tizen-platform-abstraction.h b/platform-abstractions/tizen/tizen-platform-abstraction.h index 99c54a9..13db481 100644 --- a/platform-abstractions/tizen/tizen-platform-abstraction.h +++ b/platform-abstractions/tizen/tizen-platform-abstraction.h @@ -2,7 +2,7 @@ #define __DALI_TIZEN_PLATFORM_ABSTRACTION_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,6 @@ */ #include -#include #include #include @@ -27,11 +26,6 @@ namespace Dali { -/** - * Construct a platform abstraction and return it. - */ -Integration::PlatformAbstraction* CreatePlatformAbstraction(); - namespace TizenPlatform { @@ -58,21 +52,6 @@ public: // Construction & Destruction public: // PlatformAbstraction overrides /** - * @copydoc PlatformAbstraction::GetTimeMicroseconds() - */ - virtual void GetTimeMicroseconds(unsigned int &seconds, unsigned int µSeconds); - - /** - * @copydoc PlatformAbstraction::Suspend() - */ - virtual void Suspend(); - - /** - * @copydoc PlatformAbstraction::Resume() - */ - virtual void Resume(); - - /** * @copydoc PlatformAbstraction::GetClosestImageSize() */ virtual ImageDimensions GetClosestImageSize( const std::string& filename, @@ -91,49 +70,14 @@ public: // PlatformAbstraction overrides bool orientationCorrection ); /** - * @copydoc PlatformAbstraction::LoadResource() - */ - virtual void LoadResource(const Integration::ResourceRequest& request); - - /** - * @copydoc PlatformAbstraction::LoadResourceSynchronously() + * @copydoc PlatformAbstraction::LoadImageSynchronously() */ - virtual Integration::ResourcePointer LoadResourceSynchronously(const Integration::ResourceType& resourceType, const std::string& resourcePath); + virtual Integration::ResourcePointer LoadImageSynchronously(const Integration::BitmapResourceType& resource, const std::string& resourcePath); /** * @copydoc PlatformAbstraction::DecodeBuffer() */ - virtual Integration::BitmapPtr DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size ); - - /** - * @copydoc PlatformAbstraction::CancelLoad() - */ - virtual void CancelLoad(Integration::ResourceId id, Integration::ResourceTypeId typeId); - - /** - * @copydoc PlatformAbstraction::GetResources() - */ - virtual void GetResources(Integration::ResourceCache& cache); - - /** - * @copydoc PlatformAbstraction::JoinLoaderThreads() - */ - virtual void JoinLoaderThreads(); - - /** - * @copydoc PlatformAbstraction::GetDefaultFontSize() - */ - virtual int GetDefaultFontSize() const; - - /** - * @copydoc PlatformAbstraction::LoadFile() - */ - virtual bool LoadFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const; - - /** - * @copydoc PlatformAbstraction::LoadFile() - */ - virtual std::string LoadFile( const std::string& filename ); + virtual Integration::BitmapPtr DecodeBuffer( const Integration::BitmapResourceType& resource, uint8_t * buffer, size_t size ); /** * @copydoc PlatformAbstraction::LoadShaderBinaryFile() @@ -152,11 +96,31 @@ public: // PlatformAbstraction overrides void SetDataStoragePath( const std::string& path ); private: - ResourceLoader* mResourceLoader; + + TizenPlatformAbstraction( const TizenPlatformAbstraction& ); ///< Undefined + TizenPlatformAbstraction& operator=( const TizenPlatformAbstraction& ); ///< Undefined + std::string mDataStoragePath; + }; +/** + * Construct a platform abstraction and return it. + * @return TizenPlatformAbstraction instance + */ +TizenPlatformAbstraction* CreatePlatformAbstraction(); + +/** + * Save a file to disk + * @param filename to create + * @param buffer to store + * @param numBytes to store + * @return true if successful, false otherwise + */ +bool SaveFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ); + } // namespace TizenPlatform + } // namespace Dali #endif // __DALI_TIZEN_PLATFORM_ABSTRACTION_H__