#ifndef JSONRPCCLIENT_H #define JSONRPCCLIENT_H namespace icinga { struct I2_JSONRPC_API NewMessageEventArgs : public EventArgs { typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; icinga::Message Message; }; class I2_JSONRPC_API JsonRpcClient : public TLSClient { private: int DataAvailableHandler(const EventArgs& ea); public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; JsonRpcClient(TCPClientRole role, shared_ptr sslContext); void SendMessage(const Message& message); virtual void Start(void); Event OnNewMessage; }; TCPClient::Ptr JsonRpcClientFactory(TCPClientRole role, shared_ptr sslContext); } #endif /* JSONRPCCLIENT_H */