Roll forward to cl/331498408

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: If30a8df80799adec3aafba5b8dd4c539fc21e16d
This commit is contained in:
Alexey Polyudov
2020-09-14 02:00:27 -07:00
parent d5bed12d40
commit 3b7071cf0f
41 changed files with 2153 additions and 81 deletions
+18
View File
@@ -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;