blob: 410eacd9e17260b074115c84bc96606f4e5fbf77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_H
#define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_H
#include <cstdint>
#include <string>
#include <memory>
#include <vector>
#include "application_manager/plugin_manager/rpc_plugin.h"
#include "utils/optional.h"
namespace application_manager {
namespace plugin_manager {
class RPCPluginManager {
public:
virtual ~RPCPluginManager() {}
/**
* @brief LoadPlugins load plugins from plugin folder.
* Already loaded plugins should continue be loaded.
*
* @param plugin_folder folder to search for plugins
* @return amount of loaded plugins
*/
virtual uint32_t LoadPlugins(const std::string& plugins_path) = 0;
/**
* @brief GetPlugins get list of plugins
* @return list of loaded plugins
*/
virtual std::vector<RPCPluginPtr>& GetPlugins() = 0;
/**
* @brief FindPluginToProcess find plugin to process message
* @param function_id RPC identifier to process
* @param message_source message_source source of message to process
* @return plugin that is able to process the message
*/
virtual utils::Optional<RPCPlugin> FindPluginToProcess(
const int32_t function_id,
const commands::Command::CommandSource message_source) = 0;
};
} // namespace plugin_manager
} // namespace application_manager
#endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_PLUGIN_MANAGER_RPC_PLUGIN_MANAGER_H
|