labeling the contents under .mmc
[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 "common/installer_context.h"
9 #include "common/step/step.h"
10
11 namespace common_installer {
12 namespace filesystem {
13
14 class StepMoveInstalledStorage : public Step {
15  public:
16   using Step::Step;
17
18   Status process() override;
19
20   Status clean() override;
21   Status undo() override;
22   Status precheck() override { return Status::OK; }
23
24  private:
25   void SetTepPaths();
26   bool MoveTep();
27   bool MoveBackTep();
28
29   boost::filesystem::path old_location_;
30   boost::filesystem::path new_location_;
31
32   STEP_NAME(MoveInstalledStorage)
33 };
34
35 }  // namespace filesystem
36 }  // namespace common_installer
37
38 #endif  // COMMON_STEP_FILESYSTEM_STEP_MOVE_INSTALLED_STORAGE_H_