/** * @RDE_HEADER@ * Routing Test - main object * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include #include #include "logger.h" #include "session.h" #include namespace LtsPluginManager { struct PluginInstance; } namespace DDSGeneric { class TopicTypePlugin; } namespace RoutingService { class TopicDispatcherInterface; class RSCCOMMON_EXPORT SessionHandler : public QObject { public: SessionHandler(IDL::PartitionType partitionType, const std::shared_ptr &ddsConnectorSv, const std::shared_ptr &ddsConnectorWs); ~SessionHandler(); bool init(); void shutdown(); public Q_SLOTS: void onCreateSession(const QString &partitionNameSv, const QString &partitionNameWs); void onDestroySession(const QString &partitionNameSv, const QString &partitionNameWs); private: bool loadPlugins(); bool loadPlugin(const LtsPluginManager::PluginInstance &pi); std::vector topicsToRouteToWs() const; std::vector topicsToRouteToSv() const; private: std::vector m_topicTypePlugins; IDL::PartitionType m_partitionType; std::shared_ptr m_ddsConnectorSv; std::shared_ptr m_ddsConnectorWs; QMap m_sessionMap; NGL::INGLLogger &m_logger; }; } // namespace RoutingService