#pragma once #include "ros_bridge/include/com_private.h" #include "ros_bridge/include/RosBridgeClient.h" #include namespace ros_bridge { namespace com_private { class Server { typedef std::unordered_map ServiceMap; public: typedef std::function CallbackType; Server() = delete; Server(RosbridgeWsClient &rbc); ~Server(); //! @brief Starts the subscriber. void start(); //! @brief Resets the subscriber. void reset(); void advertiseService(const std::string& service, const std::string& type, const CallbackType& userCallback); private: RosbridgeWsClient &_rbc; ServiceMap _serviceMap; std::shared_ptr _stopped; }; } // namespace ComPrivate } // namespace ROSBridge