[4.0] fixed bug about PNG_COLOR_TYPE_GRAY_ALPHA
[platform/core/uifw/dali-adaptor.git] / platform-abstractions / tizen / tizen-platform-abstraction.h
index 99c54a9..13db481 100644 (file)
@@ -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 <dali/integration-api/platform-abstraction.h>
-#include <dali/integration-api/resource-cache.h>
 #include <dali/public-api/common/dali-common.h>
 
 #include <string>
 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 &microSeconds);
-
-  /**
-   * @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__