[Release] wrt-installer_0.1.53
[framework/web/wrt-installer.git] / src / misc / widget_location.h
index 70c186a..0cdcbdd 100644 (file)
@@ -62,6 +62,8 @@ class WidgetLocation
       public:
         DirectoryDeletor();
         DirectoryDeletor(std::string tempPath);
+        DirectoryDeletor(bool isPreload);
+
         ~DirectoryDeletor();
         std::string getTempPath() const;
 
@@ -99,14 +101,12 @@ class WidgetLocation
      */
     WidgetLocation(const std::string & widgetname, std::string sourcePath,
                    WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP,
-                   InstallLocationType ltype =
-                       INSTALL_LOCATION_TYPE_NOMAL);
+                   bool isReadonly = false);
 
     WidgetLocation(const std::string & widgetname, std::string sourcePath,
                    std::string dirPath,
                    WrtDB::PackagingType t = WrtDB::PKG_TYPE_NOMAL_WEB_APP,
-                   InstallLocationType ltype =
-                       INSTALL_LOCATION_TYPE_NOMAL);
+                   bool isReadonly = false);
 
     ~WidgetLocation();
 
@@ -114,12 +114,14 @@ class WidgetLocation
     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
+    std::string getBinaryDir() const;  // /opt/apps/[package]/bin or /usr/apps/[package]/bin
+    std::string getUserBinaryDir() const;  // /opt/apps/[package]/bin
     std::string getExecFile() const;   // /opt/apps/[package]/bin/[package]
-    std::string getBackupDir() const;  // /opt/apps/[package]/backup
-    std::string getBackupSourceDir() const; // /opt/apps/[pkg]/backup/res/wgt
-    std::string getBackupBinaryDir() const; // /opt/apps/[pkg]/backup/bin
-    std::string getBackupExecFile() const;  // /opt/apps/[pkg]/backup/bin/[pkg]
+    std::string getBackupDir() const;  // /opt/apps/[package].backup
+    std::string getBackupSourceDir() const; // /opt/apps/[pkg].backup/res/wgt
+    std::string getBackupBinaryDir() const; // /opt/apps/[pkg].backup/bin
+    std::string getBackupExecFile() const;  // /opt/apps/[pkg].backup/bin/[pkg]
+    std::string getBackupPrivateDir() const;  // /opt/apps/[pkg].backup/data
     std::string getUserDataRootDir() const; // /opt/usr/apps/[package]
     std::string getPrivateStorageDir() const; // /opt/usr/apps/[package]/data