/* treat the request */
switch (pkgmgr_->GetRequestType()) {
case ci::RequestType::Install : {
+ InstallSteps();
+ break;
+ }
+ case ci::RequestType::Update: {
+ UpdateSteps();
+ break;
+ }
+ case ci::RequestType::Uninstall: {
+ UninstallSteps();
+ break;
+ }
+ case ci::RequestType::Reinstall: {
+ ReinstallSteps();
+ break;
+ }
+ case ci::RequestType::Delta: {
+ DeltaSteps();
+ break;
+ }
+ case ci::RequestType::Recovery: {
+ RecoverySteps();
+ break;
+ }
+ case ci::RequestType::MountInstall: {
+ MountInstallSteps();
+ break;
+ }
+ case ci::RequestType::MountUpdate: {
+ MountUpdateSteps();
+ break;
+ }
+ case ci::RequestType::ManifestDirectInstall: {
+ ManifestDirectInstallSteps();
+ break;
+ }
+ case ci::RequestType::ManifestDirectUpdate: {
+ ManifestDirectUpdateSteps();
+ break;
+ }
+ case ci::RequestType::ReadonlyUpdateInstall: {
+ ReadonlyUpdateInstallSteps();
+ break;
+ }
+ case ci::RequestType::ReadonlyUpdateUninstall: {
+ ReadonlyUpdateUninstallSteps();
+ break;
+ }
+ case ci::RequestType::ManifestPartialInstall: {
+ ManifestPartialInstallSteps();
+ break;
+ }
+ case ci::RequestType::ManifestPartialUpdate: {
+ ManifestPartialUpdateSteps();
+ break;
+ }
+ case ci::RequestType::PartialUninstall: {
+ ManifestPartialUninstallSteps();
+ break;
+ }
+ case ci::RequestType::Move: {
+ MoveSteps();
+ break;
+ }
+ case ci::RequestType::EnablePkg: {
+ EnablePkgSteps();
+ break;
+ }
+ case ci::RequestType::DisablePkg: {
+ DisablePkgSteps();
+ break;
+ }
+ case ci::RequestType::MigrateExtImg: {
+ MigrateExtImgSteps();
+ break;
+ }
+ default: {
+ DefaultSteps();
+ }
+ }
+}
+ void WgtInstaller::InstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::filesystem::StepUnzip>();
AddStep<wgt::configuration::StepParse>(
wgt::filesystem::WgtAdditionalSharedDirs);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::Update: {
+ }
+
+ void WgtInstaller::UpdateSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::filesystem::StepUnzip>();
AddStep<wgt::configuration::StepParse>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::Uninstall: {
+ }
+
+ void WgtInstaller::UninstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::pkgmgr::StepCheckRemovable>();
AddStep<ci::security::StepRevokeSecurity>();
AddStep<ci::pkgmgr::StepRemoveManifest>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::Reinstall: {
+ }
+
+ void WgtInstaller::ReinstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::configuration::StepCheckRDSManifest>();
AddStep<wgt::configuration::StepParse>(
AddStep<ci::security::StepUpdateSecurity>();
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::Delta: {
+ }
+
+ void WgtInstaller::DeltaSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::filesystem::StepUnzip>();
AddStep<wgt::configuration::StepParse>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::Recovery: {
+ }
+
+ void WgtInstaller::RecoverySteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::recovery::StepOpenRecoveryFile>();
AddStep<ci::configuration::StepParseManifest>(
AddStep<ci::pkgmgr::StepRecoverApplication>();
AddStep<ci::filesystem::StepRecoverChangeOwner>();
AddStep<ci::security::StepRecoverSecurity>();
- break;
- }
- case ci::RequestType::MountInstall: {
+ }
+
+ void WgtInstaller::MountInstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::mount::StepMountUnpacked>();
AddStep<wgt::configuration::StepParse>(
wgt::filesystem::WgtAdditionalSharedDirs);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::MountUpdate: {
+ }
+
+ void WgtInstaller::MountUpdateSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::mount::StepMountUnpacked>();
AddStep<wgt::configuration::StepParse>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::ManifestDirectInstall: {
+ }
+
+ void WgtInstaller::ManifestDirectInstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::configuration::StepParse>(
wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
wgt::filesystem::WgtAdditionalSharedDirs);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::ManifestDirectUpdate: {
+ }
+
+ void WgtInstaller::ManifestDirectUpdateSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::configuration::StepParse>(
wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
ci::Plugin::ActionType::Upgrade);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::ReadonlyUpdateInstall: {
+ }
+
+ void WgtInstaller::ReadonlyUpdateInstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::filesystem::StepUnzip>();
AddStep<wgt::configuration::StepParse>(
AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::ReadonlyUpdateUninstall: {
+ }
+
+ void WgtInstaller::ReadonlyUpdateUninstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::pkgmgr::StepCheckRemovable>();
AddStep<ci::security::StepUpdateSecurity>();
AddStep<ci::pkgmgr::StepRemoveManifest>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Upgrade);
- break;
- }
- case ci::RequestType::ManifestPartialInstall: {
+ }
+
+ void WgtInstaller::ManifestPartialInstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::configuration::StepParse>(
wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>(
wgt::filesystem::WgtAdditionalSharedDirs);
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::ManifestPartialUpdate: {
+ }
+
+ void WgtInstaller::ManifestPartialUpdateSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::configuration::StepParse>(
wgt::configuration::StepParse::ConfigLocation::INSTALLED, true);
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
- break;
- }
- case ci::RequestType::PartialUninstall: {
+ }
+
+ void WgtInstaller::ManifestPartialUninstallSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::pkgmgr::StepCheckRemovable>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<wgt::encryption::StepRemoveEncryptionData>();
AddStep<ci::security::StepRevokeSecurity>();
- break;
- }
- case ci::RequestType::Move: {
+ }
+
+ void WgtInstaller::MoveSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::filesystem::StepMoveInstalledStorage>();
AddStep<ci::security::StepRegisterSecurity>();
- break;
- }
- case ci::RequestType::EnablePkg: {
+ }
+
+ void WgtInstaller::EnablePkgSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Enable);
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Uninstall);
- break;
- }
- case ci::RequestType::DisablePkg: {
+ }
+
+ void WgtInstaller::DisablePkgSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::configuration::StepParseManifest>(
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable);
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Uninstall);
- break;
- }
- case ci::RequestType::MigrateExtImg: {
+ }
+
+ void WgtInstaller::MigrateExtImgSteps() {
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::security::StepMigrateLegacyExtImage>();
AddStep<ci::filesystem::StepChangeOwnershipAndPermission>();
- break;
- }
- default: {
+ }
+
+ void WgtInstaller::DefaultSteps() {
AddStep<ci::configuration::StepFail>();
- }
}
-}
} // namespace wgt