MCPcopy Create free account
hub / github.com/PixlOne/logiops / removeDevice

Method removeDevice

src/logid/DeviceManager.cpp:159–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void DeviceManager::removeDevice(std::string path) {
160 std::lock_guard<std::mutex> lock(_map_lock);
161 auto receiver = _receivers.find(path);
162
163 if (receiver != _receivers.end()) {
164 _ipc_receivers->receiverRemoved(receiver->second);
165 _receivers.erase(receiver);
166 logPrintf(INFO, "Receiver on %s disconnected", path.c_str());
167 } else {
168 auto device = _devices.find(path);
169 if (device != _devices.end()) {
170 _ipc_devices->deviceRemoved(device->second);
171 _devices.erase(device);
172 logPrintf(INFO, "Device on %s disconnected", path.c_str());
173 }
174 }
175}
176
177DeviceManager::DevicesIPC::DevicesIPC(DeviceManager* manager) :
178 ipcgull::interface(

Callers

nothing calls this directly

Calls 2

receiverRemovedMethod · 0.80
deviceRemovedMethod · 0.80

Tested by

no test coverage detected