1 // Copyright (c) 2016 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.
5 #ifndef COMMON_STEP_PKGMGR_STEP_RUN_PARSER_PLUGINS_H_
6 #define COMMON_STEP_PKGMGR_STEP_RUN_PARSER_PLUGINS_H_
8 #include <manifest_parser/utils/logging.h>
10 #include <pkgmgrinfo_basic.h>
17 #include "common/plugins/plugin.h"
18 #include "common/plugins/plugin_manager.h"
19 #include "common/step/step.h"
21 namespace common_installer {
24 class StepRunParserPlugin : public Step {
26 explicit StepRunParserPlugin(InstallerContext* context,
27 Plugin::ActionType action_type);
29 Step::Status process() override;
30 Step::Status clean() override;
31 Step::Status undo() override;
32 Step::Status precheck() { return Status::OK; }
35 bool ProcessPlugins(const std::filesystem::path& xml_path,
37 Plugin::ActionType action_type);
39 bool InitPluginManager(const std::filesystem::path& xml_path,
40 manifest_x* manifest, uid_t uid);
42 Plugin::ActionType action_type_;
43 std::unique_ptr<PluginManager> plugin_manager_;
45 STEP_NAME(RunParserPlugin)
49 } // namespace common_installer
51 #endif // COMMON_STEP_PKGMGR_STEP_RUN_PARSER_PLUGINS_H_