| 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 | { |
nothing calls this directly
no test coverage detected