#ifndef CONNECTIONMANAGER_H #define CONNECTIONMANAGER_H namespace icinga { class ConnectionManager : public Object { list m_Servers; list m_Clients; map< string, event > m_Methods; int NewClientHandler(NewClientEventArgs::Ptr ncea); int CloseClientHandler(EventArgs::Ptr ea); int NewMessageHandler(NewMessageEventArgs::Ptr nmea); public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; void RegisterServer(JsonRpcServer::Ptr server); void UnregisterServer(JsonRpcServer::Ptr server); void RegisterClient(JsonRpcClient::Ptr client); void UnregisterClient(JsonRpcClient::Ptr client); void RegisterMethod(string method, function function); void UnregisterMethod(string method, function function); void SendMessage(JsonRpcMessage::Ptr message); }; } #endif /* CONNECTIONMANAGER_H */