MCPcopy Create free account
hub / github.com/USBGuard/usbguard / devicePolicyMethodFromString

Method devicePolicyMethodFromString

src/Daemon/Daemon.cpp:85–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 };
84
85 Daemon::DevicePolicyMethod Daemon::devicePolicyMethodFromString(const std::string& policy_string)
86 {
87 for (auto device_policy_method_string : device_policy_method_strings) {
88 if (device_policy_method_string.first == policy_string) {
89 return device_policy_method_string.second;
90 }
91 }
92
93 throw Exception("DevicePolicyMethod", policy_string, "invalid policy method string");
94 }
95
96 const std::string Daemon::devicePolicyMethodToString(DevicePolicyMethod policy)
97 {

Callers

nothing calls this directly

Calls 1

ExceptionFunction · 0.85

Tested by

no test coverage detected