///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 63 | |
| 64 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 65 | void FSecure::C3::Core::Relay::DetachDevice(DeviceId const& iidOfDeviceToDetach) |
| 66 | { |
| 67 | // Find specified Device. |
| 68 | |
| 69 | m_Devices.Remove([&iidOfDeviceToDetach](std::weak_ptr<DeviceBridge> const& c) |
| 70 | { |
| 71 | if (auto ri = c.lock(); ri && ri->GetDid() == iidOfDeviceToDetach) |
| 72 | { |
| 73 | ri->Detach(); |
| 74 | return true; |
| 75 | } |
| 76 | |
| 77 | return false; |
| 78 | }); |
| 79 | |
| 80 | RemoveChannelRoutes(iidOfDeviceToDetach); |
| 81 | } |
| 82 | |
| 83 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 84 | std::shared_ptr<FSecure::C3::Core::DeviceBridge> FSecure::C3::Core::Relay::FindDevice(DeviceId did) |