2012-04-02 08:56:30 +02:00
|
|
|
#ifndef CONFIGRPCCOMPONENT_H
|
|
|
|
#define CONFIGRPCCOMPONENT_H
|
2012-03-31 16:28:11 +02:00
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
class ConfigRpcComponent : public Component
|
|
|
|
{
|
|
|
|
private:
|
2012-04-06 08:56:52 +02:00
|
|
|
VirtualEndpoint::Ptr m_ConfigRpcEndpoint;
|
|
|
|
|
2012-04-02 20:50:35 +02:00
|
|
|
IcingaApplication::Ptr GetIcingaApplication(void);
|
2012-03-31 16:28:11 +02:00
|
|
|
|
2012-04-20 10:38:11 +02:00
|
|
|
int NewEndpointHandler(const NewEndpointEventArgs& ea);
|
|
|
|
int WelcomeMessageHandler(const NewRequestEventArgs& ea);
|
|
|
|
|
2012-04-20 13:49:04 +02:00
|
|
|
int LocalObjectCreatedHandler(const EventArgs& ea);
|
|
|
|
int LocalObjectRemovedHandler(const EventArgs& ea);
|
2012-04-22 16:45:31 +02:00
|
|
|
int LocalPropertyChangedHandler(const PropertyChangedEventArgs& ea);
|
2012-03-31 16:28:11 +02:00
|
|
|
|
2012-04-18 15:22:25 +02:00
|
|
|
int FetchObjectsHandler(const NewRequestEventArgs& ea);
|
|
|
|
int RemoteObjectUpdatedHandler(const NewRequestEventArgs& ea);
|
|
|
|
int RemoteObjectRemovedHandler(const NewRequestEventArgs& ea);
|
2012-03-31 16:28:11 +02:00
|
|
|
|
2012-04-20 14:20:25 +02:00
|
|
|
static JsonRpcRequest MakeObjectMessage(const ConfigObject::Ptr& object, string method, bool includeProperties);
|
2012-03-31 16:28:11 +02:00
|
|
|
|
2012-04-20 14:20:25 +02:00
|
|
|
static bool ShouldReplicateObject(const ConfigObject::Ptr& object);
|
2012-03-31 16:28:11 +02:00
|
|
|
public:
|
2012-04-19 11:29:36 +02:00
|
|
|
virtual string GetName(void) const;
|
2012-03-31 16:28:11 +02:00
|
|
|
virtual void Start(void);
|
|
|
|
virtual void Stop(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-04-02 08:56:30 +02:00
|
|
|
#endif /* CONFIGRPCCOMPONENT_H */
|