mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Roll forward to cl/331498408
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: If30a8df80799adec3aafba5b8dd4c539fc21e16d
This commit is contained in:
@@ -169,6 +169,24 @@ ByteArray ForBwuBluetoothPathAvailable(const std::string& service_id,
|
||||
return ToBytes(std::move(frame));
|
||||
}
|
||||
|
||||
ByteArray ForBwuWebrtcPathAvailable(const std::string& peer_id) {
|
||||
OfflineFrame frame;
|
||||
|
||||
frame.set_version(OfflineFrame::V1);
|
||||
auto* v1_frame = frame.mutable_v1();
|
||||
v1_frame->set_type(V1Frame::BANDWIDTH_UPGRADE_NEGOTIATION);
|
||||
auto* sub_frame = v1_frame->mutable_bandwidth_upgrade_negotiation();
|
||||
sub_frame->set_event_type(
|
||||
BandwidthUpgradeNegotiationFrame::UPGRADE_PATH_AVAILABLE);
|
||||
auto* upgrade_path_info = sub_frame->mutable_upgrade_path_info();
|
||||
upgrade_path_info->set_medium(UpgradePathInfo::WEB_RTC);
|
||||
auto* webrtc_credentials =
|
||||
upgrade_path_info->mutable_web_rtc_credentials();
|
||||
webrtc_credentials->set_peer_id(peer_id);
|
||||
|
||||
return ToBytes(std::move(frame));
|
||||
}
|
||||
|
||||
ByteArray ForBwuLastWrite() {
|
||||
OfflineFrame frame;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user