Implement recovery of ReadonlyUpdateUninstall
[platform/core/appfw/app-installers.git] / src / common / recovery_file.cc
index 815c433..cd1b632 100644 (file)
@@ -35,6 +35,7 @@ const char kRecoveryDeltaString[] = "DELTA";
 const char kRecoveryMountInstallString[] = "MOUNTINSTALL";
 const char kRecoveryMountUpdateString[] = "MOUNTUPDATE";
 const char kRecoveryReadonlyUpdateInstallString[] = "READONLYUPDATEINSTALL";
+const char kRecoveryReadonlyUpdateUninstallString[] = "READONLYUPDATEUNINSTALL";
 const char kRecoveryUnknownString[] = "UNKNOWN";
 
 const std::map<std::string, ci::RequestType> kStringToRequestMap = {
@@ -47,6 +48,8 @@ const std::map<std::string, ci::RequestType> kStringToRequestMap = {
   {kRecoveryMountUpdateString, ci::RequestType::MountUpdate},
   {kRecoveryReadonlyUpdateInstallString,
       ci::RequestType::ReadonlyUpdateInstall},
+  {kRecoveryReadonlyUpdateUninstallString,
+      ci::RequestType::ReadonlyUpdateUninstall},
 };
 
 std::string TruncateNewLine(const char* data) {
@@ -256,6 +259,9 @@ bool RecoveryFile::WriteAndCommitFileContent() {
   case RequestType::ReadonlyUpdateInstall:
     ofs << kRecoveryReadonlyUpdateInstallString << std::endl;
     break;
+  case RequestType::ReadonlyUpdateUninstall:
+    ofs << kRecoveryReadonlyUpdateUninstallString << std::endl;
+    break;
   default:
     ofs << kRecoveryUnknownString << std::endl;
     break;