MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetCommandNamePrefix

Method GetCommandNamePrefix

lib/icinga/compatutility.cpp:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42String CompatUtility::GetCommandNamePrefix(const Command::Ptr& command)
43/* Helper. */
44{
45 if (!command)
46 return Empty;
47
48 String prefix;
49 if (command->GetReflectionType() == CheckCommand::TypeInstance)
50 prefix = "check_";
51 else if (command->GetReflectionType() == NotificationCommand::TypeInstance)
52 prefix = "notification_";
53 else if (command->GetReflectionType() == EventCommand::TypeInstance)
54 prefix = "event_";
55
56 return prefix;
57}
58
59String CompatUtility::GetCommandName(const Command::Ptr& command)
60/* Used in DB IDO and Livestatus. */

Callers

nothing calls this directly

Calls 1

GetReflectionTypeMethod · 0.45

Tested by

no test coverage detected