*/
#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
{
public: // PlatformAbstraction overrides
/**
- * @copydoc PlatformAbstraction::Suspend()
- */
- virtual void Suspend();
-
- /**
- * @copydoc PlatformAbstraction::Resume()
- */
- virtual void Resume();
-
- /**
* @copydoc PlatformAbstraction::GetClosestImageSize()
*/
virtual ImageDimensions GetClosestImageSize( const std::string& filename,
bool orientationCorrection );
/**
- * @copydoc PlatformAbstraction::LoadResource()
+ * @copydoc PlatformAbstraction::LoadImageSynchronously()
*/
- virtual void LoadResource(const Integration::ResourceRequest& request);
-
- /**
- * @copydoc PlatformAbstraction::LoadResourceSynchronously()
- */
- 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()
TizenPlatformAbstraction( const TizenPlatformAbstraction& ); ///< Undefined
TizenPlatformAbstraction& operator=( const TizenPlatformAbstraction& ); ///< Undefined
- ResourceLoader* mResourceLoader;
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__