Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_move_installed_storage.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_FILESYSTEM_STEP_MOVE_INSTALLED_STORAGE_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_MOVE_INSTALLED_STORAGE_H_
7
8 #include <filesystem>
9
10 #include "common/installer_context.h"
11 #include "common/step/step.h"
12
13 namespace common_installer {
14 namespace filesystem {
15
16 class StepMoveInstalledStorage : public Step {
17  public:
18   using Step::Step;
19
20   explicit StepMoveInstalledStorage(InstallerContext* context);
21
22   Status process() override;
23
24   Status clean() override;
25   Status undo() override;
26   Status precheck() override;
27
28  private:
29   void SetTepPaths();
30   bool MoveTep();
31   bool MoveBackTep();
32   bool MoveExternal();
33   bool MoveBackExternal();
34   bool MoveExtended();
35   bool MoveBackExtended();
36
37   std::filesystem::path old_tep_location_;
38   std::filesystem::path new_tep_location_;
39   std::filesystem::path old_pkg_location_;
40   std::filesystem::path new_pkg_location_;
41   MoveType move_type_;
42
43   STEP_NAME(MoveInstalledStorage)
44 };
45
46 }  // namespace filesystem
47 }  // namespace common_installer
48
49 #endif  // COMMON_STEP_FILESYSTEM_STEP_MOVE_INSTALLED_STORAGE_H_