Create private tmp directory in skel
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_create_per_user_storage_directories.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_CREATE_PER_USER_STORAGE_DIRECTORIES_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_CREATE_PER_USER_STORAGE_DIRECTORIES_H_
7
8 #include <manifest_parser/utils/logging.h>
9
10 #include "common/step/step.h"
11
12 namespace common_installer {
13 namespace filesystem {
14
15 /**
16  * \brief Installation.
17  *        Responsible for creating shared and data directories for users (wgt/tpk)
18  *
19  * * process method implements creation of data and shared directories for
20  *   package in case of global installation for each user. Normally,
21  *   "storage"/"shared" directories are created in StepCreateStorageDirectories.
22  *
23  * * Other methods are empty.
24  */
25 class StepCreatePerUserStorageDirectories : public common_installer::Step {
26  public:
27   using Step::Step;
28
29   StepCreatePerUserStorageDirectories(InstallerContext* context)
30       : Step(context), additional_shared_dirs_(std::vector<const char*>()) {}
31
32   StepCreatePerUserStorageDirectories(InstallerContext* context,
33       const std::vector<const char*> additional_shared_dirs)
34       : Step(context), additional_shared_dirs_(additional_shared_dirs) {}
35
36   Status process() override;
37   Status clean() override { return Status::OK; }
38   Status undo() override { return Status::OK; }
39   Status precheck() override { return Status::OK; }
40
41 private:
42   const std::vector<const char*> additional_shared_dirs_;
43
44   STEP_NAME(CreatePerUserStorageDirectories)
45 };
46
47 }  // namespace filesystem
48 }  // namespace common_installer
49
50 #endif  // COMMON_STEP_FILESYSTEM_STEP_CREATE_PER_USER_STORAGE_DIRECTORIES_H_