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), old_shared_data_exists_(false),
23 should_create_shared_data_(false) {}
25 Status process() override;
26 Status clean() override;
27 Status undo() override;
28 Status precheck() override;
30 STEP_NAME(UpdateStorageDirectories)
33 bool UpdatePerUserStorageDirectories();
34 bool UpdateStorageDirectories();
35 bool CleanUpdatePerUserStorageDirectories();
36 bool CleanUpdateStorageDirectories();
37 bool UndoUpdatePerUserStorageDirectories();
38 bool UndoUpdateStorageDirectories();
40 bool old_shared_data_exists_;
41 bool should_create_shared_data_;
44 } // namespace filesystem
45 } // namespace common_installer
47 #endif // COMMON_STEP_FILESYSTEM_STEP_UPDATE_STORAGE_DIRECTORIES_H_