1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_STEP_FILESYSTEM_STEP_RECOVER_FILES_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_RECOVER_FILES_H_
8 #include <manifest_parser/utils/logging.h>
12 #include "common/installer_context.h"
13 #include "common/step/recovery/step_recovery.h"
15 namespace common_installer {
16 namespace filesystem {
19 * @brief The StepRecoverFiles class
20 * Fixes state of package files in recovery mode.
22 * For recovering new installation, package files are removed.
23 * For recovering update installation, old package files are restored to its
26 class StepRecoverFiles : public recovery::StepRecovery {
28 using StepRecovery::StepRecovery;
30 Status RecoveryNew() override;
31 Status RecoveryUpdate() override;
32 Status RecoveryMountNew() override;
33 Status RecoveryMountUpdate() override;
34 Status RecoveryReadonlyUpdateInstall() override;
35 Status Cleanup() override;
38 virtual bool ClearPath(const std::filesystem::path& path);
40 STEP_NAME(RecoverFiles)
43 } // namespace filesystem
44 } // namespace common_installer
46 #endif // COMMON_STEP_FILESYSTEM_STEP_RECOVER_FILES_H_