a7ee50434c1e863558c7d8c36b721e200fa0526a
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_change_ownership_and_permission.h
1 /* 2016, Copyright © Intel Coporation, license APACHE-2.0, see LICENSE file */
2 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3 // Use of this source code is governed by a apache 2.0 license that can be
4 // found in the LICENSE file.
5
6 #ifndef COMMON_STEP_FILESYSTEM_STEP_CHANGE_OWNERSHIP_AND_PERMISSION_H_
7 #define COMMON_STEP_FILESYSTEM_STEP_CHANGE_OWNERSHIP_AND_PERMISSION_H_
8
9 #include <manifest_parser/utils/logging.h>
10
11 #include "common/installer_context.h"
12
13 #include "common/step/step.h"
14
15 namespace common_installer {
16 namespace filesystem {
17
18 /**
19  * \brief step responsible for changing ownership from system uid to actual user.
20  *        Used by WGT and TPK
21  */
22 class StepChangeOwnershipAndPermission : public Step {
23  public:
24   using Step::Step;
25
26   explicit StepChangeOwnershipAndPermission(InstallerContext* context,
27       bool skip_symlink);
28
29   Status process() override;
30   Status clean() override { return Status::OK; }
31   Status undo() override { return Status::OK; }
32   Status precheck() override;
33
34   bool skip_symlink_;
35
36   STEP_NAME(ChangeOwnershipAndPermission)
37 };
38
39 }  // namespace filesystem
40 }  // namespace common_installer
41
42 #endif  // COMMON_STEP_FILESYSTEM_STEP_CHANGE_OWNERSHIP_AND_PERMISSION_H_