#define __DALI_INTEGRATION_PLATFORM_ABSTRACTION_H__
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
namespace Integration
{
-
+typedef uint32_t ResourceId;
typedef IntrusivePtr<Dali::RefObject> ResourcePointer;
/**
{
public:
- /**
- * Virtual destructor.
- */
- virtual ~PlatformAbstraction() {}
-
// Resource Loading
/**
bool orientationCorrection = true) = 0;
/**
- * Request a resource from the native filesystem. This is a synchronous request, i.e.
- * it will block the main loop whilst executing. It should therefore be used sparingly.
+ * Request an image from the native filesystem. This is a synchronous request, i.e.
+ * it will block the main loop whilst executing.
*
* Multi-threading note: this method will be called from the main thread only i.e. not
* from within the Core::Render() method.
* @param[in] resourcePath The path to the resource
* @return A pointer to a ref-counted resource
*/
- virtual ResourcePointer LoadResourceSynchronously( const ResourceType& resourceType, const std::string& resourcePath ) = 0;
+ virtual ResourcePointer LoadImageSynchronously( const BitmapResourceType& resourceType, const std::string& resourcePath ) = 0;
/**
* Decode a buffer of data synchronously.
*
* @return A pointer to the decoded buffer.
*/
- virtual BitmapPtr DecodeBuffer( const ResourceType& resourceType, uint8_t * buffer, size_t bufferSize ) = 0;
+ virtual BitmapPtr DecodeBuffer( const BitmapResourceType& resourceType, uint8_t * buffer, size_t bufferSize ) = 0;
/**
* Load a shader binary file into a buffer
* @param[out] buffer A buffer to receive the file.
* @result true if the file is loaded.
*/
- virtual bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const = 0;
+ virtual bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< uint8_t >& buffer ) const = 0;
/**
* Save a shader binary file to the resource file system.
* @param[in] numbytes Size of the buffer.
* @result true if the file is saved, else false.
*/
- virtual bool SaveShaderBinaryFile( const std::string& filename, const unsigned char * buffer, unsigned int numBytes ) const = 0;
+ virtual bool SaveShaderBinaryFile( const std::string& filename, const uint8_t * buffer, uint32_t numBytes ) const = 0;
+
+protected:
+
+ /**
+ * Virtual destructor.
+ */
+ virtual ~PlatformAbstraction() {}
}; // class PlatformAbstraction