1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
4 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
5 // Use of this source code is governed by a apache 2.0 license that can be
6 // found in the LICENSE file.
8 #ifndef WGT_STEP_SECURITY_STEP_CHECK_EXTENSION_PRIVILEGES_H_
9 #define WGT_STEP_SECURITY_STEP_CHECK_EXTENSION_PRIVILEGES_H_
11 #include <common/app_installer.h>
12 #include <common/installer_context.h>
13 #include <common/step/step.h>
14 #include <manifest_parser/utils/logging.h>
15 #include <manifest_parser/values.h>
25 * \brief Step that add user extension privileges during installation
27 class StepCheckExtensionPrivileges : public common_installer::Step {
32 * \Adds extra package privileges defined by extension manifest.
36 Status process() override;
37 Status clean() override { return Status::OK; }
38 Status undo() override { return Status::OK; }
40 * \brief Check requirements for this step
42 * \return Status::ERROR when rmanifest data are missing,
43 * Status::OK otherwise
45 Status precheck() override;
47 std::string GetExtensionPath();
48 bool CheckPrivilegeLevel(std::set<std::string> priv_set);
49 STEP_NAME(CheckExtensionPrivileges)
52 } // namespace security
55 #endif // WGT_STEP_SECURITY_STEP_CHECK_EXTENSION_PRIVILEGES_H_