#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
*
* /opt/apps/[package_name]
* \_____________ /data
+ * \_____________ /share
* \_____________ /bin
* \_____________ /bin/[id_of_installed_package]
* \_____________ /res/wgt/
{
public:
DirectoryDeletor();
+ DirectoryDeletor(std::string tempPath);
~DirectoryDeletor();
std::string getTempPath() const;
private:
* @brief WidgetLocation Builds paths for widget location during installation
*
* @param widgetname name of widget
- * @param browserRequest is browser Request
* @param sourcePath given source path
* @param t declaraced type of widget if type is needed
*
* In destruction removes temporary directory
*/
WidgetLocation(const std::string & widgetname, std::string sourcePath,
- bool browserRequest = false, WrtDB::PkgType t = WrtDB::PKG_TYPE_TIZEN_WEBAPP);
+ 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,
+ 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
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]
-
- bool browserRequest() const;
+ 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
/**
private:
std::string m_widgetSource; // Source widget zip file/widget url
- bool m_browser; // is browser request installation
std::string m_pkgname; //name of package
std::string m_iconPath; //installed icon path
- WrtDB::PkgType m_type;
+ 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