Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / step / pkgmgr / step_run_parser_plugins.h
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.
4
5 #ifndef COMMON_STEP_PKGMGR_STEP_RUN_PARSER_PLUGINS_H_
6 #define COMMON_STEP_PKGMGR_STEP_RUN_PARSER_PLUGINS_H_
7
8 #include <manifest_parser/utils/logging.h>
9
10 #include <pkgmgrinfo_basic.h>
11
12 #include <filesystem>
13 #include <memory>
14 #include <string>
15 #include <vector>
16
17 #include "common/plugins/plugin.h"
18 #include "common/plugins/plugin_manager.h"
19 #include "common/step/step.h"
20
21 namespace common_installer {
22 namespace pkgmgr {
23
24 class StepRunParserPlugin : public Step {
25  public:
26   explicit StepRunParserPlugin(InstallerContext* context,
27                                Plugin::ActionType action_type);
28
29   Step::Status process() override;
30   Step::Status clean() override;
31   Step::Status undo() override;
32   Step::Status precheck() { return Status::OK; }
33
34  private:
35   bool ProcessPlugins(const std::filesystem::path& xml_path,
36                               manifest_x* manifest,
37                               Plugin::ActionType action_type);
38
39   bool InitPluginManager(const std::filesystem::path& xml_path,
40                          manifest_x* manifest, uid_t uid);
41
42   Plugin::ActionType action_type_;
43   std::unique_ptr<PluginManager> plugin_manager_;
44
45   STEP_NAME(RunParserPlugin)
46 };
47
48 }  // namespace pkgmgr
49 }  // namespace common_installer
50
51 #endif  //  COMMON_STEP_PKGMGR_STEP_RUN_PARSER_PLUGINS_H_