/* */ #ifndef D_WEB_SOCKET_SESSION_MAN_H #define D_WEB_SOCKET_SESSION_MAN_H #include "Notifier.h" #include #include #include #include "a2functional.h" namespace aria2 { class RequestGroup; namespace rpc { class WebSocketSession; class WebSocketSessionMan : public DownloadEventListener { public: typedef std::set, RefLess> WebSocketSessions; WebSocketSessionMan(); ~WebSocketSessionMan(); void addSession(const std::shared_ptr& wsSession); void removeSession(const std::shared_ptr& wsSession); void addNotification(const std::string& method, const RequestGroup* group); virtual void onEvent(DownloadEvent event, const RequestGroup* group) CXX11_OVERRIDE; private: WebSocketSessions sessions_; }; } // namespace rpc } // aria2 #endif // D_WEB_SOCKET_SESSION_MAN_H