icinga2/jsonrpc/jsonrpcclient.h

34 lines
594 B
C
Raw Normal View History

#ifndef JSONRPCCLIENT_H
#define JSONRPCCLIENT_H
2012-03-28 13:24:49 +02:00
namespace icinga
{
struct NewMessageEventArgs : public EventArgs
{
typedef shared_ptr<NewMessageEventArgs> Ptr;
typedef weak_ptr<NewMessageEventArgs> WeakPtr;
2012-03-28 13:24:49 +02:00
JsonRpcMessage::Ptr Message;
2012-03-28 13:24:49 +02:00
};
class JsonRpcClient : public TCPClient
{
private:
int DataAvailableHandler(EventArgs::Ptr ea);
2012-03-28 13:24:49 +02:00
public:
typedef shared_ptr<JsonRpcClient> Ptr;
typedef weak_ptr<JsonRpcClient> WeakPtr;
2012-03-28 13:24:49 +02:00
void SendMessage(JsonRpcMessage::Ptr message);
2012-03-28 13:24:49 +02:00
virtual void Start(void);
event<NewMessageEventArgs::Ptr> OnNewMessage;
2012-03-28 13:24:49 +02:00
};
}
#endif /* JSONRPCCLIENT_H */