mirror of https://github.com/Icinga/icinga2.git
parent
56a3b0cab7
commit
e1b9d82896
|
@ -21,6 +21,7 @@
|
||||||
#include "remote/apiclient.hpp"
|
#include "remote/apiclient.hpp"
|
||||||
#include "remote/endpoint.hpp"
|
#include "remote/endpoint.hpp"
|
||||||
#include "remote/jsonrpc.hpp"
|
#include "remote/jsonrpc.hpp"
|
||||||
|
#include "remote/apifunction.hpp"
|
||||||
#include "base/convert.hpp"
|
#include "base/convert.hpp"
|
||||||
#include "base/netstring.hpp"
|
#include "base/netstring.hpp"
|
||||||
#include "base/json.hpp"
|
#include "base/json.hpp"
|
||||||
|
@ -42,6 +43,8 @@ boost::signals2::signal<void(bool)> ApiListener::OnMasterChanged;
|
||||||
|
|
||||||
REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
|
REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
|
||||||
|
|
||||||
|
REGISTER_APIFUNCTION(Hello, icinga, &ApiListener::HelloAPIHandler);
|
||||||
|
|
||||||
ApiListener::ApiListener(void)
|
ApiListener::ApiListener(void)
|
||||||
: m_LogMessageCount(0)
|
: m_LogMessageCount(0)
|
||||||
{ }
|
{ }
|
||||||
|
@ -850,3 +853,8 @@ std::set<ApiClient::Ptr> ApiListener::GetAnonymousClients(void) const
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
return m_AnonymousClients;
|
return m_AnonymousClients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Value ApiListener::HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params)
|
||||||
|
{
|
||||||
|
return Empty;
|
||||||
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ public:
|
||||||
|
|
||||||
static Value ConfigUpdateHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
|
static Value ConfigUpdateHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
|
||||||
|
|
||||||
|
static Value HelloAPIHandler(const MessageOrigin& origin, const Dictionary::Ptr& params);
|
||||||
protected:
|
protected:
|
||||||
virtual void OnConfigLoaded(void);
|
virtual void OnConfigLoaded(void);
|
||||||
virtual void OnAllConfigLoaded(void);
|
virtual void OnAllConfigLoaded(void);
|
||||||
|
|
Loading…
Reference in New Issue