m_context(inCont),
writer(NULL)
{
- if (false == m_context.existingWidgetInfo.isExist) {
- AddStep(&TaskManifestFile::stepCopyIconFiles);
- AddStep(&TaskManifestFile::stepCreateExecFile);
- AddStep(&TaskManifestFile::stepGenerateManifest);
- AddStep(&TaskManifestFile::stepParseManifest);
- AddStep(&TaskManifestFile::stepFinalize);
-
- AddAbortStep(&TaskManifestFile::stepAbortParseManifest);
- } else {
+ if (m_context.isUpdateMode) {
// for widget update.
AddStep(&TaskManifestFile::stepBackupIconFiles);
AddStep(&TaskManifestFile::stepCopyIconFiles);
AddStep(&TaskManifestFile::stepUpdateFinalize);
AddAbortStep(&TaskManifestFile::stepAbortIconFiles);
+ } else {
+ AddStep(&TaskManifestFile::stepCopyIconFiles);
+ AddStep(&TaskManifestFile::stepCreateExecFile);
+ AddStep(&TaskManifestFile::stepGenerateManifest);
+ AddStep(&TaskManifestFile::stepParseManifest);
+ AddStep(&TaskManifestFile::stepFinalize);
+
+ AddAbortStep(&TaskManifestFile::stepAbortParseManifest);
}
}
if(error)
LogPedantic("Failed to make a symbolic name for a file "
<< "[" << DPL::GetErrnoString(error) << "]");
- ThrowMsg(Exceptions::InstallationFailed,
+ ThrowMsg(Exceptions::FileOperationFailed,
"Symbolic link creating is not done.");
}
m_context.job->UpdateProgress(
DIR* dir = opendir(path);
if (!dir) {
LogError("icon directory doesn't exist");
- ThrowMsg(Exceptions::InternalError, path);
+ ThrowMsg(Exceptions::FileOperationFailed, path);
}
struct dirent entry;
if (code != 0) {
LogError("Manifest parser error: " << code);
- ThrowMsg(ManifestParsingError, "Parser returncode: " << code);
+ ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
}
// TODO : It will be removed. AIL update is temporary code request by pkgmgr
if (code != 0) {
LogError("Manifest parser error: " << code);
- ThrowMsg(ManifestParsingError, "Parser returncode: " << code);
+ ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
}
// TODO : It will be removed. AIL update is temporary code request by pkgmgr
setAppCategory(uiApp);
setLiveBoxInfo(manifest);
setAccount(manifest);
+ setPrivilege(manifest);
manifest.addUiApplication(uiApp);
manifest.generate(path);
if (0 != code) {
LogWarning("Manifest parser error: " << code);
- ThrowMsg(ManifestParsingError, "Parser returncode: " << code);
+ ThrowMsg(Exceptions::ManifestInvalid, "Parser returncode: " << code);
}
int ret = unlink(DPL::ToUTF8String(manifest_file).c_str());
if (0 != ret) {
liveBox.setPrimary(ConfigInfo->m_primary);
}
- if (ConfigInfo->m_autoLaunch == L"true") {
- liveBox.setAutoLaunch(appid);
- }
-
if (ConfigInfo->m_updatePeriod != L"") {
liveBox.setUpdatePeriod(ConfigInfo->m_updatePeriod);
}
manifest.addAccount(accountInfo);
}
+void TaskManifestFile::setPrivilege(Manifest& manifest)
+{
+ WrtDB::ConfigParserData::PrivilegeList privileges =
+ m_context.widgetConfig.configInfo.privilegeList;
+
+ PrivilegeType privilege;
+
+ FOREACH(it, privileges)
+ {
+ privilege.addPrivilegeName(it->name);
+ }
+
+ manifest.addPrivileges(privilege);
+}
+
} //namespace WidgetInstall
} //namespace Jobs