]> granicus.if.org Git - icinga2/blob - lib/icinga/service.ti
Implement host checks.
[icinga2] / lib / icinga / service.ti
1 #include "icinga/checkable.h"
2 #include "icinga/host.h"
3 #include "icinga/icingaapplication.h"
4 #include "base/dynamicobject.h"
5
6 namespace icinga
7 {
8
9 class Service : Checkable
10 {
11         [config] String display_name {
12                 get {{{
13                         if (m_DisplayName.IsEmpty())
14                                 return GetShortName();
15                         else
16                                 return m_DisplayName;
17                 }}}
18         };
19         [config] String short_name {
20                 get {{{
21                         if (m_ShortName.IsEmpty())
22                                 return GetName();
23                         else
24                                 return m_ShortName;
25                 }}}
26         };
27         [config] String host (HostRaw);
28         [enum] ServiceState "state" {
29                 get {{{
30                         return GetStateRaw();
31                 }}}
32         };
33         [enum] ServiceState last_state {
34                 get {{{
35                         return GetLastStateRaw();
36                 }}}
37         };
38         [enum] ServiceState last_hard_state {
39                 get {{{
40                         return GetLastHardStateRaw();
41                 }}}
42         };
43 };
44
45 }