| 134 | } |
| 135 | |
| 136 | void Receiver::removeDevice(hidpp::DeviceIndex index) { |
| 137 | std::unique_lock<std::mutex> lock(_devices_change); |
| 138 | std::unique_lock<std::mutex> manager_lock; |
| 139 | if (auto manager = _manager.lock()) |
| 140 | manager_lock = std::unique_lock<std::mutex>(manager->mutex()); |
| 141 | auto device = _devices.find(index); |
| 142 | if (device != _devices.end()) { |
| 143 | if (auto manager = _manager.lock()) |
| 144 | manager->removeExternalDevice(device->second); |
| 145 | _devices.erase(device); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | void Receiver::pairReady(const hidpp10::DeviceDiscoveryEvent& event, |
| 150 | const std::string& passkey) { |
nothing calls this directly
no test coverage detected