mirror of https://github.com/Icinga/icinga2.git
parent
9b0375bed8
commit
1c657feea1
|
@ -22,6 +22,7 @@
|
|||
#include "remote/jsonrpcconnection.hpp"
|
||||
#include "remote/endpoint.hpp"
|
||||
#include "remote/jsonrpc.hpp"
|
||||
#include "remote/apifunction.hpp"
|
||||
#include "base/convert.hpp"
|
||||
#include "base/netstring.hpp"
|
||||
#include "base/json.hpp"
|
||||
|
@ -43,6 +44,8 @@ boost::signals2::signal<void(bool)> ApiListener::OnMasterChanged;
|
|||
|
||||
REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
|
||||
|
||||
REGISTER_APIFUNCTION(Hello, icinga, &ApiListener::HelloAPIHandler);
|
||||
|
||||
ApiListener::ApiListener(void)
|
||||
: m_LogMessageCount(0)
|
||||
{ }
|
||||
|
@ -922,3 +925,8 @@ std::set<HttpConnection::Ptr> ApiListener::GetHttpClients(void) const
|
|||
ObjectLock olock(this);
|
||||
return m_HttpClients;
|
||||
}
|
||||
|
||||
Value ApiListener::HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params)
|
||||
{
|
||||
return Empty;
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
|
||||
static Value ConfigUpdateHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
|
||||
|
||||
static Value HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
|
||||
protected:
|
||||
virtual void OnConfigLoaded(void);
|
||||
virtual void OnAllConfigLoaded(void);
|
||||
|
|
Loading…
Reference in New Issue