From 9ec076b67e39ed8626be1d584a2d4128bef9caf2 Mon Sep 17 00:00:00 2001 From: Johnson Lu Date: Fri, 4 Oct 2024 00:40:24 -0700 Subject: [PATCH] add ConnectionResponseFrame.mediums PiperOrigin-RevId: 682206432 --- .../proto/offline_wire_formats.proto | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/connections/implementation/proto/offline_wire_formats.proto b/connections/implementation/proto/offline_wire_formats.proto index f4a68e14e8..91a17d50dc 100644 --- a/connections/implementation/proto/offline_wire_formats.proto +++ b/connections/implementation/proto/offline_wire_formats.proto @@ -123,6 +123,25 @@ message ConnectionRequestFrame { } message ConnectionResponseFrame { + // Should always match cs/symbol:location.nearby.proto.connections.Medium + // LINT.IfChange + enum Medium { + UNKNOWN_MEDIUM = 0; + MDNS = 1 [deprecated = true]; + BLUETOOTH = 2; + WIFI_HOTSPOT = 3; + BLE = 4; + WIFI_LAN = 5; + WIFI_AWARE = 6; + NFC = 7; + WIFI_DIRECT = 8; + WEB_RTC = 9; + BLE_L2CAP = 10; + USB = 11; + WEB_RTC_NON_CELLULAR = 12; + } + // LINT.ThenChange(//depot/google3/third_party/nearby/proto/connections_enums.proto) + // This doesn't need to send back endpoint_id and endpoint_name (like // the ConnectionRequestFrame does) because those have already been // transmitted out-of-band, at the time this endpoint was discovered. @@ -153,6 +172,9 @@ message ConnectionResponseFrame { optional int32 multiplex_socket_bitmask = 5; optional int32 nearby_connections_version = 6 [deprecated = true]; optional int32 safe_to_disconnect_version = 7; + // The mediums that this device supports for upgrades, used as a backup if no + // mediums are specified in the ConnectionRequestFrame. + repeated Medium mediums = 8 [packed = true]; } message PayloadTransferFrame {