[Release] wrt-installer_0.0.89
[framework/web/wrt-installer.git] / src / misc / widget_location.h
index ab9fa29..e04c3dd 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <dpl/wrt-dao-ro/common_dao_types.h>
 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <wrt_common_types.h>
 
 /**
  * @brief The WidgetLocation class
@@ -36,6 +37,7 @@
  *
  * /opt/apps/[package_name]
  *           \_____________ /data
+ *           \_____________ /share
  *           \_____________ /bin
  *           \_____________ /bin/[id_of_installed_package]
  *           \_____________ /res/wgt/
@@ -91,15 +93,20 @@ public:
      * In destruction removes temporary directory
      */
     WidgetLocation(const std::string & widgetname, std::string sourcePath,
-                   WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP);
+                   WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP,
+                   InstallLocationType ltype =
+                        INSTALL_LOCATION_TYPE_NOMAL);
 
     WidgetLocation(const std::string & widgetname, std::string sourcePath,
                    std::string dirPath,
-                   WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP);
+                   WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP,
+                   InstallLocationType ltype =
+                        INSTALL_LOCATION_TYPE_NOMAL);
+
     ~WidgetLocation();
 
     // Installed paths
-    std::string getInstallationDir() const;              // /opt/apps
+    std::string getInstallationDir() const;              // /opt/apps or /usr/apps
     std::string getPackageInstallationDir() const;       // /opt/apps/[package]
     std::string getSourceDir() const;                    // /opt/apps/[package]/res/wgt
     std::string getBinaryDir() const;                    // /opt/apps/[package]/bin
@@ -108,6 +115,9 @@ public:
     std::string getBackupSourceDir() const;              // /opt/apps/[package]/backup/res/wgt
     std::string getBackupBinaryDir() const;              // /opt/apps/[package]/backup/bin
     std::string getBackupExecFile() const;              // /opt/apps/[package]/backup/bin/[package]
+    std::string getUserDataRootDir() const;             // /opt/usr/apps/[package]
+    std::string getPrivateStorageDir() const;                 // /opt/usr/apps/[package]/data
+    std::string getShareDir() const;                    // /opt/usr/apps/[package]/share
 
     // Temporary paths
     /**
@@ -185,6 +195,7 @@ private:
     WrtDB::PackagingType m_type;
     std::shared_ptr<DirectoryDeletor> m_temp;      //directory
     WrtDB::ExternalLocationList m_externals;
+    std::string m_installedPath;
 };
 
 #endif // WRT_INSTALLER_SRC_MISC_WIDGET_LOCATION_H