Cleanup platform abstraction API (to allow removal of dead code from Adaptor)
[platform/core/uifw/dali-core.git] / dali / integration-api / platform-abstraction.h
index d39fe6c..3caac53 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali/integration-api/resource-cache.h>
 #include <dali/integration-api/bitmap.h> ///@todo Remove this include (a bunch of stuff needs to include it though)
 #include <dali/public-api/images/image-operations.h>
+#include <dali/public-api/common/dali-vector.h>
 
 namespace Dali
 {
@@ -30,9 +31,6 @@ namespace Dali
 namespace Integration
 {
 
-class DynamicsFactory;
-
-
 /**
  * PlatformAbstraction is an abstract interface, used by Dali to access platform specific services.
  * A concrete implementation must be created for each platform, and provided when creating the
@@ -99,7 +97,7 @@ public:
                                                bool orientationCorrection = true) = 0;
 
   /**
-   @brief Determine the size of an image the resource loaders will provide when
+   @brief Determine the size of an image the resource loaders will provide when
    * given the same image loading parameters.
    *
    * This is a synchronous request.
@@ -144,12 +142,6 @@ public:
   virtual ResourcePointer LoadResourceSynchronously( const ResourceType& resourceType, const std::string& resourcePath ) = 0;
 
   /**
-   * Request that a resource be saved to the native filesystem.
-   * This is an asynchronous request.
-   */
-  virtual void SaveResource(const ResourceRequest& request) = 0;
-
-  /**
    * Cancel an ongoing LoadResource() request.
    * Multi-threading note: this method will be called from the main thread only i.e. not
    * from within the Core::Render() method.
@@ -159,13 +151,6 @@ public:
   virtual void CancelLoad(ResourceId id, ResourceTypeId typeId) = 0;
 
   /**
-   * Query whether any asynchronous LoadResource() requests are ongoing.
-   * Multi-threading note: this method may be called from either the main or rendering thread.
-   * @return True if resources are being loaded.
-   */
-  virtual bool IsLoading() = 0;
-
-  /**
    * Retrieve newly loaded resources.
    * If no resources have finished loading, then this method returns immediately.
    * Multi-threading note: this method will be called from the update thread, from within
@@ -203,33 +188,12 @@ public:
   virtual int GetDefaultFontSize() const = 0;
 
   /**
-   * Sets horizontal and vertical pixels per inch value that is used by the display
-   * @param[in] dpiHorizontal horizontal dpi value
-   * @param[in] dpiVertical   vertical dpi value
-   */
-  virtual void SetDpi (unsigned int dpiHorizontal, unsigned int dpiVertical) = 0;
-
-  /**
    * Load a file into a buffer
    * @param[in] filename The filename to load
    * @param[out] buffer  A buffer to receive the file.
    * @result             true if the file is loaded.
    */
-  virtual bool LoadFile( const std::string& filename, std::vector< unsigned char >& buffer ) const = 0;
-
-  /**
-   * Load a file into a buffer
-   * @param[in] filename The filename to save
-   * @param[out] buffer  A buffer containing some data
-   *                     The buffer is implemeneted with a std::vector. The size() member specifies the buffer length.
-   * @result             true if the file is saved.
-   */
-  virtual bool SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const = 0;
-
-  /**
-   * Get a pointer to the DynamicsFactory.
-   */
-  virtual DynamicsFactory* GetDynamicsFactory() = 0;
+  virtual bool LoadFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const = 0;
 
   /**
    * Load a shader binary file into a buffer
@@ -237,7 +201,16 @@ public:
    * @param[out] buffer  A buffer to receive the file.
    * @result             true if the file is loaded.
    */
-  virtual bool LoadShaderBinFile( const std::string& filename, std::vector< unsigned char >& buffer ) const = 0;
+  virtual bool LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const = 0;
+
+  /**
+   * Save a shader binary file to the resource file system.
+   * @param[in] filename The shader binary filename to save to.
+   * @param[in] buffer  A buffer to write the file from.
+   * @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;
 
 }; // class PlatformAbstraction