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

Method insertDevice

src/Library/DeviceManagerPrivate.cpp:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 2

dmHookAssignIDMethod · 0.45
setIDMethod · 0.45

Tested by

no test coverage detected