diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
commit | 56ae875861ab260b80a030f50c4aff9f9dc8fff0 (patch) | |
tree | 531412110fc901a5918c7f7442202804a83cada9 /lib/icinga/apievents.hpp | |
parent | Initial commit. (diff) | |
download | icinga2-e6c8b97d844e301093c7e2c03da489629676e2c4.tar.xz icinga2-e6c8b97d844e301093c7e2c03da489629676e2c4.zip |
Adding upstream version 2.14.2.upstream/2.14.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/icinga/apievents.hpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/icinga/apievents.hpp b/lib/icinga/apievents.hpp new file mode 100644 index 0000000..07d5c60 --- /dev/null +++ b/lib/icinga/apievents.hpp @@ -0,0 +1,51 @@ +/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ + +#ifndef APIEVENTS_H +#define APIEVENTS_H + +#include "remote/eventqueue.hpp" +#include "icinga/checkable.hpp" +#include "icinga/host.hpp" + +namespace icinga +{ + +/** + * @ingroup icinga + */ +class ApiEvents +{ +public: + static void StaticInitialize(); + + static void CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, const MessageOrigin::Ptr& origin); + static void StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type, const MessageOrigin::Ptr& origin); + + + static void NotificationSentToAllUsersHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable, + const std::set<User::Ptr>& users, NotificationType type, const CheckResult::Ptr& cr, const String& author, + const String& text, const MessageOrigin::Ptr& origin); + + static void FlappingChangedHandler(const Checkable::Ptr& checkable, const MessageOrigin::Ptr& origin); + + static void AcknowledgementSetHandler(const Checkable::Ptr& checkable, + const String& author, const String& comment, AcknowledgementType type, + bool notify, bool persistent, double, double expiry, const MessageOrigin::Ptr& origin); + static void AcknowledgementClearedHandler(const Checkable::Ptr& checkable, const String& removedBy, double, const MessageOrigin::Ptr& origin); + + static void CommentAddedHandler(const Comment::Ptr& comment); + static void CommentRemovedHandler(const Comment::Ptr& comment); + + static void DowntimeAddedHandler(const Downtime::Ptr& downtime); + static void DowntimeRemovedHandler(const Downtime::Ptr& downtime); + static void DowntimeStartedHandler(const Downtime::Ptr& downtime); + static void DowntimeTriggeredHandler(const Downtime::Ptr& downtime); + + static void OnActiveChangedHandler(const ConfigObject::Ptr& object, const Value&); + static void OnVersionChangedHandler(const ConfigObject::Ptr& object, const Value&); + static void SendObjectChangeEvent(const ConfigObject::Ptr& object, const EventType& eventType, const String& eventQueue); +}; + +} + +#endif /* APIEVENTS_H */ |