Add GetResourceStoragePath 44/250544/3
authorhuiyu.eun <huiyu.eun@samsung.com>
Tue, 12 May 2020 03:01:31 +0000 (12:01 +0900)
committerhuiyu eun <huiyu.eun@samsung.com>
Tue, 12 Jan 2021 02:09:32 +0000 (02:09 +0000)
Gets the absolute path to the application resource directory. The resource files are delivered with the application package.

Change-Id: I7ea92e7600a2fcefad52d5de38641cbd8d2b0d71
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp

index 0506ae0..5590aa0 100644 (file)
@@ -413,6 +413,12 @@ public:
   void GetAppId( std::string& appId );
 
   /**
+   * Gets path for resource storage.
+   * @param[out] path Path for resource storage
+   */
+  void GetResourceStoragePath( std::string& path );
+
+  /**
    * @copydoc Dali::Adaptor::SurfaceResizePrepare
    */
   void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
index af3ceb2..cff3073 100755 (executable)
@@ -76,7 +76,23 @@ std::string Adaptor::GetApplicationPackageName()
   return appname;
 }
 
-void Adaptor::GetDataStoragePath( std::string& path)
+void Adaptor::GetResourceStoragePath( std::string& path )
+{
+#ifdef USE_APPFW
+  char *pathInt = app_get_resource_path();
+  if ( pathInt )
+  {
+    path = pathInt;
+    free( pathInt );
+  }
+  else
+  {
+    path = "";
+  }
+#endif
+}
+
+void Adaptor::GetDataStoragePath( std::string& path )
 {
 #ifdef USE_APPFW
   char *pathInt = app_get_data_path();