5#ifndef PICOSCENES_PLATFORM_PICOSCENESPLUGINMANAGER_HXX
6#define PICOSCENES_PLATFORM_PICOSCENESPLUGINMANAGER_HXX
16namespace fs = std::filesystem;
43 [[nodiscard]] std::shared_ptr<PicoScenesPluginManager>
getManager()
const {
51 [[nodiscard]] std::shared_ptr<AbstractPicoScenesPlugin>
getPluginCore()
const {
60 return libraryFilePath;
64 std::string libraryFilePath;
65 boost::function<std::shared_ptr<AbstractPicoScenesPlugin>()> libraryHandle;
66 std::shared_ptr<AbstractPicoScenesPlugin> pluginCore;
67 std::shared_ptr<PicoScenesPluginManager> manager;
82 static std::shared_ptr<PicoScenesPluginManager>
getInstance(
const std::shared_ptr<AbstractNIC> &nic);
94 static const std::vector<std::shared_ptr<po::options_description>> &
getPluginOptions();
119 const std::vector<std::shared_ptr<PicoScenesPluginWrapper>> &
getAllPlugins()
const;
146 std::shared_ptr<AbstractNIC> nic;
147 std::vector<std::shared_ptr<PicoScenesPluginWrapper>> plugins;
148 static std::vector<std::shared_ptr<po::options_description>> pluginOptions;
154 static void ensureSinglePluginDescription(
const std::shared_ptr<AbstractPicoScenesPlugin> &getPluginCore);
Abstract base class for Network Interface Card (NIC) operations.
Abstract base class that defines the interface for all PicoScenes plugins.
Manager class for PicoScenes plugins.
static NIC_API std::string pluginDir
Directory containing plugin files.
static std::vector< std::string > listPluginsInFolder()
List all available plugins in the plugin directory.
void deactivateAllPlugins()
Deactivate all plugins.
void callRxHandles(const ModularPicoScenesRxFrame &rxs)
Call rx handlers for all plugins.
static std::shared_ptr< PicoScenesPluginManager > getInstance(const std::shared_ptr< AbstractNIC > &nic)
Get plugin manager instance for specific NIC.
void uninstallAllPlugins()
Uninstall all plugins.
std::pair< bool, std::string > tryInstallPlugin(const std::string &pluginFilePath)
Attempt to install a plugin.
const std::vector< std::shared_ptr< PicoScenesPluginWrapper > > & getAllPlugins() const
Get all installed plugins.
void parseAndExecuteCommands(const std::string &commandString)
Parse and execute plugin commands.
void uninstallPlugin(const std::string &plugInName)
Uninstall a specific plugin.
static const std::vector< std::shared_ptr< po::options_description > > & getPluginOptions()
Get all plugin options.
Wrapper class for PicoScenes plugins.
std::shared_ptr< PicoScenesPluginManager > getManager() const
Get the plugin manager instance.
const std::string & getLibraryFilePath() const
Get the plugin library file path.
std::shared_ptr< AbstractPicoScenesPlugin > getPluginCore() const
Get the plugin core instance.
PicoScenesPluginWrapper(const std::string &filePath, std::shared_ptr< PicoScenesPluginManager > manager)
Construct a new plugin wrapper.