]> granicus.if.org Git - icinga2/blob - lib/icinga/apievents.hpp
Service: be handled while host is down
[icinga2] / lib / icinga / apievents.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef APIEVENTS_H
4 #define APIEVENTS_H
5
6 #include "icinga/checkable.hpp"
7 #include "icinga/host.hpp"
8
9 namespace icinga
10 {
11
12 /**
13  * @ingroup icinga
14  */
15 class ApiEvents
16 {
17 public:
18         static void StaticInitialize();
19
20         static void CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, const MessageOrigin::Ptr& origin);
21         static void StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type, const MessageOrigin::Ptr& origin);
22
23
24         static void NotificationSentToAllUsersHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
25                 const std::set<User::Ptr>& users, NotificationType type, const CheckResult::Ptr& cr, const String& author,
26                 const String& text, const MessageOrigin::Ptr& origin);
27
28         static void FlappingChangedHandler(const Checkable::Ptr& checkable, const MessageOrigin::Ptr& origin);
29
30         static void AcknowledgementSetHandler(const Checkable::Ptr& checkable,
31                 const String& author, const String& comment, AcknowledgementType type,
32                 bool notify, bool persistent, double expiry, const MessageOrigin::Ptr& origin);
33         static void AcknowledgementClearedHandler(const Checkable::Ptr& checkable, const MessageOrigin::Ptr& origin);
34
35         static void CommentAddedHandler(const Comment::Ptr& comment);
36         static void CommentRemovedHandler(const Comment::Ptr& comment);
37
38         static void DowntimeAddedHandler(const Downtime::Ptr& downtime);
39         static void DowntimeRemovedHandler(const Downtime::Ptr& downtime);
40         static void DowntimeStartedHandler(const Downtime::Ptr& downtime);
41         static void DowntimeTriggeredHandler(const Downtime::Ptr& downtime);
42 };
43
44 }
45
46 #endif /* APIEVENTS_H */