Reworked sharing of widget's shared/res directory.
[platform/core/appfw/wgt-backend.git] / src / wgt / step / filesystem / step_wgt_patch_storage_directories.h
1 // Copyright (c) 2015 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 WGT_STEP_FILESYSTEM_STEP_WGT_PATCH_STORAGE_DIRECTORIES_H_
6 #define WGT_STEP_FILESYSTEM_STEP_WGT_PATCH_STORAGE_DIRECTORIES_H_
7
8 #include <common/step/step.h>
9 #include <manifest_parser/utils/logging.h>
10
11 namespace wgt {
12 namespace filesystem {
13
14 /**
15  * \brief Installation (WGT).
16  *        Responsible for linking the content of widget's shared/res directory
17  *        into package's shared/res directory and vice versa for Tizen widget
18  *        with API version >= 3.0
19  */
20 class StepWgtPatchStorageDirectories :
21     public common_installer::Step {
22  public:
23   using Step::Step;
24
25   Status process() override;
26   Status clean() override { return Status::OK; }
27   Status undo() override { return Status::OK; }
28   Status precheck() override { return Status::OK; }
29
30  private:
31   bool ShareDirFor3x();
32   bool CreatePrivateTmpDir();
33
34   STEP_NAME(PatchWgtStorageDirectories)
35 };
36
37 }  // namespace filesystem
38 }  // namespace wgt
39
40 #endif  // WGT_STEP_FILESYSTEM_STEP_WGT_PATCH_STORAGE_DIRECTORIES_H_