#pragma once #include "../../main/StoppableTask.h" // // Domoticz Plugin System - Dnpwwo, 2016 // class CDomoticzHardwareBase; namespace Plugins { class CPluginSystem : public StoppableTask { private: bool m_bEnabled; bool m_bAllPluginsStarted; int m_iPollInterval; static void* m_InitialPythonThread; static std::map m_pPlugins; static std::map m_PluginXml; std::shared_ptr m_thread; void Do_Work(); public: CPluginSystem(); ~CPluginSystem() = default; bool StartPluginSystem(); void BuildManifest(); std::map* GetManifest() { return &m_PluginXml; }; std::map* GetHardware() { return &m_pPlugins; }; CDomoticzHardwareBase* RegisterPlugin(const int HwdID, const std::string &Name, const std::string &PluginKey); void DeregisterPlugin(const int HwdID); bool StopPluginSystem(); void AllPluginsStarted() { m_bAllPluginsStarted = true; }; static void LoadSettings(); void DeviceModified(uint64_t DevIdx); void* PythonThread() { return m_InitialPythonThread; }; }; };