1 // Copyright (c) 2017 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_UPDATE_STORAGE_DIRECTORIES_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_UPDATE_STORAGE_DIRECTORIES_H_
8 #include <boost/filesystem/path.hpp>
10 #include <manifest_parser/utils/logging.h>
12 #include "common/step/step.h"
14 namespace common_installer {
15 namespace filesystem {
17 class StepUpdateStorageDirectories : public common_installer::Step {
21 explicit StepUpdateStorageDirectories(InstallerContext* context) :
22 Step(context), mode_(UpdateMode::NONE) {}
24 Status process() override;
25 Status clean() override;
26 Status undo() override;
27 Status precheck() override;
29 STEP_NAME(UpdateStorageDirectories)
32 enum class UpdateMode : int {
38 bool UpdatePerUserStorageDirectories();
39 bool UpdateStorageDirectories();
40 bool CleanUpdatePerUserStorageDirectories();
41 bool CleanUpdateStorageDirectories();
42 bool UndoUpdatePerUserStorageDirectories();
43 bool UndoUpdateStorageDirectories();
48 } // namespace filesystem
49 } // namespace common_installer
51 #endif // COMMON_STEP_FILESYSTEM_STEP_UPDATE_STORAGE_DIRECTORIES_H_