///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
| 351 | |
| 352 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 353 | void FSecure::C3::Core::NodeRelay::SendNewDeviceNotification(std::shared_ptr<FSecure::C3::Core::DeviceBridge> const& device) |
| 354 | { |
| 355 | auto grc = GetGatewayReturnChannel(); |
| 356 | if (!grc) |
| 357 | throw std::runtime_error(OBF("Failed to lock gateway return channel")); |
| 358 | |
| 359 | auto response = ProceduresS2G::AddDeviceResponse::Create(RouteId(m_AgentId, grc->GetDid()), FSecure::Utils::TimeSinceEpoch(), device->GetDid(), device->GetTypeNameHash(), device->IsChannel(), device->IsNegotiationChannel(), m_GatewayEncryptionKey); |
| 360 | LockAndSendPacket(response->ComposeQueryPacket(), grc); |
| 361 | } |
| 362 | |
| 363 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 364 | void FSecure::C3::Core::NodeRelay::SendNewNegotiatedChannelNotification(DeviceId newDeviceId, DeviceId negotiatorId, ByteView inId, ByteView outId) |
nothing calls this directly
no test coverage detected