1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #ifndef COMPATUTILITY_H
4 #define COMPATUTILITY_H
6 #include "icinga/i2-icinga.hpp"
7 #include "icinga/host.hpp"
8 #include "icinga/command.hpp"
14 * Compatibility utility functions.
22 static String GetCommandLine(const Command::Ptr& command);
23 static String GetCommandName(const Command::Ptr& command);
26 static String GetCheckableCommandArgs(const Checkable::Ptr& checkable);
29 static int GetCheckableNotificationsEnabled(const Checkable::Ptr& checkable);
30 static int GetCheckableNotificationLastNotification(const Checkable::Ptr& checkable);
31 static int GetCheckableNotificationNextNotification(const Checkable::Ptr& checkable);
32 static int GetCheckableNotificationNotificationNumber(const Checkable::Ptr& checkable);
33 static double GetCheckableNotificationNotificationInterval(const Checkable::Ptr& checkable);
34 static int GetCheckableNotificationTypeFilter(const Checkable::Ptr& checkable);
35 static int GetCheckableNotificationStateFilter(const Checkable::Ptr& checkable);
37 static std::set<User::Ptr> GetCheckableNotificationUsers(const Checkable::Ptr& checkable);
38 static std::set<UserGroup::Ptr> GetCheckableNotificationUserGroups(const Checkable::Ptr& checkable);
41 static String GetCheckResultOutput(const CheckResult::Ptr& cr);
42 static String GetCheckResultLongOutput(const CheckResult::Ptr& cr);
45 static String EscapeString(const String& str);
46 static String UnEscapeString(const String& str);
51 static String GetCommandNamePrefix(const Command::Ptr& command);
56 #endif /* COMPATUTILITY_H */