endpointhash

This commit is contained in:
flower_linux
2026-04-15 20:05:04 +08:00
parent 94eec643de
commit 11bd86063d
21 changed files with 314 additions and 157 deletions

View File

@@ -19,22 +19,27 @@ public:
PluginManager() = default;
void registerProtocolPlugin(std::shared_ptr<IProtocolPlugin> plugin);
std::shared_ptr<IProtocolPlugin> selectProtocolPlugin(const QString& protocolHint) const;
std::shared_ptr<IProtocolPlugin> selectProtocolPlugin(softbus::core::models::ProtocolType protocol) const;
void unregisterProtocolPlugin(const QString& pluginId);
void registerProtocolFramerPlugin(std::shared_ptr<IProtocolFramerPlugin> plugin);
std::shared_ptr<IProtocolFramerPlugin> selectProtocolFramerPlugin(const QString& protocolHint) const;
std::shared_ptr<IProtocolFramerPlugin> selectProtocolFramerPlugin(
softbus::core::models::ProtocolType protocol) const;
void unregisterProtocolFramerPlugin(const QString& pluginId);
void registerProtocolMapperPlugin(std::shared_ptr<IProtocolMapperPlugin> plugin);
std::shared_ptr<IProtocolMapperPlugin> selectProtocolMapperPlugin(const QString& protocolHint) const;
std::shared_ptr<IProtocolMapperPlugin> selectProtocolMapperPlugin(
softbus::core::models::ProtocolType protocol) const;
void unregisterProtocolMapperPlugin(const QString& pluginId);
QStringList registeredProtocolPluginIds() const;
QStringList registeredProtocolFramerPluginIds() const;
QStringList registeredProtocolMapperPluginIds() const;
private:
QHash<QString, std::shared_ptr<IProtocolPlugin>> m_protocolPlugins;
QHash<QString, std::shared_ptr<IProtocolFramerPlugin>> m_protocolFramerPlugins;
QHash<QString, std::shared_ptr<IProtocolMapperPlugin>> m_protocolMapperPlugins;
QHash<QString, std::shared_ptr<IProtocolPlugin>> m_protocolPluginsById;
QHash<softbus::core::models::ProtocolType, std::shared_ptr<IProtocolPlugin>> m_protocolPluginsByType;
QHash<QString, std::shared_ptr<IProtocolFramerPlugin>> m_protocolFramerPluginsById;
QHash<softbus::core::models::ProtocolType, std::shared_ptr<IProtocolFramerPlugin>> m_protocolFramerPluginsByType;
QHash<QString, std::shared_ptr<IProtocolMapperPlugin>> m_protocolMapperPluginsById;
QHash<softbus::core::models::ProtocolType, std::shared_ptr<IProtocolMapperPlugin>> m_protocolMapperPluginsByType;
};
} // namespace softbus::core::plugin_system