]> granicus.if.org Git - icinga2/blob - lib/icinga/notification.ti
Refactor name helper classes a bit.
[icinga2] / lib / icinga / notification.ti
1 #include "base/dynamicobject.h"
2
3 namespace icinga
4 {
5
6 code {{{
7 class I2_ICINGA_API NotificationNameComposer : public NameComposer
8 {
9 public:
10         virtual String MakeName(const String& shortName, const Dictionary::Ptr props) const;
11 };
12 }}}
13
14 class Notification : DynamicObject < NotificationNameComposer
15 {
16         [config, protected] String notification_command (NotificationCommandRaw);
17         [config] double notification_interval {
18                 default {{{ return 300; }}}
19         };
20         [config] String notification_period (NotificationPeriodRaw);
21         [config] Dictionary::Ptr macros;
22         [config, protected] Array::Ptr users (UsersRaw);
23         [config, protected] Array::Ptr user_groups (UserGroupsRaw);
24         [config] Dictionary::Ptr times;
25         [config] int notification_type_filter {
26                 default {{{ return ~(int)0; }}}
27         };
28         [config] int notification_state_filter {
29                 default {{{ return ~(int)0; }}}
30         };
31         [config, protected] String host_name;
32         [config, protected] String service_name;
33
34         [state] double last_notification;
35         [state, set_protected] double next_notification (NextNotificationRaw);
36         [state, set_protected] Value notification_number;
37         [state] double last_problem_notification;
38 };
39
40 }