#pragma once #include #include #include #include "core/plugin_system/IProtocolFramerPlugin.h" #include "core/plugin_system/IProtocolPlugin.h" namespace softbus::core::plugin_system { class PluginManager { public: PluginManager() = default; void registerProtocolPlugin(std::shared_ptr plugin); std::shared_ptr selectProtocolPlugin(const QString& protocolHint) const; void unregisterProtocolPlugin(const QString& pluginId); void registerProtocolFramerPlugin(std::shared_ptr plugin); std::shared_ptr selectProtocolFramerPlugin(const QString& protocolHint) const; void unregisterProtocolFramerPlugin(const QString& pluginId); private: QHash> m_protocolPlugins; QHash> m_protocolFramerPlugins; }; } // namespace softbus::core::plugin_system