| 71 | } |
| 72 | |
| 73 | void DeviceManagerPrivate::insertDevice(std::shared_ptr<Device> device) |
| 74 | { |
| 75 | USBGUARD_LOG(Trace) << "device_ptr=" << device.get(); |
| 76 | std::unique_lock<std::mutex> device_map_lock(_device_map_mutex); |
| 77 | const uint32_t id = _hooks.dmHookAssignID(); |
| 78 | USBGUARD_LOG(Debug) << "id=" << id; |
| 79 | device->setID(id); |
| 80 | _device_map[id] = device; |
| 81 | } |
| 82 | |
| 83 | std::shared_ptr<Device> DeviceManagerPrivate::removeDevice(uint32_t id) |
| 84 | { |
nothing calls this directly
no test coverage detected