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_PLUGINS_PLUGIN_MANAGER_H_
6 #define COMMON_PLUGINS_PLUGIN_MANAGER_H_
8 #include <boost/filesystem/path.hpp>
10 #include <pkgmgrinfo_basic.h>
14 #include "common/plugins/plugin.h"
15 #include "common/plugins/plugin_list_parser.h"
16 #include "common/plugins/plugin_xml_parser.h"
18 namespace common_installer {
20 /** this class manages XML and plugin lists */
23 using PluginInfoList = std::vector<std::shared_ptr<PluginInfo>>;
25 PluginManager(const std::string& xml_path,
26 const std::string& list_path,
28 : xml_parser_(xml_path),
29 list_parser_(list_path),
30 manifest_(manifest) {}
33 void RunPlugins(Plugin::ActionType action_type);
36 bool GenerateUnknownTagList(std::vector<std::string>* xml_tags);
37 bool GeneratePluginInfoList(PluginInfoList* plugin_info_list);
39 PluginsXmlParser xml_parser_;
40 PluginsListParser list_parser_;
41 manifest_x* manifest_;
42 std::vector<std::unique_ptr<Plugin>> loaded_plugins_;
45 } // namespace common_installer
47 #endif // COMMON_PLUGINS_PLUGIN_MANAGER_H_