Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / mount / step_mount_recover.h
1 // Copyright (c) 2016 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.
4
5 #ifndef COMMON_STEP_MOUNT_STEP_MOUNT_RECOVER_H_
6 #define COMMON_STEP_MOUNT_STEP_MOUNT_RECOVER_H_
7
8 #include <manifest_parser/utils/logging.h>
9
10 #include <filesystem>
11
12 #include "common/installer_context.h"
13 #include "common/mount_base.h"
14 #include "common/step/recovery/step_recovery.h"
15
16 namespace common_installer {
17 namespace mount {
18
19 /**
20  * \brief Responsible for mounting package zip in recovery mode
21  */
22 class StepMountRecover : public MountBase, public recovery::StepRecovery {
23  public:
24   using MountBase::MountBase;
25   using StepRecovery::StepRecovery;
26
27   Status RecoveryNew() override { return Status::OK; }
28   Status RecoveryUpdate() override { return Status::OK; }
29   Status RecoveryDelta() override { return Status::OK; }
30   Status RecoveryMountNew() override { return Status::OK; }
31   Status RecoveryMountUpdate() override;
32   Status Cleanup() override;
33
34   Status clean() override;
35   Status undo() override;
36
37  private:
38   std::unique_ptr<IZipInterface> CreateZipInterface(
39       const std::filesystem::path& mount_path) override;
40   Status UmountPackagePath();
41
42   STEP_NAME(MountRecover)
43 };
44
45 }  // namespace mount
46 }  // namespace common_installer
47
48 #endif  // COMMON_STEP_MOUNT_STEP_MOUNT_RECOVER_H_