Refer to receiver from receiver devices

This commit is contained in:
pixl
2020-07-20 00:25:04 -04:00
parent 1056dfa032
commit 34b8047360
10 changed files with 70 additions and 10 deletions
+12 -2
View File
@@ -63,8 +63,8 @@ void Receiver::addDevice(hidpp::DeviceConnectionEvent event)
return;
}
std::shared_ptr<Device> device = std::make_shared<Device>(
receiver()->rawDevice(), event.index);
std::shared_ptr<Device> device = std::make_shared<Device>(this,
event.index);
_devices.emplace(event.index, device);
@@ -87,4 +87,14 @@ void Receiver::removeDevice(hidpp::DeviceIndex index)
{
std::unique_lock<std::mutex> lock(_devices_change);
_devices.erase(index);
}
const std::string& Receiver::path() const
{
return _path;
}
std::shared_ptr<dj::Receiver> Receiver::rawReceiver()
{
return receiver();
}