#include <widget_install/task_update_files.h>
#include <widget_install/task_new_db_insert.h>
#include <widget_install/task_remove_backup.h>
+#include <widget_install/task_encrypt_resource.h>
#include <widget_install/widget_install_errors.h>
#include <widget_install/widget_install_context.h>
#include <string>
const int RESERVED_COUNT = 20; //number of chars reserved in name (e.g. for '.desktop')
const int MAX_TIZENID_LENTH = 255 - RESERVED_COUNT;
+static const DPL::String SETTING_VALUE_ENCRYPTION = L"encryption";
+static const DPL::String SETTING_VALUE_ENCRYPTION_ENABLE = L"enable";
+
class InstallerTaskFail :
public DPL::TaskDecl<InstallerTaskFail>
{
m_installerContext.browserRequest,
m_installerContext.widgetConfig.pType);
WidgetUpdateInfo update = detectWidgetUpdate(configData);
-
+ bool needEncryption = detectResourceEncryption(configData);
// Configure installation
ConfigureResult result = ConfigureInstallation(widgetPath,
}
AddTask(new TaskWidgetConfig(m_installerContext));
AddTask(new TaskCertify(m_installerContext));
+ if (needEncryption) {
+ AddTask(new TaskEncryptResource(m_installerContext));
+ }
AddTask(new TaskDbUpdate(m_installerContext));
// TODO: Update progress information for this task
return pType;
}
+bool JobWidgetInstall::detectResourceEncryption(const WrtDB::ConfigParserData &configData)
+{
+ FOREACH(it, configData.settingsList)
+ {
+ if (it->m_name == SETTING_VALUE_ENCRYPTION &&
+ it->m_value == SETTING_VALUE_ENCRYPTION_ENABLE) {
+ LogDebug("resource need encryption");
+ return true;
+ }
+ }
+ return false;
+}
+
} //namespace WidgetInstall
} //namespace Jobs