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

Method setInsertedDevicePolicyMethod

src/Daemon/Daemon.cpp:527–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525 }
526
527 void Daemon::setInsertedDevicePolicyMethod(DevicePolicyMethod policy)
528 {
529 USBGUARD_LOG(Debug) << "Setting InsertedDevicePolicy to " << devicePolicyMethodToString(policy);
530
531 switch (policy) {
532 case DevicePolicyMethod::ApplyPolicy:
533 case DevicePolicyMethod::Block:
534 case DevicePolicyMethod::Reject:
535 _inserted_device_policy_method = policy;
536 break;
537
538 case DevicePolicyMethod::Keep:
539 case DevicePolicyMethod::Allow:
540 default:
541 throw Exception("setInsertedDevicePolicyMethod", devicePolicyMethodToString(policy), "invalid policy method");
542 }
543 }
544
545 void Daemon::run()
546 {

Callers

nothing calls this directly

Calls 1

ExceptionFunction · 0.85

Tested by

no test coverage detected