2014-05-25 16:23:35 +02:00
|
|
|
#include "icinga/checkable.hpp"
|
|
|
|
#include "icinga/host.hpp"
|
|
|
|
#include "icinga/icingaapplication.hpp"
|
|
|
|
#include "icinga/customvarobject.hpp"
|
2013-10-26 09:41:45 +02:00
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
2014-04-05 22:17:20 +02:00
|
|
|
code {{{
|
2014-04-06 08:09:49 +02:00
|
|
|
class I2_ICINGA_API ServiceNameComposer : public NameComposer
|
2014-04-05 22:17:20 +02:00
|
|
|
{
|
|
|
|
public:
|
2014-08-29 16:46:46 +02:00
|
|
|
virtual String MakeName(const String& shortName, const Dictionary::Ptr& props) const;
|
2014-04-05 22:17:20 +02:00
|
|
|
};
|
|
|
|
}}}
|
|
|
|
|
2014-04-06 08:09:49 +02:00
|
|
|
class Service : Checkable < ServiceNameComposer
|
2013-10-26 09:41:45 +02:00
|
|
|
{
|
|
|
|
[config] String display_name {
|
|
|
|
get {{{
|
|
|
|
if (m_DisplayName.IsEmpty())
|
|
|
|
return GetShortName();
|
|
|
|
else
|
|
|
|
return m_DisplayName;
|
|
|
|
}}}
|
|
|
|
};
|
2014-04-05 09:15:40 +02:00
|
|
|
[config] String host_name;
|
2014-04-03 15:36:13 +02:00
|
|
|
[enum] ServiceState "state" {
|
|
|
|
get {{{
|
|
|
|
return GetStateRaw();
|
|
|
|
}}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
2014-04-03 15:36:13 +02:00
|
|
|
[enum] ServiceState last_state {
|
|
|
|
get {{{
|
|
|
|
return GetLastStateRaw();
|
|
|
|
}}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
2014-04-03 15:36:13 +02:00
|
|
|
[enum] ServiceState last_hard_state {
|
|
|
|
get {{{
|
|
|
|
return GetLastHardStateRaw();
|
|
|
|
}}}
|
2013-10-26 09:41:45 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|