1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_PLUGINS_METADATA_PLUGIN_H_
6 #define COMMON_PLUGINS_METADATA_PLUGIN_H_
13 #include "common/plugins/plugin.h"
15 namespace common_installer {
17 class MetadataPlugin : public Plugin {
19 static const char kType[];
21 static std::unique_ptr<MetadataPlugin> Create(const PluginInfo& plugin_info);
22 bool Run(xmlDocPtr doc_ptr, manifest_x* manifest,
23 ActionType action_type) override;
26 using PkgAppPair = std::pair<std::string, std::string>;
27 bool LoadPluginInfo(manifest_x* manifest);
28 bool ExecutePlugin(const std::string& name, const char* pkgid,
29 const char* appid, GList* md_list);
30 bool AddPluginInfo(manifest_x* manifest, const char* appid);
31 std::string GetFunctionName(ActionType action) const;
33 std::set<PkgAppPair> pkg_app_set_;
37 SCOPE_LOG_TAG(MetadataPlugin)
40 } // namespace common_installer
42 #endif // COMMON_PLUGINS_METADATA_PLUGIN_H_