diff --git a/NearbyShare/Connection/OutboundNearbyConnection.swift b/NearbyShare/Connection/OutboundNearbyConnection.swift index 5f6cf81..d6c1dd8 100644 --- a/NearbyShare/Connection/OutboundNearbyConnection.swift +++ b/NearbyShare/Connection/OutboundNearbyConnection.swift @@ -340,7 +340,7 @@ class OutboundNearbyConnection: NearbyConnection { } else if meta.mimeType.starts(with: "audio/") { meta.type = .audio } else if url.pathExtension.lowercased() == "apk" { - meta.type = .app + meta.type = .androidApp } else { meta.type = .unknown } diff --git a/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift b/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift index 7524b1c..2d5c0a0 100644 --- a/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift +++ b/NearbyShare/Model/Protobuf/offline_wire_formats.pb.swift @@ -34,6 +34,43 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP typealias Version = _2 } +enum Location_Nearby_Connections_EndpointType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownEndpoint // = 0 + case connectionsEndpoint // = 1 + case presenceEndpoint // = 2 + + init() { + self = .unknownEndpoint + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownEndpoint + case 1: self = .connectionsEndpoint + case 2: self = .presenceEndpoint + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownEndpoint: return 0 + case .connectionsEndpoint: return 1 + case .presenceEndpoint: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Connections_EndpointType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + struct Location_Nearby_Connections_OfflineFrame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -179,6 +216,51 @@ struct Location_Nearby_Connections_V1Frame { /// Clears the value of `pairedKeyEncryption`. Subsequent reads from it will return its default value. mutating func clearPairedKeyEncryption() {_uniqueStorage()._pairedKeyEncryption = nil} + var authenticationMessage: Location_Nearby_Connections_AuthenticationMessageFrame { + get {return _storage._authenticationMessage ?? Location_Nearby_Connections_AuthenticationMessageFrame()} + set {_uniqueStorage()._authenticationMessage = newValue} + } + /// Returns true if `authenticationMessage` has been explicitly set. + var hasAuthenticationMessage: Bool {return _storage._authenticationMessage != nil} + /// Clears the value of `authenticationMessage`. Subsequent reads from it will return its default value. + mutating func clearAuthenticationMessage() {_uniqueStorage()._authenticationMessage = nil} + + var authenticationResult: Location_Nearby_Connections_AuthenticationResultFrame { + get {return _storage._authenticationResult ?? Location_Nearby_Connections_AuthenticationResultFrame()} + set {_uniqueStorage()._authenticationResult = newValue} + } + /// Returns true if `authenticationResult` has been explicitly set. + var hasAuthenticationResult: Bool {return _storage._authenticationResult != nil} + /// Clears the value of `authenticationResult`. Subsequent reads from it will return its default value. + mutating func clearAuthenticationResult() {_uniqueStorage()._authenticationResult = nil} + + var autoResume: Location_Nearby_Connections_AutoResumeFrame { + get {return _storage._autoResume ?? Location_Nearby_Connections_AutoResumeFrame()} + set {_uniqueStorage()._autoResume = newValue} + } + /// Returns true if `autoResume` has been explicitly set. + var hasAutoResume: Bool {return _storage._autoResume != nil} + /// Clears the value of `autoResume`. Subsequent reads from it will return its default value. + mutating func clearAutoResume() {_uniqueStorage()._autoResume = nil} + + var autoReconnect: Location_Nearby_Connections_AutoReconnectFrame { + get {return _storage._autoReconnect ?? Location_Nearby_Connections_AutoReconnectFrame()} + set {_uniqueStorage()._autoReconnect = newValue} + } + /// Returns true if `autoReconnect` has been explicitly set. + var hasAutoReconnect: Bool {return _storage._autoReconnect != nil} + /// Clears the value of `autoReconnect`. Subsequent reads from it will return its default value. + mutating func clearAutoReconnect() {_uniqueStorage()._autoReconnect = nil} + + var bandwidthUpgradeRetry: Location_Nearby_Connections_BandwidthUpgradeRetryFrame { + get {return _storage._bandwidthUpgradeRetry ?? Location_Nearby_Connections_BandwidthUpgradeRetryFrame()} + set {_uniqueStorage()._bandwidthUpgradeRetry = newValue} + } + /// Returns true if `bandwidthUpgradeRetry` has been explicitly set. + var hasBandwidthUpgradeRetry: Bool {return _storage._bandwidthUpgradeRetry != nil} + /// Clears the value of `bandwidthUpgradeRetry`. Subsequent reads from it will return its default value. + mutating func clearBandwidthUpgradeRetry() {_uniqueStorage()._bandwidthUpgradeRetry = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum FrameType: SwiftProtobuf.Enum { @@ -191,6 +273,11 @@ struct Location_Nearby_Connections_V1Frame { case keepAlive // = 5 case disconnection // = 6 case pairedKeyEncryption // = 7 + case authenticationMessage // = 8 + case authenticationResult // = 9 + case autoResume // = 10 + case autoReconnect // = 11 + case bandwidthUpgradeRetry // = 12 init() { self = .unknownFrameType @@ -206,6 +293,11 @@ struct Location_Nearby_Connections_V1Frame { case 5: self = .keepAlive case 6: self = .disconnection case 7: self = .pairedKeyEncryption + case 8: self = .authenticationMessage + case 9: self = .authenticationResult + case 10: self = .autoResume + case 11: self = .autoReconnect + case 12: self = .bandwidthUpgradeRetry default: return nil } } @@ -220,6 +312,11 @@ struct Location_Nearby_Connections_V1Frame { case .keepAlive: return 5 case .disconnection: return 6 case .pairedKeyEncryption: return 7 + case .authenticationMessage: return 8 + case .authenticationResult: return 9 + case .autoResume: return 10 + case .autoReconnect: return 11 + case .bandwidthUpgradeRetry: return 12 } } @@ -346,8 +443,73 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { /// Clears the value of `deviceInfo`. Subsequent reads from it will return its default value. mutating func clearDeviceInfo() {_uniqueStorage()._deviceInfo = nil} + /// Represents the {@link Device} that invokes the request. + var device: OneOf_Device? { + get {return _storage._device} + set {_uniqueStorage()._device = newValue} + } + + var connectionsDevice: Location_Nearby_Connections_ConnectionsDevice { + get { + if case .connectionsDevice(let v)? = _storage._device {return v} + return Location_Nearby_Connections_ConnectionsDevice() + } + set {_uniqueStorage()._device = .connectionsDevice(newValue)} + } + + var presenceDevice: Location_Nearby_Connections_PresenceDevice { + get { + if case .presenceDevice(let v)? = _storage._device {return v} + return Location_Nearby_Connections_PresenceDevice() + } + set {_uniqueStorage()._device = .presenceDevice(newValue)} + } + + var connectionMode: Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode { + get {return _storage._connectionMode ?? .legacy} + set {_uniqueStorage()._connectionMode = newValue} + } + /// Returns true if `connectionMode` has been explicitly set. + var hasConnectionMode: Bool {return _storage._connectionMode != nil} + /// Clears the value of `connectionMode`. Subsequent reads from it will return its default value. + mutating func clearConnectionMode() {_uniqueStorage()._connectionMode = nil} + + var locationHint: Location_Nearby_Connections_LocationHint { + get {return _storage._locationHint ?? Location_Nearby_Connections_LocationHint()} + set {_uniqueStorage()._locationHint = newValue} + } + /// Returns true if `locationHint` has been explicitly set. + var hasLocationHint: Bool {return _storage._locationHint != nil} + /// Clears the value of `locationHint`. Subsequent reads from it will return its default value. + mutating func clearLocationHint() {_uniqueStorage()._locationHint = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() + /// Represents the {@link Device} that invokes the request. + enum OneOf_Device: Equatable { + case connectionsDevice(Location_Nearby_Connections_ConnectionsDevice) + case presenceDevice(Location_Nearby_Connections_PresenceDevice) + + #if !swift(>=4.1) + static func ==(lhs: Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device, rhs: Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device) -> Bool { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch (lhs, rhs) { + case (.connectionsDevice, .connectionsDevice): return { + guard case .connectionsDevice(let l) = lhs, case .connectionsDevice(let r) = rhs else { preconditionFailure() } + return l == r + }() + case (.presenceDevice, .presenceDevice): return { + guard case .presenceDevice(let l) = lhs, case .presenceDevice(let r) = rhs else { preconditionFailure() } + return l == r + }() + default: return false + } + } + #endif + } + /// Should always match cs/symbol:location.nearby.proto.connections.Medium /// LINT.IfChange enum Medium: SwiftProtobuf.Enum { @@ -364,6 +526,8 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { case webRtc // = 9 case bleL2Cap // = 10 case usb // = 11 + case webRtcNonCellular // = 12 + case awdl // = 13 init() { self = .unknownMedium @@ -383,6 +547,8 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { case 9: self = .webRtc case 10: self = .bleL2Cap case 11: self = .usb + case 12: self = .webRtcNonCellular + case 13: self = .awdl default: return nil } } @@ -401,6 +567,35 @@ struct Location_Nearby_Connections_ConnectionRequestFrame { case .webRtc: return 9 case .bleL2Cap: return 10 case .usb: return 11 + case .webRtcNonCellular: return 12 + case .awdl: return 13 + } + } + + } + + /// LINT.IfChange + enum ConnectionMode: SwiftProtobuf.Enum { + typealias RawValue = Int + case legacy // = 0 + case instant // = 1 + + init() { + self = .legacy + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .legacy + case 1: self = .instant + default: return nil + } + } + + var rawValue: Int { + switch self { + case .legacy: return 0 + case .instant: return 1 } } @@ -417,6 +612,10 @@ extension Location_Nearby_Connections_ConnectionRequestFrame.Medium: CaseIterabl // Support synthesized by the compiler. } +extension Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode: CaseIterable { + // Support synthesized by the compiler. +} + #endif // swift(>=4.2) /// This doesn't need to send back endpoint_id and endpoint_name (like @@ -490,6 +689,33 @@ struct Location_Nearby_Connections_ConnectionResponseFrame { /// Clears the value of `nearbyConnectionsVersion`. Subsequent reads from it will return its default value. mutating func clearNearbyConnectionsVersion() {self._nearbyConnectionsVersion = nil} + var safeToDisconnectVersion: Int32 { + get {return _safeToDisconnectVersion ?? 0} + set {_safeToDisconnectVersion = newValue} + } + /// Returns true if `safeToDisconnectVersion` has been explicitly set. + var hasSafeToDisconnectVersion: Bool {return self._safeToDisconnectVersion != nil} + /// Clears the value of `safeToDisconnectVersion`. Subsequent reads from it will return its default value. + mutating func clearSafeToDisconnectVersion() {self._safeToDisconnectVersion = nil} + + var locationHint: Location_Nearby_Connections_LocationHint { + get {return _locationHint ?? Location_Nearby_Connections_LocationHint()} + set {_locationHint = newValue} + } + /// Returns true if `locationHint` has been explicitly set. + var hasLocationHint: Bool {return self._locationHint != nil} + /// Clears the value of `locationHint`. Subsequent reads from it will return its default value. + mutating func clearLocationHint() {self._locationHint = nil} + + var keepAliveTimeoutMillis: Int32 { + get {return _keepAliveTimeoutMillis ?? 0} + set {_keepAliveTimeoutMillis = newValue} + } + /// Returns true if `keepAliveTimeoutMillis` has been explicitly set. + var hasKeepAliveTimeoutMillis: Bool {return self._keepAliveTimeoutMillis != nil} + /// Clears the value of `keepAliveTimeoutMillis`. Subsequent reads from it will return its default value. + mutating func clearKeepAliveTimeoutMillis() {self._keepAliveTimeoutMillis = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() /// Used to replace the status integer parameter with a meaningful enum item. @@ -533,6 +759,9 @@ struct Location_Nearby_Connections_ConnectionResponseFrame { fileprivate var _osInfo: Location_Nearby_Connections_OsInfo? = nil fileprivate var _multiplexSocketBitmask: Int32? = nil fileprivate var _nearbyConnectionsVersion: Int32? = nil + fileprivate var _safeToDisconnectVersion: Int32? = nil + fileprivate var _locationHint: Location_Nearby_Connections_LocationHint? = nil + fileprivate var _keepAliveTimeoutMillis: Int32? = nil } #if swift(>=4.2) @@ -592,6 +821,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { case unknownPacketType // = 0 case data // = 1 case control // = 2 + case payloadAck // = 3 init() { self = .unknownPacketType @@ -602,6 +832,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { case 0: self = .unknownPacketType case 1: self = .data case 2: self = .control + case 3: self = .payloadAck default: return nil } } @@ -611,6 +842,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { case .unknownPacketType: return 0 case .data: return 1 case .control: return 2 + case .payloadAck: return 3 } } @@ -675,6 +907,16 @@ struct Location_Nearby_Connections_PayloadTransferFrame { /// Clears the value of `parentFolder`. Subsequent reads from it will return its default value. mutating func clearParentFolder() {self._parentFolder = nil} + /// Time since the epoch in milliseconds. + var lastModifiedTimestampMillis: Int64 { + get {return _lastModifiedTimestampMillis ?? 0} + set {_lastModifiedTimestampMillis = newValue} + } + /// Returns true if `lastModifiedTimestampMillis` has been explicitly set. + var hasLastModifiedTimestampMillis: Bool {return self._lastModifiedTimestampMillis != nil} + /// Clears the value of `lastModifiedTimestampMillis`. Subsequent reads from it will return its default value. + mutating func clearLastModifiedTimestampMillis() {self._lastModifiedTimestampMillis = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum PayloadType: SwiftProtobuf.Enum { @@ -717,6 +959,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { fileprivate var _isSensitive: Bool? = nil fileprivate var _fileName: String? = nil fileprivate var _parentFolder: String? = nil + fileprivate var _lastModifiedTimestampMillis: Int64? = nil } /// Accompanies DATA packets. @@ -752,6 +995,15 @@ struct Location_Nearby_Connections_PayloadTransferFrame { /// Clears the value of `body`. Subsequent reads from it will return its default value. mutating func clearBody() {self._body = nil} + var index: Int32 { + get {return _index ?? 0} + set {_index = newValue} + } + /// Returns true if `index` has been explicitly set. + var hasIndex: Bool {return self._index != nil} + /// Clears the value of `index`. Subsequent reads from it will return its default value. + mutating func clearIndex() {self._index = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum Flags: SwiftProtobuf.Enum { @@ -782,6 +1034,7 @@ struct Location_Nearby_Connections_PayloadTransferFrame { fileprivate var _flags: Int32? = nil fileprivate var _offset: Int64? = nil fileprivate var _body: Data? = nil + fileprivate var _index: Int32? = nil } /// Accompanies CONTROL packets. @@ -815,6 +1068,8 @@ struct Location_Nearby_Connections_PayloadTransferFrame { case unknownEventType // = 0 case payloadError // = 1 case payloadCanceled // = 2 + + /// Use PacketType.PAYLOAD_ACK instead case payloadReceivedAck // = 3 init() { @@ -918,6 +1173,15 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { /// Clears the value of `clientIntroductionAck`. Subsequent reads from it will return its default value. mutating func clearClientIntroductionAck() {self._clientIntroductionAck = nil} + var safeToClosePriorChannel: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel { + get {return _safeToClosePriorChannel ?? Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel()} + set {_safeToClosePriorChannel = newValue} + } + /// Returns true if `safeToClosePriorChannel` has been explicitly set. + var hasSafeToClosePriorChannel: Bool {return self._safeToClosePriorChannel != nil} + /// Clears the value of `safeToClosePriorChannel`. Subsequent reads from it will return its default value. + mutating func clearSafeToClosePriorChannel() {self._safeToClosePriorChannel = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum EventType: SwiftProtobuf.Enum { @@ -930,6 +1194,10 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { case upgradeFailure // = 5 case clientIntroductionAck // = 6 + /// The event type that requires the remote device to send the available + /// upgrade path. + case upgradePathRequest // = 7 + init() { self = .unknownEventType } @@ -943,6 +1211,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { case 4: self = .clientIntroduction case 5: self = .upgradeFailure case 6: self = .clientIntroductionAck + case 7: self = .upgradePathRequest default: return nil } } @@ -956,6 +1225,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { case .clientIntroduction: return 4 case .upgradeFailure: return 5 case .clientIntroductionAck: return 6 + case .upgradePathRequest: return 7 } } @@ -1031,6 +1301,15 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { /// Clears the value of `webRtcCredentials`. Subsequent reads from it will return its default value. mutating func clearWebRtcCredentials() {_uniqueStorage()._webRtcCredentials = nil} + var awdlCredentials: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials { + get {return _storage._awdlCredentials ?? Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials()} + set {_uniqueStorage()._awdlCredentials = newValue} + } + /// Returns true if `awdlCredentials` has been explicitly set. + var hasAwdlCredentials: Bool {return _storage._awdlCredentials != nil} + /// Clears the value of `awdlCredentials`. Subsequent reads from it will return its default value. + mutating func clearAwdlCredentials() {_uniqueStorage()._awdlCredentials = nil} + /// Disable Encryption for this upgrade medium to improve throughput. var supportsDisablingEncryption: Bool { get {return _storage._supportsDisablingEncryption ?? false} @@ -1051,6 +1330,15 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { /// Clears the value of `supportsClientIntroductionAck`. Subsequent reads from it will return its default value. mutating func clearSupportsClientIntroductionAck() {_uniqueStorage()._supportsClientIntroductionAck = nil} + var upgradePathRequest: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest { + get {return _storage._upgradePathRequest ?? Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest()} + set {_uniqueStorage()._upgradePathRequest = newValue} + } + /// Returns true if `upgradePathRequest` has been explicitly set. + var hasUpgradePathRequest: Bool {return _storage._upgradePathRequest != nil} + /// Clears the value of `upgradePathRequest`. Subsequent reads from it will return its default value. + mutating func clearUpgradePathRequest() {_uniqueStorage()._upgradePathRequest = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() /// Should always match cs/symbol:location.nearby.proto.connections.Medium @@ -1069,6 +1357,8 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { /// 10 is reserved. case usb // = 11 + case webRtcNonCellular // = 12 + case awdl // = 13 init() { self = .unknownMedium @@ -1087,6 +1377,8 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { case 8: self = .wifiDirect case 9: self = .webRtc case 11: self = .usb + case 12: self = .webRtcNonCellular + case 13: self = .awdl default: return nil } } @@ -1104,6 +1396,8 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { case .wifiDirect: return 8 case .webRtc: return 9 case .usb: return 11 + case .webRtcNonCellular: return 12 + case .awdl: return 13 } } @@ -1329,6 +1623,18 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { /// Clears the value of `gateway`. Subsequent reads from it will return its default value. mutating func clearGateway() {self._gateway = nil} + /// IPv6 link-local address, network order (128bits). + /// The GO should listen on both IPv4 and IPv6 addresses. + /// https://en.wikipedia.org/wiki/Link-local_address#IPv6 + var ipV6Address: Data { + get {return _ipV6Address ?? Data()} + set {_ipV6Address = newValue} + } + /// Returns true if `ipV6Address` has been explicitly set. + var hasIpV6Address: Bool {return self._ipV6Address != nil} + /// Clears the value of `ipV6Address`. Subsequent reads from it will return its default value. + mutating func clearIpV6Address() {self._ipV6Address = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} @@ -1338,6 +1644,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { fileprivate var _port: Int32? = nil fileprivate var _frequency: Int32? = nil fileprivate var _gateway: String? = nil + fileprivate var _ipV6Address: Data? = nil } /// Accompanies Medium.WEB_RTC @@ -1372,11 +1679,99 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { fileprivate var _locationHint: Location_Nearby_Connections_LocationHint? = nil } + /// Accompanies Medium.AWDL. + struct AwdlCredentials { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var serviceName: String { + get {return _serviceName ?? String()} + set {_serviceName = newValue} + } + /// Returns true if `serviceName` has been explicitly set. + var hasServiceName: Bool {return self._serviceName != nil} + /// Clears the value of `serviceName`. Subsequent reads from it will return its default value. + mutating func clearServiceName() {self._serviceName = nil} + + var serviceType: String { + get {return _serviceType ?? String()} + set {_serviceType = newValue} + } + /// Returns true if `serviceType` has been explicitly set. + var hasServiceType: Bool {return self._serviceType != nil} + /// Clears the value of `serviceType`. Subsequent reads from it will return its default value. + mutating func clearServiceType() {self._serviceType = nil} + + var password: String { + get {return _password ?? String()} + set {_password = newValue} + } + /// Returns true if `password` has been explicitly set. + var hasPassword: Bool {return self._password != nil} + /// Clears the value of `password`. Subsequent reads from it will return its default value. + mutating func clearPassword() {self._password = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _serviceName: String? = nil + fileprivate var _serviceType: String? = nil + fileprivate var _password: String? = nil + } + + struct UpgradePathRequest { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Supported mediums on the advertiser device. + var mediums: [Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium] = [] + + var mediumMetaData: Location_Nearby_Connections_MediumMetadata { + get {return _mediumMetaData ?? Location_Nearby_Connections_MediumMetadata()} + set {_mediumMetaData = newValue} + } + /// Returns true if `mediumMetaData` has been explicitly set. + var hasMediumMetaData: Bool {return self._mediumMetaData != nil} + /// Clears the value of `mediumMetaData`. Subsequent reads from it will return its default value. + mutating func clearMediumMetaData() {self._mediumMetaData = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _mediumMetaData: Location_Nearby_Connections_MediumMetadata? = nil + } + init() {} fileprivate var _storage = _StorageClass.defaultInstance } + /// Accompanies SAFE_TO_CLOSE_PRIOR_CHANNEL events. + struct SafeToClosePriorChannel { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var staFrequency: Int32 { + get {return _staFrequency ?? 0} + set {_staFrequency = newValue} + } + /// Returns true if `staFrequency` has been explicitly set. + var hasStaFrequency: Bool {return self._staFrequency != nil} + /// Clears the value of `staFrequency`. Subsequent reads from it will return its default value. + mutating func clearStaFrequency() {self._staFrequency = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _staFrequency: Int32? = nil + } + /// Accompanies CLIENT_INTRODUCTION events. struct ClientIntroduction { // SwiftProtobuf.Message conformance is added in an extension below. See the @@ -1401,12 +1796,22 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { /// Clears the value of `supportsDisablingEncryption`. Subsequent reads from it will return its default value. mutating func clearSupportsDisablingEncryption() {self._supportsDisablingEncryption = nil} + var lastEndpointID: String { + get {return _lastEndpointID ?? String()} + set {_lastEndpointID = newValue} + } + /// Returns true if `lastEndpointID` has been explicitly set. + var hasLastEndpointID: Bool {return self._lastEndpointID != nil} + /// Clears the value of `lastEndpointID`. Subsequent reads from it will return its default value. + mutating func clearLastEndpointID() {self._lastEndpointID = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _endpointID: String? = nil fileprivate var _supportsDisablingEncryption: Bool? = nil + fileprivate var _lastEndpointID: String? = nil } /// Accompanies CLIENT_INTRODUCTION_ACK events. @@ -1426,6 +1831,7 @@ struct Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame { fileprivate var _upgradePathInfo: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo? = nil fileprivate var _clientIntroduction: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction? = nil fileprivate var _clientIntroductionAck: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroductionAck? = nil + fileprivate var _safeToClosePriorChannel: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel? = nil } #if swift(>=4.2) @@ -1440,6 +1846,104 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa #endif // swift(>=4.2) +struct Location_Nearby_Connections_BandwidthUpgradeRetryFrame { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The mediums this device supports upgrading to. This list should be filtered + /// by both the strategy and this device's individual limitations. + var supportedMedium: [Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium] = [] + + /// If true, expect the remote endpoint to send back the latest + /// supported_medium. + var isRequest: Bool { + get {return _isRequest ?? false} + set {_isRequest = newValue} + } + /// Returns true if `isRequest` has been explicitly set. + var hasIsRequest: Bool {return self._isRequest != nil} + /// Clears the value of `isRequest`. Subsequent reads from it will return its default value. + mutating func clearIsRequest() {self._isRequest = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + /// Should always match cs/symbol:location.nearby.proto.connections.Medium + /// LINT.IfChange + enum Medium: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownMedium // = 0 + + /// 1 is reserved. + case bluetooth // = 2 + case wifiHotspot // = 3 + case ble // = 4 + case wifiLan // = 5 + case wifiAware // = 6 + case nfc // = 7 + case wifiDirect // = 8 + case webRtc // = 9 + case bleL2Cap // = 10 + case usb // = 11 + case webRtcNonCellular // = 12 + case awdl // = 13 + + init() { + self = .unknownMedium + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownMedium + case 2: self = .bluetooth + case 3: self = .wifiHotspot + case 4: self = .ble + case 5: self = .wifiLan + case 6: self = .wifiAware + case 7: self = .nfc + case 8: self = .wifiDirect + case 9: self = .webRtc + case 10: self = .bleL2Cap + case 11: self = .usb + case 12: self = .webRtcNonCellular + case 13: self = .awdl + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownMedium: return 0 + case .bluetooth: return 2 + case .wifiHotspot: return 3 + case .ble: return 4 + case .wifiLan: return 5 + case .wifiAware: return 6 + case .nfc: return 7 + case .wifiDirect: return 8 + case .webRtc: return 9 + case .bleL2Cap: return 10 + case .usb: return 11 + case .webRtcNonCellular: return 12 + case .awdl: return 13 + } + } + + } + + init() {} + + fileprivate var _isRequest: Bool? = nil +} + +#if swift(>=4.2) + +extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + struct Location_Nearby_Connections_KeepAliveFrame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1455,11 +1959,22 @@ struct Location_Nearby_Connections_KeepAliveFrame { /// Clears the value of `ack`. Subsequent reads from it will return its default value. mutating func clearAck() {self._ack = nil} + /// The sequence number + var seqNum: UInt32 { + get {return _seqNum ?? 0} + set {_seqNum = newValue} + } + /// Returns true if `seqNum` has been explicitly set. + var hasSeqNum: Bool {return self._seqNum != nil} + /// Clears the value of `seqNum`. Subsequent reads from it will return its default value. + mutating func clearSeqNum() {self._seqNum = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _ack: Bool? = nil + fileprivate var _seqNum: UInt32? = nil } /// Informs the remote side to immediately severe the socket connection. @@ -1524,6 +2039,221 @@ struct Location_Nearby_Connections_PairedKeyEncryptionFrame { fileprivate var _signedData: Data? = nil } +/// Nearby Connections authentication frame, contains the bytes format of a +/// DeviceProvider's authentication message. +struct Location_Nearby_Connections_AuthenticationMessageFrame { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// An auth message generated by DeviceProvider. + /// To be sent to the remote device for verification during connection setups. + var authMessage: Data { + get {return _authMessage ?? Data()} + set {_authMessage = newValue} + } + /// Returns true if `authMessage` has been explicitly set. + var hasAuthMessage: Bool {return self._authMessage != nil} + /// Clears the value of `authMessage`. Subsequent reads from it will return its default value. + mutating func clearAuthMessage() {self._authMessage = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _authMessage: Data? = nil +} + +/// Nearby Connections authentication result frame. +struct Location_Nearby_Connections_AuthenticationResultFrame { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The authentication result. Non null if this frame is used to exchange + /// authentication result. + var result: Int32 { + get {return _result ?? 0} + set {_result = newValue} + } + /// Returns true if `result` has been explicitly set. + var hasResult: Bool {return self._result != nil} + /// Clears the value of `result`. Subsequent reads from it will return its default value. + mutating func clearResult() {self._result = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _result: Int32? = nil +} + +struct Location_Nearby_Connections_AutoResumeFrame { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var eventType: Location_Nearby_Connections_AutoResumeFrame.EventType { + get {return _eventType ?? .unknownAutoResumeEventType} + set {_eventType = newValue} + } + /// Returns true if `eventType` has been explicitly set. + var hasEventType: Bool {return self._eventType != nil} + /// Clears the value of `eventType`. Subsequent reads from it will return its default value. + mutating func clearEventType() {self._eventType = nil} + + var pendingPayloadID: Int64 { + get {return _pendingPayloadID ?? 0} + set {_pendingPayloadID = newValue} + } + /// Returns true if `pendingPayloadID` has been explicitly set. + var hasPendingPayloadID: Bool {return self._pendingPayloadID != nil} + /// Clears the value of `pendingPayloadID`. Subsequent reads from it will return its default value. + mutating func clearPendingPayloadID() {self._pendingPayloadID = nil} + + var nextPayloadChunkIndex: Int32 { + get {return _nextPayloadChunkIndex ?? 0} + set {_nextPayloadChunkIndex = newValue} + } + /// Returns true if `nextPayloadChunkIndex` has been explicitly set. + var hasNextPayloadChunkIndex: Bool {return self._nextPayloadChunkIndex != nil} + /// Clears the value of `nextPayloadChunkIndex`. Subsequent reads from it will return its default value. + mutating func clearNextPayloadChunkIndex() {self._nextPayloadChunkIndex = nil} + + var version: Int32 { + get {return _version ?? 0} + set {_version = newValue} + } + /// Returns true if `version` has been explicitly set. + var hasVersion: Bool {return self._version != nil} + /// Clears the value of `version`. Subsequent reads from it will return its default value. + mutating func clearVersion() {self._version = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum EventType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownAutoResumeEventType // = 0 + case payloadResumeTransferStart // = 1 + case payloadResumeTransferAck // = 2 + + init() { + self = .unknownAutoResumeEventType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownAutoResumeEventType + case 1: self = .payloadResumeTransferStart + case 2: self = .payloadResumeTransferAck + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownAutoResumeEventType: return 0 + case .payloadResumeTransferStart: return 1 + case .payloadResumeTransferAck: return 2 + } + } + + } + + init() {} + + fileprivate var _eventType: Location_Nearby_Connections_AutoResumeFrame.EventType? = nil + fileprivate var _pendingPayloadID: Int64? = nil + fileprivate var _nextPayloadChunkIndex: Int32? = nil + fileprivate var _version: Int32? = nil +} + +#if swift(>=4.2) + +extension Location_Nearby_Connections_AutoResumeFrame.EventType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +struct Location_Nearby_Connections_AutoReconnectFrame { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var endpointID: String { + get {return _endpointID ?? String()} + set {_endpointID = newValue} + } + /// Returns true if `endpointID` has been explicitly set. + var hasEndpointID: Bool {return self._endpointID != nil} + /// Clears the value of `endpointID`. Subsequent reads from it will return its default value. + mutating func clearEndpointID() {self._endpointID = nil} + + var eventType: Location_Nearby_Connections_AutoReconnectFrame.EventType { + get {return _eventType ?? .unknownEventType} + set {_eventType = newValue} + } + /// Returns true if `eventType` has been explicitly set. + var hasEventType: Bool {return self._eventType != nil} + /// Clears the value of `eventType`. Subsequent reads from it will return its default value. + mutating func clearEventType() {self._eventType = nil} + + var lastEndpointID: String { + get {return _lastEndpointID ?? String()} + set {_lastEndpointID = newValue} + } + /// Returns true if `lastEndpointID` has been explicitly set. + var hasLastEndpointID: Bool {return self._lastEndpointID != nil} + /// Clears the value of `lastEndpointID`. Subsequent reads from it will return its default value. + mutating func clearLastEndpointID() {self._lastEndpointID = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum EventType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownEventType // = 0 + case clientIntroduction // = 1 + case clientIntroductionAck // = 2 + + init() { + self = .unknownEventType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownEventType + case 1: self = .clientIntroduction + case 2: self = .clientIntroductionAck + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownEventType: return 0 + case .clientIntroduction: return 1 + case .clientIntroductionAck: return 2 + } + } + + } + + init() {} + + fileprivate var _endpointID: String? = nil + fileprivate var _eventType: Location_Nearby_Connections_AutoReconnectFrame.EventType? = nil + fileprivate var _lastEndpointID: String? = nil +} + +#if swift(>=4.2) + +extension Location_Nearby_Connections_AutoReconnectFrame.EventType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + struct Location_Nearby_Connections_MediumMetadata { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1531,131 +2261,131 @@ struct Location_Nearby_Connections_MediumMetadata { /// True if local device supports 5GHz. var supports5Ghz: Bool { - get {return _supports5Ghz ?? false} - set {_supports5Ghz = newValue} + get {return _storage._supports5Ghz ?? false} + set {_uniqueStorage()._supports5Ghz = newValue} } /// Returns true if `supports5Ghz` has been explicitly set. - var hasSupports5Ghz: Bool {return self._supports5Ghz != nil} + var hasSupports5Ghz: Bool {return _storage._supports5Ghz != nil} /// Clears the value of `supports5Ghz`. Subsequent reads from it will return its default value. - mutating func clearSupports5Ghz() {self._supports5Ghz = nil} + mutating func clearSupports5Ghz() {_uniqueStorage()._supports5Ghz = nil} /// WiFi LAN BSSID, in the form of a six-byte MAC address: XX:XX:XX:XX:XX:XX var bssid: String { - get {return _bssid ?? String()} - set {_bssid = newValue} + get {return _storage._bssid ?? String()} + set {_uniqueStorage()._bssid = newValue} } /// Returns true if `bssid` has been explicitly set. - var hasBssid: Bool {return self._bssid != nil} + var hasBssid: Bool {return _storage._bssid != nil} /// Clears the value of `bssid`. Subsequent reads from it will return its default value. - mutating func clearBssid() {self._bssid = nil} + mutating func clearBssid() {_uniqueStorage()._bssid = nil} /// IP address, in network byte order: the highest order byte of the address is /// in byte[0]. var ipAddress: Data { - get {return _ipAddress ?? Data()} - set {_ipAddress = newValue} + get {return _storage._ipAddress ?? Data()} + set {_uniqueStorage()._ipAddress = newValue} } /// Returns true if `ipAddress` has been explicitly set. - var hasIpAddress: Bool {return self._ipAddress != nil} + var hasIpAddress: Bool {return _storage._ipAddress != nil} /// Clears the value of `ipAddress`. Subsequent reads from it will return its default value. - mutating func clearIpAddress() {self._ipAddress = nil} + mutating func clearIpAddress() {_uniqueStorage()._ipAddress = nil} /// True if local device supports 6GHz. var supports6Ghz: Bool { - get {return _supports6Ghz ?? false} - set {_supports6Ghz = newValue} + get {return _storage._supports6Ghz ?? false} + set {_uniqueStorage()._supports6Ghz = newValue} } /// Returns true if `supports6Ghz` has been explicitly set. - var hasSupports6Ghz: Bool {return self._supports6Ghz != nil} + var hasSupports6Ghz: Bool {return _storage._supports6Ghz != nil} /// Clears the value of `supports6Ghz`. Subsequent reads from it will return its default value. - mutating func clearSupports6Ghz() {self._supports6Ghz = nil} + mutating func clearSupports6Ghz() {_uniqueStorage()._supports6Ghz = nil} /// True if local device has mobile radio. var mobileRadio: Bool { - get {return _mobileRadio ?? false} - set {_mobileRadio = newValue} + get {return _storage._mobileRadio ?? false} + set {_uniqueStorage()._mobileRadio = newValue} } /// Returns true if `mobileRadio` has been explicitly set. - var hasMobileRadio: Bool {return self._mobileRadio != nil} + var hasMobileRadio: Bool {return _storage._mobileRadio != nil} /// Clears the value of `mobileRadio`. Subsequent reads from it will return its default value. - mutating func clearMobileRadio() {self._mobileRadio = nil} + mutating func clearMobileRadio() {_uniqueStorage()._mobileRadio = nil} /// The frequency of the WiFi LAN AP(in MHz). Or -1 is not associated with an /// AP over WiFi, -2 represents the active network uses an Ethernet transport. var apFrequency: Int32 { - get {return _apFrequency ?? -1} - set {_apFrequency = newValue} + get {return _storage._apFrequency ?? -1} + set {_uniqueStorage()._apFrequency = newValue} } /// Returns true if `apFrequency` has been explicitly set. - var hasApFrequency: Bool {return self._apFrequency != nil} + var hasApFrequency: Bool {return _storage._apFrequency != nil} /// Clears the value of `apFrequency`. Subsequent reads from it will return its default value. - mutating func clearApFrequency() {self._apFrequency = nil} + mutating func clearApFrequency() {_uniqueStorage()._apFrequency = nil} /// Available channels on the local device. var availableChannels: Location_Nearby_Connections_AvailableChannels { - get {return _availableChannels ?? Location_Nearby_Connections_AvailableChannels()} - set {_availableChannels = newValue} + get {return _storage._availableChannels ?? Location_Nearby_Connections_AvailableChannels()} + set {_uniqueStorage()._availableChannels = newValue} } /// Returns true if `availableChannels` has been explicitly set. - var hasAvailableChannels: Bool {return self._availableChannels != nil} + var hasAvailableChannels: Bool {return _storage._availableChannels != nil} /// Clears the value of `availableChannels`. Subsequent reads from it will return its default value. - mutating func clearAvailableChannels() {self._availableChannels = nil} + mutating func clearAvailableChannels() {_uniqueStorage()._availableChannels = nil} /// Usable WiFi Direct client channels on the local device. var wifiDirectCliUsableChannels: Location_Nearby_Connections_WifiDirectCliUsableChannels { - get {return _wifiDirectCliUsableChannels ?? Location_Nearby_Connections_WifiDirectCliUsableChannels()} - set {_wifiDirectCliUsableChannels = newValue} + get {return _storage._wifiDirectCliUsableChannels ?? Location_Nearby_Connections_WifiDirectCliUsableChannels()} + set {_uniqueStorage()._wifiDirectCliUsableChannels = newValue} } /// Returns true if `wifiDirectCliUsableChannels` has been explicitly set. - var hasWifiDirectCliUsableChannels: Bool {return self._wifiDirectCliUsableChannels != nil} + var hasWifiDirectCliUsableChannels: Bool {return _storage._wifiDirectCliUsableChannels != nil} /// Clears the value of `wifiDirectCliUsableChannels`. Subsequent reads from it will return its default value. - mutating func clearWifiDirectCliUsableChannels() {self._wifiDirectCliUsableChannels = nil} + mutating func clearWifiDirectCliUsableChannels() {_uniqueStorage()._wifiDirectCliUsableChannels = nil} /// Usable WiFi LAN channels on the local device. var wifiLanUsableChannels: Location_Nearby_Connections_WifiLanUsableChannels { - get {return _wifiLanUsableChannels ?? Location_Nearby_Connections_WifiLanUsableChannels()} - set {_wifiLanUsableChannels = newValue} + get {return _storage._wifiLanUsableChannels ?? Location_Nearby_Connections_WifiLanUsableChannels()} + set {_uniqueStorage()._wifiLanUsableChannels = newValue} } /// Returns true if `wifiLanUsableChannels` has been explicitly set. - var hasWifiLanUsableChannels: Bool {return self._wifiLanUsableChannels != nil} + var hasWifiLanUsableChannels: Bool {return _storage._wifiLanUsableChannels != nil} /// Clears the value of `wifiLanUsableChannels`. Subsequent reads from it will return its default value. - mutating func clearWifiLanUsableChannels() {self._wifiLanUsableChannels = nil} + mutating func clearWifiLanUsableChannels() {_uniqueStorage()._wifiLanUsableChannels = nil} /// Usable WiFi Aware channels on the local device. var wifiAwareUsableChannels: Location_Nearby_Connections_WifiAwareUsableChannels { - get {return _wifiAwareUsableChannels ?? Location_Nearby_Connections_WifiAwareUsableChannels()} - set {_wifiAwareUsableChannels = newValue} + get {return _storage._wifiAwareUsableChannels ?? Location_Nearby_Connections_WifiAwareUsableChannels()} + set {_uniqueStorage()._wifiAwareUsableChannels = newValue} } /// Returns true if `wifiAwareUsableChannels` has been explicitly set. - var hasWifiAwareUsableChannels: Bool {return self._wifiAwareUsableChannels != nil} + var hasWifiAwareUsableChannels: Bool {return _storage._wifiAwareUsableChannels != nil} /// Clears the value of `wifiAwareUsableChannels`. Subsequent reads from it will return its default value. - mutating func clearWifiAwareUsableChannels() {self._wifiAwareUsableChannels = nil} + mutating func clearWifiAwareUsableChannels() {_uniqueStorage()._wifiAwareUsableChannels = nil} /// Usable WiFi Hotspot STA channels on the local device. var wifiHotspotStaUsableChannels: Location_Nearby_Connections_WifiHotspotStaUsableChannels { - get {return _wifiHotspotStaUsableChannels ?? Location_Nearby_Connections_WifiHotspotStaUsableChannels()} - set {_wifiHotspotStaUsableChannels = newValue} + get {return _storage._wifiHotspotStaUsableChannels ?? Location_Nearby_Connections_WifiHotspotStaUsableChannels()} + set {_uniqueStorage()._wifiHotspotStaUsableChannels = newValue} } /// Returns true if `wifiHotspotStaUsableChannels` has been explicitly set. - var hasWifiHotspotStaUsableChannels: Bool {return self._wifiHotspotStaUsableChannels != nil} + var hasWifiHotspotStaUsableChannels: Bool {return _storage._wifiHotspotStaUsableChannels != nil} /// Clears the value of `wifiHotspotStaUsableChannels`. Subsequent reads from it will return its default value. - mutating func clearWifiHotspotStaUsableChannels() {self._wifiHotspotStaUsableChannels = nil} + mutating func clearWifiHotspotStaUsableChannels() {_uniqueStorage()._wifiHotspotStaUsableChannels = nil} + + /// The supported medium roles. + var mediumRole: Location_Nearby_Connections_MediumRole { + get {return _storage._mediumRole ?? Location_Nearby_Connections_MediumRole()} + set {_uniqueStorage()._mediumRole = newValue} + } + /// Returns true if `mediumRole` has been explicitly set. + var hasMediumRole: Bool {return _storage._mediumRole != nil} + /// Clears the value of `mediumRole`. Subsequent reads from it will return its default value. + mutating func clearMediumRole() {_uniqueStorage()._mediumRole = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} - fileprivate var _supports5Ghz: Bool? = nil - fileprivate var _bssid: String? = nil - fileprivate var _ipAddress: Data? = nil - fileprivate var _supports6Ghz: Bool? = nil - fileprivate var _mobileRadio: Bool? = nil - fileprivate var _apFrequency: Int32? = nil - fileprivate var _availableChannels: Location_Nearby_Connections_AvailableChannels? = nil - fileprivate var _wifiDirectCliUsableChannels: Location_Nearby_Connections_WifiDirectCliUsableChannels? = nil - fileprivate var _wifiLanUsableChannels: Location_Nearby_Connections_WifiLanUsableChannels? = nil - fileprivate var _wifiAwareUsableChannels: Location_Nearby_Connections_WifiAwareUsableChannels? = nil - fileprivate var _wifiHotspotStaUsableChannels: Location_Nearby_Connections_WifiHotspotStaUsableChannels? = nil + fileprivate var _storage = _StorageClass.defaultInstance } /// Available channels on the local device. @@ -1723,6 +2453,98 @@ struct Location_Nearby_Connections_WifiHotspotStaUsableChannels { init() {} } +/// The medium roles. +struct Location_Nearby_Connections_MediumRole { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var supportWifiDirectGroupOwner: Bool { + get {return _supportWifiDirectGroupOwner ?? false} + set {_supportWifiDirectGroupOwner = newValue} + } + /// Returns true if `supportWifiDirectGroupOwner` has been explicitly set. + var hasSupportWifiDirectGroupOwner: Bool {return self._supportWifiDirectGroupOwner != nil} + /// Clears the value of `supportWifiDirectGroupOwner`. Subsequent reads from it will return its default value. + mutating func clearSupportWifiDirectGroupOwner() {self._supportWifiDirectGroupOwner = nil} + + var supportWifiDirectGroupClient: Bool { + get {return _supportWifiDirectGroupClient ?? false} + set {_supportWifiDirectGroupClient = newValue} + } + /// Returns true if `supportWifiDirectGroupClient` has been explicitly set. + var hasSupportWifiDirectGroupClient: Bool {return self._supportWifiDirectGroupClient != nil} + /// Clears the value of `supportWifiDirectGroupClient`. Subsequent reads from it will return its default value. + mutating func clearSupportWifiDirectGroupClient() {self._supportWifiDirectGroupClient = nil} + + var supportWifiHotspotHost: Bool { + get {return _supportWifiHotspotHost ?? false} + set {_supportWifiHotspotHost = newValue} + } + /// Returns true if `supportWifiHotspotHost` has been explicitly set. + var hasSupportWifiHotspotHost: Bool {return self._supportWifiHotspotHost != nil} + /// Clears the value of `supportWifiHotspotHost`. Subsequent reads from it will return its default value. + mutating func clearSupportWifiHotspotHost() {self._supportWifiHotspotHost = nil} + + var supportWifiHotspotClient: Bool { + get {return _supportWifiHotspotClient ?? false} + set {_supportWifiHotspotClient = newValue} + } + /// Returns true if `supportWifiHotspotClient` has been explicitly set. + var hasSupportWifiHotspotClient: Bool {return self._supportWifiHotspotClient != nil} + /// Clears the value of `supportWifiHotspotClient`. Subsequent reads from it will return its default value. + mutating func clearSupportWifiHotspotClient() {self._supportWifiHotspotClient = nil} + + var supportWifiAwarePublisher: Bool { + get {return _supportWifiAwarePublisher ?? false} + set {_supportWifiAwarePublisher = newValue} + } + /// Returns true if `supportWifiAwarePublisher` has been explicitly set. + var hasSupportWifiAwarePublisher: Bool {return self._supportWifiAwarePublisher != nil} + /// Clears the value of `supportWifiAwarePublisher`. Subsequent reads from it will return its default value. + mutating func clearSupportWifiAwarePublisher() {self._supportWifiAwarePublisher = nil} + + var supportWifiAwareSubscriber: Bool { + get {return _supportWifiAwareSubscriber ?? false} + set {_supportWifiAwareSubscriber = newValue} + } + /// Returns true if `supportWifiAwareSubscriber` has been explicitly set. + var hasSupportWifiAwareSubscriber: Bool {return self._supportWifiAwareSubscriber != nil} + /// Clears the value of `supportWifiAwareSubscriber`. Subsequent reads from it will return its default value. + mutating func clearSupportWifiAwareSubscriber() {self._supportWifiAwareSubscriber = nil} + + var supportAwdlPublisher: Bool { + get {return _supportAwdlPublisher ?? false} + set {_supportAwdlPublisher = newValue} + } + /// Returns true if `supportAwdlPublisher` has been explicitly set. + var hasSupportAwdlPublisher: Bool {return self._supportAwdlPublisher != nil} + /// Clears the value of `supportAwdlPublisher`. Subsequent reads from it will return its default value. + mutating func clearSupportAwdlPublisher() {self._supportAwdlPublisher = nil} + + var supportAwdlSubscriber: Bool { + get {return _supportAwdlSubscriber ?? false} + set {_supportAwdlSubscriber = newValue} + } + /// Returns true if `supportAwdlSubscriber` has been explicitly set. + var hasSupportAwdlSubscriber: Bool {return self._supportAwdlSubscriber != nil} + /// Clears the value of `supportAwdlSubscriber`. Subsequent reads from it will return its default value. + mutating func clearSupportAwdlSubscriber() {self._supportAwdlSubscriber = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _supportWifiDirectGroupOwner: Bool? = nil + fileprivate var _supportWifiDirectGroupClient: Bool? = nil + fileprivate var _supportWifiHotspotHost: Bool? = nil + fileprivate var _supportWifiHotspotClient: Bool? = nil + fileprivate var _supportWifiAwarePublisher: Bool? = nil + fileprivate var _supportWifiAwareSubscriber: Bool? = nil + fileprivate var _supportAwdlPublisher: Bool? = nil + fileprivate var _supportAwdlSubscriber: Bool? = nil +} + /// LocationHint is used to specify a location as well as format. struct Location_Nearby_Connections_LocationHint { // SwiftProtobuf.Message conformance is added in an extension below. See the @@ -1881,13 +2703,205 @@ extension Location_Nearby_Connections_OsInfo.OsType: CaseIterable { #endif // swift(>=4.2) +struct Location_Nearby_Connections_ConnectionsDevice { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var endpointID: String { + get {return _endpointID ?? String()} + set {_endpointID = newValue} + } + /// Returns true if `endpointID` has been explicitly set. + var hasEndpointID: Bool {return self._endpointID != nil} + /// Clears the value of `endpointID`. Subsequent reads from it will return its default value. + mutating func clearEndpointID() {self._endpointID = nil} + + var endpointType: Location_Nearby_Connections_EndpointType { + get {return _endpointType ?? .unknownEndpoint} + set {_endpointType = newValue} + } + /// Returns true if `endpointType` has been explicitly set. + var hasEndpointType: Bool {return self._endpointType != nil} + /// Clears the value of `endpointType`. Subsequent reads from it will return its default value. + mutating func clearEndpointType() {self._endpointType = nil} + + /// Data Elements. + var connectivityInfoList: Data { + get {return _connectivityInfoList ?? Data()} + set {_connectivityInfoList = newValue} + } + /// Returns true if `connectivityInfoList` has been explicitly set. + var hasConnectivityInfoList: Bool {return self._connectivityInfoList != nil} + /// Clears the value of `connectivityInfoList`. Subsequent reads from it will return its default value. + mutating func clearConnectivityInfoList() {self._connectivityInfoList = nil} + + var endpointInfo: Data { + get {return _endpointInfo ?? Data()} + set {_endpointInfo = newValue} + } + /// Returns true if `endpointInfo` has been explicitly set. + var hasEndpointInfo: Bool {return self._endpointInfo != nil} + /// Clears the value of `endpointInfo`. Subsequent reads from it will return its default value. + mutating func clearEndpointInfo() {self._endpointInfo = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _endpointID: String? = nil + fileprivate var _endpointType: Location_Nearby_Connections_EndpointType? = nil + fileprivate var _connectivityInfoList: Data? = nil + fileprivate var _endpointInfo: Data? = nil +} + +struct Location_Nearby_Connections_PresenceDevice { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var endpointID: String { + get {return _endpointID ?? String()} + set {_endpointID = newValue} + } + /// Returns true if `endpointID` has been explicitly set. + var hasEndpointID: Bool {return self._endpointID != nil} + /// Clears the value of `endpointID`. Subsequent reads from it will return its default value. + mutating func clearEndpointID() {self._endpointID = nil} + + var endpointType: Location_Nearby_Connections_EndpointType { + get {return _endpointType ?? .unknownEndpoint} + set {_endpointType = newValue} + } + /// Returns true if `endpointType` has been explicitly set. + var hasEndpointType: Bool {return self._endpointType != nil} + /// Clears the value of `endpointType`. Subsequent reads from it will return its default value. + mutating func clearEndpointType() {self._endpointType = nil} + + /// Data Elements. + var connectivityInfoList: Data { + get {return _connectivityInfoList ?? Data()} + set {_connectivityInfoList = newValue} + } + /// Returns true if `connectivityInfoList` has been explicitly set. + var hasConnectivityInfoList: Bool {return self._connectivityInfoList != nil} + /// Clears the value of `connectivityInfoList`. Subsequent reads from it will return its default value. + mutating func clearConnectivityInfoList() {self._connectivityInfoList = nil} + + var deviceID: Int64 { + get {return _deviceID ?? 0} + set {_deviceID = newValue} + } + /// Returns true if `deviceID` has been explicitly set. + var hasDeviceID: Bool {return self._deviceID != nil} + /// Clears the value of `deviceID`. Subsequent reads from it will return its default value. + mutating func clearDeviceID() {self._deviceID = nil} + + var deviceName: String { + get {return _deviceName ?? String()} + set {_deviceName = newValue} + } + /// Returns true if `deviceName` has been explicitly set. + var hasDeviceName: Bool {return self._deviceName != nil} + /// Clears the value of `deviceName`. Subsequent reads from it will return its default value. + mutating func clearDeviceName() {self._deviceName = nil} + + var deviceType: Location_Nearby_Connections_PresenceDevice.DeviceType { + get {return _deviceType ?? .unknown} + set {_deviceType = newValue} + } + /// Returns true if `deviceType` has been explicitly set. + var hasDeviceType: Bool {return self._deviceType != nil} + /// Clears the value of `deviceType`. Subsequent reads from it will return its default value. + mutating func clearDeviceType() {self._deviceType = nil} + + var deviceImageURL: String { + get {return _deviceImageURL ?? String()} + set {_deviceImageURL = newValue} + } + /// Returns true if `deviceImageURL` has been explicitly set. + var hasDeviceImageURL: Bool {return self._deviceImageURL != nil} + /// Clears the value of `deviceImageURL`. Subsequent reads from it will return its default value. + mutating func clearDeviceImageURL() {self._deviceImageURL = nil} + + var discoveryMedium: [Location_Nearby_Connections_ConnectionRequestFrame.Medium] = [] + + var actions: [Int32] = [] + + var identityType: [Int64] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + enum DeviceType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case phone // = 1 + case tablet // = 2 + case display // = 3 + case laptop // = 4 + case tv // = 5 + case watch // = 6 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .phone + case 2: self = .tablet + case 3: self = .display + case 4: self = .laptop + case 5: self = .tv + case 6: self = .watch + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .phone: return 1 + case .tablet: return 2 + case .display: return 3 + case .laptop: return 4 + case .tv: return 5 + case .watch: return 6 + } + } + + } + + init() {} + + fileprivate var _endpointID: String? = nil + fileprivate var _endpointType: Location_Nearby_Connections_EndpointType? = nil + fileprivate var _connectivityInfoList: Data? = nil + fileprivate var _deviceID: Int64? = nil + fileprivate var _deviceName: String? = nil + fileprivate var _deviceType: Location_Nearby_Connections_PresenceDevice.DeviceType? = nil + fileprivate var _deviceImageURL: String? = nil +} + +#if swift(>=4.2) + +extension Location_Nearby_Connections_PresenceDevice.DeviceType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + #if swift(>=5.5) && canImport(_Concurrency) +extension Location_Nearby_Connections_EndpointType: @unchecked Sendable {} extension Location_Nearby_Connections_OfflineFrame: @unchecked Sendable {} extension Location_Nearby_Connections_OfflineFrame.Version: @unchecked Sendable {} extension Location_Nearby_Connections_V1Frame: @unchecked Sendable {} extension Location_Nearby_Connections_V1Frame.FrameType: @unchecked Sendable {} extension Location_Nearby_Connections_ConnectionRequestFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device: @unchecked Sendable {} extension Location_Nearby_Connections_ConnectionRequestFrame.Medium: @unchecked Sendable {} +extension Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode: @unchecked Sendable {} extension Location_Nearby_Connections_ConnectionResponseFrame: @unchecked Sendable {} extension Location_Nearby_Connections_ConnectionResponseFrame.ResponseStatus: @unchecked Sendable {} extension Location_Nearby_Connections_PayloadTransferFrame: @unchecked Sendable {} @@ -1908,28 +2922,51 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials: @unchecked Sendable {} extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials: @unchecked Sendable {} extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials: @unchecked Sendable {} +extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials: @unchecked Sendable {} +extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest: @unchecked Sendable {} +extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel: @unchecked Sendable {} extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction: @unchecked Sendable {} extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroductionAck: @unchecked Sendable {} +extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium: @unchecked Sendable {} extension Location_Nearby_Connections_KeepAliveFrame: @unchecked Sendable {} extension Location_Nearby_Connections_DisconnectionFrame: @unchecked Sendable {} extension Location_Nearby_Connections_PairedKeyEncryptionFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_AuthenticationMessageFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_AuthenticationResultFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_AutoResumeFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_AutoResumeFrame.EventType: @unchecked Sendable {} +extension Location_Nearby_Connections_AutoReconnectFrame: @unchecked Sendable {} +extension Location_Nearby_Connections_AutoReconnectFrame.EventType: @unchecked Sendable {} extension Location_Nearby_Connections_MediumMetadata: @unchecked Sendable {} extension Location_Nearby_Connections_AvailableChannels: @unchecked Sendable {} extension Location_Nearby_Connections_WifiDirectCliUsableChannels: @unchecked Sendable {} extension Location_Nearby_Connections_WifiLanUsableChannels: @unchecked Sendable {} extension Location_Nearby_Connections_WifiAwareUsableChannels: @unchecked Sendable {} extension Location_Nearby_Connections_WifiHotspotStaUsableChannels: @unchecked Sendable {} +extension Location_Nearby_Connections_MediumRole: @unchecked Sendable {} extension Location_Nearby_Connections_LocationHint: @unchecked Sendable {} extension Location_Nearby_Connections_LocationStandard: @unchecked Sendable {} extension Location_Nearby_Connections_LocationStandard.Format: @unchecked Sendable {} extension Location_Nearby_Connections_OsInfo: @unchecked Sendable {} extension Location_Nearby_Connections_OsInfo.OsType: @unchecked Sendable {} +extension Location_Nearby_Connections_ConnectionsDevice: @unchecked Sendable {} +extension Location_Nearby_Connections_PresenceDevice: @unchecked Sendable {} +extension Location_Nearby_Connections_PresenceDevice.DeviceType: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "location.nearby.connections" +extension Location_Nearby_Connections_EndpointType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_ENDPOINT"), + 1: .same(proto: "CONNECTIONS_ENDPOINT"), + 2: .same(proto: "PRESENCE_ENDPOINT"), + ] +} + extension Location_Nearby_Connections_OfflineFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".OfflineFrame" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -1990,6 +3027,11 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto 6: .standard(proto: "keep_alive"), 7: .same(proto: "disconnection"), 8: .standard(proto: "paired_key_encryption"), + 9: .standard(proto: "authentication_message"), + 10: .standard(proto: "authentication_result"), + 11: .standard(proto: "auto_resume"), + 12: .standard(proto: "auto_reconnect"), + 13: .standard(proto: "bandwidth_upgrade_retry"), ] fileprivate class _StorageClass { @@ -2001,6 +3043,11 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto var _keepAlive: Location_Nearby_Connections_KeepAliveFrame? = nil var _disconnection: Location_Nearby_Connections_DisconnectionFrame? = nil var _pairedKeyEncryption: Location_Nearby_Connections_PairedKeyEncryptionFrame? = nil + var _authenticationMessage: Location_Nearby_Connections_AuthenticationMessageFrame? = nil + var _authenticationResult: Location_Nearby_Connections_AuthenticationResultFrame? = nil + var _autoResume: Location_Nearby_Connections_AutoResumeFrame? = nil + var _autoReconnect: Location_Nearby_Connections_AutoReconnectFrame? = nil + var _bandwidthUpgradeRetry: Location_Nearby_Connections_BandwidthUpgradeRetryFrame? = nil static let defaultInstance = _StorageClass() @@ -2015,6 +3062,11 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto _keepAlive = source._keepAlive _disconnection = source._disconnection _pairedKeyEncryption = source._pairedKeyEncryption + _authenticationMessage = source._authenticationMessage + _authenticationResult = source._authenticationResult + _autoResume = source._autoResume + _autoReconnect = source._autoReconnect + _bandwidthUpgradeRetry = source._bandwidthUpgradeRetry } } @@ -2041,6 +3093,11 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto case 6: try { try decoder.decodeSingularMessageField(value: &_storage._keepAlive) }() case 7: try { try decoder.decodeSingularMessageField(value: &_storage._disconnection) }() case 8: try { try decoder.decodeSingularMessageField(value: &_storage._pairedKeyEncryption) }() + case 9: try { try decoder.decodeSingularMessageField(value: &_storage._authenticationMessage) }() + case 10: try { try decoder.decodeSingularMessageField(value: &_storage._authenticationResult) }() + case 11: try { try decoder.decodeSingularMessageField(value: &_storage._autoResume) }() + case 12: try { try decoder.decodeSingularMessageField(value: &_storage._autoReconnect) }() + case 13: try { try decoder.decodeSingularMessageField(value: &_storage._bandwidthUpgradeRetry) }() default: break } } @@ -2077,6 +3134,21 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto try { if let v = _storage._pairedKeyEncryption { try visitor.visitSingularMessageField(value: v, fieldNumber: 8) } }() + try { if let v = _storage._authenticationMessage { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } }() + try { if let v = _storage._authenticationResult { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try { if let v = _storage._autoResume { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } }() + try { if let v = _storage._autoReconnect { + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + } }() + try { if let v = _storage._bandwidthUpgradeRetry { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2094,6 +3166,11 @@ extension Location_Nearby_Connections_V1Frame: SwiftProtobuf.Message, SwiftProto if _storage._keepAlive != rhs_storage._keepAlive {return false} if _storage._disconnection != rhs_storage._disconnection {return false} if _storage._pairedKeyEncryption != rhs_storage._pairedKeyEncryption {return false} + if _storage._authenticationMessage != rhs_storage._authenticationMessage {return false} + if _storage._authenticationResult != rhs_storage._authenticationResult {return false} + if _storage._autoResume != rhs_storage._autoResume {return false} + if _storage._autoReconnect != rhs_storage._autoReconnect {return false} + if _storage._bandwidthUpgradeRetry != rhs_storage._bandwidthUpgradeRetry {return false} return true } if !storagesAreEqual {return false} @@ -2113,6 +3190,11 @@ extension Location_Nearby_Connections_V1Frame.FrameType: SwiftProtobuf._ProtoNam 5: .same(proto: "KEEP_ALIVE"), 6: .same(proto: "DISCONNECTION"), 7: .same(proto: "PAIRED_KEY_ENCRYPTION"), + 8: .same(proto: "AUTHENTICATION_MESSAGE"), + 9: .same(proto: "AUTHENTICATION_RESULT"), + 10: .same(proto: "AUTO_RESUME"), + 11: .same(proto: "AUTO_RECONNECT"), + 12: .same(proto: "BANDWIDTH_UPGRADE_RETRY"), ] } @@ -2130,6 +3212,10 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess 9: .standard(proto: "keep_alive_timeout_millis"), 10: .standard(proto: "device_type"), 11: .standard(proto: "device_info"), + 12: .standard(proto: "connections_device"), + 13: .standard(proto: "presence_device"), + 14: .standard(proto: "connection_mode"), + 15: .standard(proto: "location_hint"), ] fileprivate class _StorageClass { @@ -2144,6 +3230,9 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess var _keepAliveTimeoutMillis: Int32? = nil var _deviceType: Int32? = nil var _deviceInfo: Data? = nil + var _device: Location_Nearby_Connections_ConnectionRequestFrame.OneOf_Device? + var _connectionMode: Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode? = nil + var _locationHint: Location_Nearby_Connections_LocationHint? = nil static let defaultInstance = _StorageClass() @@ -2161,6 +3250,9 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess _keepAliveTimeoutMillis = source._keepAliveTimeoutMillis _deviceType = source._deviceType _deviceInfo = source._deviceInfo + _device = source._device + _connectionMode = source._connectionMode + _locationHint = source._locationHint } } @@ -2190,6 +3282,34 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess case 9: try { try decoder.decodeSingularInt32Field(value: &_storage._keepAliveTimeoutMillis) }() case 10: try { try decoder.decodeSingularInt32Field(value: &_storage._deviceType) }() case 11: try { try decoder.decodeSingularBytesField(value: &_storage._deviceInfo) }() + case 12: try { + var v: Location_Nearby_Connections_ConnectionsDevice? + var hadOneofValue = false + if let current = _storage._device { + hadOneofValue = true + if case .connectionsDevice(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + _storage._device = .connectionsDevice(v) + } + }() + case 13: try { + var v: Location_Nearby_Connections_PresenceDevice? + var hadOneofValue = false + if let current = _storage._device { + hadOneofValue = true + if case .presenceDevice(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + _storage._device = .presenceDevice(v) + } + }() + case 14: try { try decoder.decodeSingularEnumField(value: &_storage._connectionMode) }() + case 15: try { try decoder.decodeSingularMessageField(value: &_storage._locationHint) }() default: break } } @@ -2235,6 +3355,23 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess try { if let v = _storage._deviceInfo { try visitor.visitSingularBytesField(value: v, fieldNumber: 11) } }() + switch _storage._device { + case .connectionsDevice?: try { + guard case .connectionsDevice(let v)? = _storage._device else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + }() + case .presenceDevice?: try { + guard case .presenceDevice(let v)? = _storage._device else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + }() + case nil: break + } + try { if let v = _storage._connectionMode { + try visitor.visitSingularEnumField(value: v, fieldNumber: 14) + } }() + try { if let v = _storage._locationHint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2255,6 +3392,9 @@ extension Location_Nearby_Connections_ConnectionRequestFrame: SwiftProtobuf.Mess if _storage._keepAliveTimeoutMillis != rhs_storage._keepAliveTimeoutMillis {return false} if _storage._deviceType != rhs_storage._deviceType {return false} if _storage._deviceInfo != rhs_storage._deviceInfo {return false} + if _storage._device != rhs_storage._device {return false} + if _storage._connectionMode != rhs_storage._connectionMode {return false} + if _storage._locationHint != rhs_storage._locationHint {return false} return true } if !storagesAreEqual {return false} @@ -2278,6 +3418,15 @@ extension Location_Nearby_Connections_ConnectionRequestFrame.Medium: SwiftProtob 9: .same(proto: "WEB_RTC"), 10: .same(proto: "BLE_L2CAP"), 11: .same(proto: "USB"), + 12: .same(proto: "WEB_RTC_NON_CELLULAR"), + 13: .same(proto: "AWDL"), + ] +} + +extension Location_Nearby_Connections_ConnectionRequestFrame.ConnectionMode: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "LEGACY"), + 1: .same(proto: "INSTANT"), ] } @@ -2290,6 +3439,9 @@ extension Location_Nearby_Connections_ConnectionResponseFrame: SwiftProtobuf.Mes 4: .standard(proto: "os_info"), 5: .standard(proto: "multiplex_socket_bitmask"), 6: .standard(proto: "nearby_connections_version"), + 7: .standard(proto: "safe_to_disconnect_version"), + 8: .standard(proto: "location_hint"), + 9: .standard(proto: "keep_alive_timeout_millis"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -2304,6 +3456,9 @@ extension Location_Nearby_Connections_ConnectionResponseFrame: SwiftProtobuf.Mes case 4: try { try decoder.decodeSingularMessageField(value: &self._osInfo) }() case 5: try { try decoder.decodeSingularInt32Field(value: &self._multiplexSocketBitmask) }() case 6: try { try decoder.decodeSingularInt32Field(value: &self._nearbyConnectionsVersion) }() + case 7: try { try decoder.decodeSingularInt32Field(value: &self._safeToDisconnectVersion) }() + case 8: try { try decoder.decodeSingularMessageField(value: &self._locationHint) }() + case 9: try { try decoder.decodeSingularInt32Field(value: &self._keepAliveTimeoutMillis) }() default: break } } @@ -2332,6 +3487,15 @@ extension Location_Nearby_Connections_ConnectionResponseFrame: SwiftProtobuf.Mes try { if let v = self._nearbyConnectionsVersion { try visitor.visitSingularInt32Field(value: v, fieldNumber: 6) } }() + try { if let v = self._safeToDisconnectVersion { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 7) + } }() + try { if let v = self._locationHint { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } }() + try { if let v = self._keepAliveTimeoutMillis { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 9) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2342,6 +3506,9 @@ extension Location_Nearby_Connections_ConnectionResponseFrame: SwiftProtobuf.Mes if lhs._osInfo != rhs._osInfo {return false} if lhs._multiplexSocketBitmask != rhs._multiplexSocketBitmask {return false} if lhs._nearbyConnectionsVersion != rhs._nearbyConnectionsVersion {return false} + if lhs._safeToDisconnectVersion != rhs._safeToDisconnectVersion {return false} + if lhs._locationHint != rhs._locationHint {return false} + if lhs._keepAliveTimeoutMillis != rhs._keepAliveTimeoutMillis {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -2414,6 +3581,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PacketType: SwiftProt 0: .same(proto: "UNKNOWN_PACKET_TYPE"), 1: .same(proto: "DATA"), 2: .same(proto: "CONTROL"), + 3: .same(proto: "PAYLOAD_ACK"), ] } @@ -2426,6 +3594,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: SwiftP 4: .standard(proto: "is_sensitive"), 5: .standard(proto: "file_name"), 6: .standard(proto: "parent_folder"), + 7: .standard(proto: "last_modified_timestamp_millis"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -2440,6 +3609,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: SwiftP case 4: try { try decoder.decodeSingularBoolField(value: &self._isSensitive) }() case 5: try { try decoder.decodeSingularStringField(value: &self._fileName) }() case 6: try { try decoder.decodeSingularStringField(value: &self._parentFolder) }() + case 7: try { try decoder.decodeSingularInt64Field(value: &self._lastModifiedTimestampMillis) }() default: break } } @@ -2468,6 +3638,9 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: SwiftP try { if let v = self._parentFolder { try visitor.visitSingularStringField(value: v, fieldNumber: 6) } }() + try { if let v = self._lastModifiedTimestampMillis { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 7) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2478,6 +3651,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadHeader: SwiftP if lhs._isSensitive != rhs._isSensitive {return false} if lhs._fileName != rhs._fileName {return false} if lhs._parentFolder != rhs._parentFolder {return false} + if lhs._lastModifiedTimestampMillis != rhs._lastModifiedTimestampMillis {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -2498,6 +3672,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: SwiftPr 1: .same(proto: "flags"), 2: .same(proto: "offset"), 3: .same(proto: "body"), + 4: .same(proto: "index"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -2509,6 +3684,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: SwiftPr case 1: try { try decoder.decodeSingularInt32Field(value: &self._flags) }() case 2: try { try decoder.decodeSingularInt64Field(value: &self._offset) }() case 3: try { try decoder.decodeSingularBytesField(value: &self._body) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self._index) }() default: break } } @@ -2528,6 +3704,9 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: SwiftPr try { if let v = self._body { try visitor.visitSingularBytesField(value: v, fieldNumber: 3) } }() + try { if let v = self._index { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 4) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2535,6 +3714,7 @@ extension Location_Nearby_Connections_PayloadTransferFrame.PayloadChunk: SwiftPr if lhs._flags != rhs._flags {return false} if lhs._offset != rhs._offset {return false} if lhs._body != rhs._body {return false} + if lhs._index != rhs._index {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -2604,6 +3784,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: SwiftPro 2: .standard(proto: "upgrade_path_info"), 3: .standard(proto: "client_introduction"), 4: .standard(proto: "client_introduction_ack"), + 5: .standard(proto: "safe_to_close_prior_channel"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -2616,6 +3797,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: SwiftPro case 2: try { try decoder.decodeSingularMessageField(value: &self._upgradePathInfo) }() case 3: try { try decoder.decodeSingularMessageField(value: &self._clientIntroduction) }() case 4: try { try decoder.decodeSingularMessageField(value: &self._clientIntroductionAck) }() + case 5: try { try decoder.decodeSingularMessageField(value: &self._safeToClosePriorChannel) }() default: break } } @@ -2638,6 +3820,9 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: SwiftPro try { if let v = self._clientIntroductionAck { try visitor.visitSingularMessageField(value: v, fieldNumber: 4) } }() + try { if let v = self._safeToClosePriorChannel { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -2646,6 +3831,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame: SwiftPro if lhs._upgradePathInfo != rhs._upgradePathInfo {return false} if lhs._clientIntroduction != rhs._clientIntroduction {return false} if lhs._clientIntroductionAck != rhs._clientIntroductionAck {return false} + if lhs._safeToClosePriorChannel != rhs._safeToClosePriorChannel {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -2660,6 +3846,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.EventType 4: .same(proto: "CLIENT_INTRODUCTION"), 5: .same(proto: "UPGRADE_FAILURE"), 6: .same(proto: "CLIENT_INTRODUCTION_ACK"), + 7: .same(proto: "UPGRADE_PATH_REQUEST"), ] } @@ -2673,8 +3860,10 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa 5: .standard(proto: "wifi_aware_credentials"), 6: .standard(proto: "wifi_direct_credentials"), 8: .standard(proto: "web_rtc_credentials"), + 11: .standard(proto: "awdl_credentials"), 7: .standard(proto: "supports_disabling_encryption"), 9: .standard(proto: "supports_client_introduction_ack"), + 10: .standard(proto: "upgrade_path_request"), ] fileprivate class _StorageClass { @@ -2685,8 +3874,10 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa var _wifiAwareCredentials: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials? = nil var _wifiDirectCredentials: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials? = nil var _webRtcCredentials: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials? = nil + var _awdlCredentials: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials? = nil var _supportsDisablingEncryption: Bool? = nil var _supportsClientIntroductionAck: Bool? = nil + var _upgradePathRequest: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest? = nil static let defaultInstance = _StorageClass() @@ -2700,8 +3891,10 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa _wifiAwareCredentials = source._wifiAwareCredentials _wifiDirectCredentials = source._wifiDirectCredentials _webRtcCredentials = source._webRtcCredentials + _awdlCredentials = source._awdlCredentials _supportsDisablingEncryption = source._supportsDisablingEncryption _supportsClientIntroductionAck = source._supportsClientIntroductionAck + _upgradePathRequest = source._upgradePathRequest } } @@ -2729,6 +3922,8 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa case 7: try { try decoder.decodeSingularBoolField(value: &_storage._supportsDisablingEncryption) }() case 8: try { try decoder.decodeSingularMessageField(value: &_storage._webRtcCredentials) }() case 9: try { try decoder.decodeSingularBoolField(value: &_storage._supportsClientIntroductionAck) }() + case 10: try { try decoder.decodeSingularMessageField(value: &_storage._upgradePathRequest) }() + case 11: try { try decoder.decodeSingularMessageField(value: &_storage._awdlCredentials) }() default: break } } @@ -2768,6 +3963,12 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa try { if let v = _storage._supportsClientIntroductionAck { try visitor.visitSingularBoolField(value: v, fieldNumber: 9) } }() + try { if let v = _storage._upgradePathRequest { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try { if let v = _storage._awdlCredentials { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } }() } try unknownFields.traverse(visitor: &visitor) } @@ -2784,8 +3985,10 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa if _storage._wifiAwareCredentials != rhs_storage._wifiAwareCredentials {return false} if _storage._wifiDirectCredentials != rhs_storage._wifiDirectCredentials {return false} if _storage._webRtcCredentials != rhs_storage._webRtcCredentials {return false} + if _storage._awdlCredentials != rhs_storage._awdlCredentials {return false} if _storage._supportsDisablingEncryption != rhs_storage._supportsDisablingEncryption {return false} if _storage._supportsClientIntroductionAck != rhs_storage._supportsClientIntroductionAck {return false} + if _storage._upgradePathRequest != rhs_storage._upgradePathRequest {return false} return true } if !storagesAreEqual {return false} @@ -2808,6 +4011,8 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa 8: .same(proto: "WIFI_DIRECT"), 9: .same(proto: "WEB_RTC"), 11: .same(proto: "USB"), + 12: .same(proto: "WEB_RTC_NON_CELLULAR"), + 13: .same(proto: "AWDL"), ] } @@ -3011,6 +4216,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa 3: .same(proto: "port"), 4: .same(proto: "frequency"), 5: .same(proto: "gateway"), + 6: .standard(proto: "ip_v6_address"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -3024,6 +4230,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa case 3: try { try decoder.decodeSingularInt32Field(value: &self._port) }() case 4: try { try decoder.decodeSingularInt32Field(value: &self._frequency) }() case 5: try { try decoder.decodeSingularStringField(value: &self._gateway) }() + case 6: try { try decoder.decodeSingularBytesField(value: &self._ipV6Address) }() default: break } } @@ -3049,6 +4256,9 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa try { if let v = self._gateway { try visitor.visitSingularStringField(value: v, fieldNumber: 5) } }() + try { if let v = self._ipV6Address { + try visitor.visitSingularBytesField(value: v, fieldNumber: 6) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -3058,6 +4268,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa if lhs._port != rhs._port {return false} if lhs._frequency != rhs._frequency {return false} if lhs._gateway != rhs._gateway {return false} + if lhs._ipV6Address != rhs._ipV6Address {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3105,11 +4316,138 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePa } } +extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".AwdlCredentials" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "service_name"), + 2: .standard(proto: "service_type"), + 3: .same(proto: "password"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self._serviceName) }() + case 2: try { try decoder.decodeSingularStringField(value: &self._serviceType) }() + case 3: try { try decoder.decodeSingularStringField(value: &self._password) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._serviceName { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } }() + try { if let v = self._serviceType { + try visitor.visitSingularStringField(value: v, fieldNumber: 2) + } }() + try { if let v = self._password { + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials, rhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.AwdlCredentials) -> Bool { + if lhs._serviceName != rhs._serviceName {return false} + if lhs._serviceType != rhs._serviceType {return false} + if lhs._password != rhs._password {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.protoMessageName + ".UpgradePathRequest" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "mediums"), + 2: .standard(proto: "medium_meta_data"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedEnumField(value: &self.mediums) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._mediumMetaData) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if !self.mediums.isEmpty { + try visitor.visitPackedEnumField(value: self.mediums, fieldNumber: 1) + } + try { if let v = self._mediumMetaData { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest, rhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.UpgradePathInfo.UpgradePathRequest) -> Bool { + if lhs.mediums != rhs.mediums {return false} + if lhs._mediumMetaData != rhs._mediumMetaData {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.protoMessageName + ".SafeToClosePriorChannel" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "sta_frequency"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self._staFrequency) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._staFrequency { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel, rhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.SafeToClosePriorChannel) -> Bool { + if lhs._staFrequency != rhs._staFrequency {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.protoMessageName + ".ClientIntroduction" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "endpoint_id"), 2: .standard(proto: "supports_disabling_encryption"), + 3: .standard(proto: "last_endpoint_id"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -3120,6 +4458,7 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientInt switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self._endpointID) }() case 2: try { try decoder.decodeSingularBoolField(value: &self._supportsDisablingEncryption) }() + case 3: try { try decoder.decodeSingularStringField(value: &self._lastEndpointID) }() default: break } } @@ -3136,12 +4475,16 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientInt try { if let v = self._supportsDisablingEncryption { try visitor.visitSingularBoolField(value: v, fieldNumber: 2) } }() + try { if let v = self._lastEndpointID { + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction, rhs: Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientIntroduction) -> Bool { if lhs._endpointID != rhs._endpointID {return false} if lhs._supportsDisablingEncryption != rhs._supportsDisablingEncryption {return false} + if lhs._lastEndpointID != rhs._lastEndpointID {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3166,10 +4509,71 @@ extension Location_Nearby_Connections_BandwidthUpgradeNegotiationFrame.ClientInt } } +extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".BandwidthUpgradeRetryFrame" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "supported_medium"), + 2: .standard(proto: "is_request"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedEnumField(value: &self.supportedMedium) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self._isRequest) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + if !self.supportedMedium.isEmpty { + try visitor.visitRepeatedEnumField(value: self.supportedMedium, fieldNumber: 1) + } + try { if let v = self._isRequest { + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_BandwidthUpgradeRetryFrame, rhs: Location_Nearby_Connections_BandwidthUpgradeRetryFrame) -> Bool { + if lhs.supportedMedium != rhs.supportedMedium {return false} + if lhs._isRequest != rhs._isRequest {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_BandwidthUpgradeRetryFrame.Medium: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_MEDIUM"), + 2: .same(proto: "BLUETOOTH"), + 3: .same(proto: "WIFI_HOTSPOT"), + 4: .same(proto: "BLE"), + 5: .same(proto: "WIFI_LAN"), + 6: .same(proto: "WIFI_AWARE"), + 7: .same(proto: "NFC"), + 8: .same(proto: "WIFI_DIRECT"), + 9: .same(proto: "WEB_RTC"), + 10: .same(proto: "BLE_L2CAP"), + 11: .same(proto: "USB"), + 12: .same(proto: "WEB_RTC_NON_CELLULAR"), + 13: .same(proto: "AWDL"), + ] +} + extension Location_Nearby_Connections_KeepAliveFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".KeepAliveFrame" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "ack"), + 2: .standard(proto: "seq_num"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -3179,6 +4583,7 @@ extension Location_Nearby_Connections_KeepAliveFrame: SwiftProtobuf.Message, Swi // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularBoolField(value: &self._ack) }() + case 2: try { try decoder.decodeSingularUInt32Field(value: &self._seqNum) }() default: break } } @@ -3192,11 +4597,15 @@ extension Location_Nearby_Connections_KeepAliveFrame: SwiftProtobuf.Message, Swi try { if let v = self._ack { try visitor.visitSingularBoolField(value: v, fieldNumber: 1) } }() + try { if let v = self._seqNum { + try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2) + } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Location_Nearby_Connections_KeepAliveFrame, rhs: Location_Nearby_Connections_KeepAliveFrame) -> Bool { if lhs._ack != rhs._ack {return false} + if lhs._seqNum != rhs._seqNum {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3280,6 +4689,196 @@ extension Location_Nearby_Connections_PairedKeyEncryptionFrame: SwiftProtobuf.Me } } +extension Location_Nearby_Connections_AuthenticationMessageFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AuthenticationMessageFrame" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "auth_message"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self._authMessage) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._authMessage { + try visitor.visitSingularBytesField(value: v, fieldNumber: 1) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_AuthenticationMessageFrame, rhs: Location_Nearby_Connections_AuthenticationMessageFrame) -> Bool { + if lhs._authMessage != rhs._authMessage {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_AuthenticationResultFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AuthenticationResultFrame" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "result"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt32Field(value: &self._result) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._result { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 1) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_AuthenticationResultFrame, rhs: Location_Nearby_Connections_AuthenticationResultFrame) -> Bool { + if lhs._result != rhs._result {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_AutoResumeFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AutoResumeFrame" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "event_type"), + 2: .standard(proto: "pending_payload_id"), + 3: .standard(proto: "next_payload_chunk_index"), + 4: .same(proto: "version"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self._eventType) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self._pendingPayloadID) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self._nextPayloadChunkIndex) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self._version) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._eventType { + try visitor.visitSingularEnumField(value: v, fieldNumber: 1) + } }() + try { if let v = self._pendingPayloadID { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 2) + } }() + try { if let v = self._nextPayloadChunkIndex { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 3) + } }() + try { if let v = self._version { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 4) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_AutoResumeFrame, rhs: Location_Nearby_Connections_AutoResumeFrame) -> Bool { + if lhs._eventType != rhs._eventType {return false} + if lhs._pendingPayloadID != rhs._pendingPayloadID {return false} + if lhs._nextPayloadChunkIndex != rhs._nextPayloadChunkIndex {return false} + if lhs._version != rhs._version {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_AutoResumeFrame.EventType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_AUTO_RESUME_EVENT_TYPE"), + 1: .same(proto: "PAYLOAD_RESUME_TRANSFER_START"), + 2: .same(proto: "PAYLOAD_RESUME_TRANSFER_ACK"), + ] +} + +extension Location_Nearby_Connections_AutoReconnectFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AutoReconnectFrame" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "event_type"), + 3: .standard(proto: "last_endpoint_id"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self._endpointID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self._eventType) }() + case 3: try { try decoder.decodeSingularStringField(value: &self._lastEndpointID) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._endpointID { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } }() + try { if let v = self._eventType { + try visitor.visitSingularEnumField(value: v, fieldNumber: 2) + } }() + try { if let v = self._lastEndpointID { + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_AutoReconnectFrame, rhs: Location_Nearby_Connections_AutoReconnectFrame) -> Bool { + if lhs._endpointID != rhs._endpointID {return false} + if lhs._eventType != rhs._eventType {return false} + if lhs._lastEndpointID != rhs._lastEndpointID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_AutoReconnectFrame.EventType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_EVENT_TYPE"), + 1: .same(proto: "CLIENT_INTRODUCTION"), + 2: .same(proto: "CLIENT_INTRODUCTION_ACK"), + ] +} + extension Location_Nearby_Connections_MediumMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".MediumMetadata" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -3294,83 +4893,143 @@ extension Location_Nearby_Connections_MediumMetadata: SwiftProtobuf.Message, Swi 9: .standard(proto: "wifi_lan_usable_channels"), 10: .standard(proto: "wifi_aware_usable_channels"), 11: .standard(proto: "wifi_hotspot_sta_usable_channels"), + 12: .standard(proto: "medium_role"), ] + fileprivate class _StorageClass { + var _supports5Ghz: Bool? = nil + var _bssid: String? = nil + var _ipAddress: Data? = nil + var _supports6Ghz: Bool? = nil + var _mobileRadio: Bool? = nil + var _apFrequency: Int32? = nil + var _availableChannels: Location_Nearby_Connections_AvailableChannels? = nil + var _wifiDirectCliUsableChannels: Location_Nearby_Connections_WifiDirectCliUsableChannels? = nil + var _wifiLanUsableChannels: Location_Nearby_Connections_WifiLanUsableChannels? = nil + var _wifiAwareUsableChannels: Location_Nearby_Connections_WifiAwareUsableChannels? = nil + var _wifiHotspotStaUsableChannels: Location_Nearby_Connections_WifiHotspotStaUsableChannels? = nil + var _mediumRole: Location_Nearby_Connections_MediumRole? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _supports5Ghz = source._supports5Ghz + _bssid = source._bssid + _ipAddress = source._ipAddress + _supports6Ghz = source._supports6Ghz + _mobileRadio = source._mobileRadio + _apFrequency = source._apFrequency + _availableChannels = source._availableChannels + _wifiDirectCliUsableChannels = source._wifiDirectCliUsableChannels + _wifiLanUsableChannels = source._wifiLanUsableChannels + _wifiAwareUsableChannels = source._wifiAwareUsableChannels + _wifiHotspotStaUsableChannels = source._wifiHotspotStaUsableChannels + _mediumRole = source._mediumRole + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self._supports5Ghz) }() - case 2: try { try decoder.decodeSingularStringField(value: &self._bssid) }() - case 3: try { try decoder.decodeSingularBytesField(value: &self._ipAddress) }() - case 4: try { try decoder.decodeSingularBoolField(value: &self._supports6Ghz) }() - case 5: try { try decoder.decodeSingularBoolField(value: &self._mobileRadio) }() - case 6: try { try decoder.decodeSingularInt32Field(value: &self._apFrequency) }() - case 7: try { try decoder.decodeSingularMessageField(value: &self._availableChannels) }() - case 8: try { try decoder.decodeSingularMessageField(value: &self._wifiDirectCliUsableChannels) }() - case 9: try { try decoder.decodeSingularMessageField(value: &self._wifiLanUsableChannels) }() - case 10: try { try decoder.decodeSingularMessageField(value: &self._wifiAwareUsableChannels) }() - case 11: try { try decoder.decodeSingularMessageField(value: &self._wifiHotspotStaUsableChannels) }() - default: break + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &_storage._supports5Ghz) }() + case 2: try { try decoder.decodeSingularStringField(value: &_storage._bssid) }() + case 3: try { try decoder.decodeSingularBytesField(value: &_storage._ipAddress) }() + case 4: try { try decoder.decodeSingularBoolField(value: &_storage._supports6Ghz) }() + case 5: try { try decoder.decodeSingularBoolField(value: &_storage._mobileRadio) }() + case 6: try { try decoder.decodeSingularInt32Field(value: &_storage._apFrequency) }() + case 7: try { try decoder.decodeSingularMessageField(value: &_storage._availableChannels) }() + case 8: try { try decoder.decodeSingularMessageField(value: &_storage._wifiDirectCliUsableChannels) }() + case 9: try { try decoder.decodeSingularMessageField(value: &_storage._wifiLanUsableChannels) }() + case 10: try { try decoder.decodeSingularMessageField(value: &_storage._wifiAwareUsableChannels) }() + case 11: try { try decoder.decodeSingularMessageField(value: &_storage._wifiHotspotStaUsableChannels) }() + case 12: try { try decoder.decodeSingularMessageField(value: &_storage._mediumRole) }() + default: break + } } } } func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._supports5Ghz { - try visitor.visitSingularBoolField(value: v, fieldNumber: 1) - } }() - try { if let v = self._bssid { - try visitor.visitSingularStringField(value: v, fieldNumber: 2) - } }() - try { if let v = self._ipAddress { - try visitor.visitSingularBytesField(value: v, fieldNumber: 3) - } }() - try { if let v = self._supports6Ghz { - try visitor.visitSingularBoolField(value: v, fieldNumber: 4) - } }() - try { if let v = self._mobileRadio { - try visitor.visitSingularBoolField(value: v, fieldNumber: 5) - } }() - try { if let v = self._apFrequency { - try visitor.visitSingularInt32Field(value: v, fieldNumber: 6) - } }() - try { if let v = self._availableChannels { - try visitor.visitSingularMessageField(value: v, fieldNumber: 7) - } }() - try { if let v = self._wifiDirectCliUsableChannels { - try visitor.visitSingularMessageField(value: v, fieldNumber: 8) - } }() - try { if let v = self._wifiLanUsableChannels { - try visitor.visitSingularMessageField(value: v, fieldNumber: 9) - } }() - try { if let v = self._wifiAwareUsableChannels { - try visitor.visitSingularMessageField(value: v, fieldNumber: 10) - } }() - try { if let v = self._wifiHotspotStaUsableChannels { - try visitor.visitSingularMessageField(value: v, fieldNumber: 11) - } }() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = _storage._supports5Ghz { + try visitor.visitSingularBoolField(value: v, fieldNumber: 1) + } }() + try { if let v = _storage._bssid { + try visitor.visitSingularStringField(value: v, fieldNumber: 2) + } }() + try { if let v = _storage._ipAddress { + try visitor.visitSingularBytesField(value: v, fieldNumber: 3) + } }() + try { if let v = _storage._supports6Ghz { + try visitor.visitSingularBoolField(value: v, fieldNumber: 4) + } }() + try { if let v = _storage._mobileRadio { + try visitor.visitSingularBoolField(value: v, fieldNumber: 5) + } }() + try { if let v = _storage._apFrequency { + try visitor.visitSingularInt32Field(value: v, fieldNumber: 6) + } }() + try { if let v = _storage._availableChannels { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() + try { if let v = _storage._wifiDirectCliUsableChannels { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } }() + try { if let v = _storage._wifiLanUsableChannels { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } }() + try { if let v = _storage._wifiAwareUsableChannels { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } }() + try { if let v = _storage._wifiHotspotStaUsableChannels { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } }() + try { if let v = _storage._mediumRole { + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + } }() + } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Location_Nearby_Connections_MediumMetadata, rhs: Location_Nearby_Connections_MediumMetadata) -> Bool { - if lhs._supports5Ghz != rhs._supports5Ghz {return false} - if lhs._bssid != rhs._bssid {return false} - if lhs._ipAddress != rhs._ipAddress {return false} - if lhs._supports6Ghz != rhs._supports6Ghz {return false} - if lhs._mobileRadio != rhs._mobileRadio {return false} - if lhs._apFrequency != rhs._apFrequency {return false} - if lhs._availableChannels != rhs._availableChannels {return false} - if lhs._wifiDirectCliUsableChannels != rhs._wifiDirectCliUsableChannels {return false} - if lhs._wifiLanUsableChannels != rhs._wifiLanUsableChannels {return false} - if lhs._wifiAwareUsableChannels != rhs._wifiAwareUsableChannels {return false} - if lhs._wifiHotspotStaUsableChannels != rhs._wifiHotspotStaUsableChannels {return false} + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._supports5Ghz != rhs_storage._supports5Ghz {return false} + if _storage._bssid != rhs_storage._bssid {return false} + if _storage._ipAddress != rhs_storage._ipAddress {return false} + if _storage._supports6Ghz != rhs_storage._supports6Ghz {return false} + if _storage._mobileRadio != rhs_storage._mobileRadio {return false} + if _storage._apFrequency != rhs_storage._apFrequency {return false} + if _storage._availableChannels != rhs_storage._availableChannels {return false} + if _storage._wifiDirectCliUsableChannels != rhs_storage._wifiDirectCliUsableChannels {return false} + if _storage._wifiLanUsableChannels != rhs_storage._wifiLanUsableChannels {return false} + if _storage._wifiAwareUsableChannels != rhs_storage._wifiAwareUsableChannels {return false} + if _storage._wifiHotspotStaUsableChannels != rhs_storage._wifiHotspotStaUsableChannels {return false} + if _storage._mediumRole != rhs_storage._mediumRole {return false} + return true + } + if !storagesAreEqual {return false} + } if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -3536,6 +5195,84 @@ extension Location_Nearby_Connections_WifiHotspotStaUsableChannels: SwiftProtobu } } +extension Location_Nearby_Connections_MediumRole: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".MediumRole" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "support_wifi_direct_group_owner"), + 2: .standard(proto: "support_wifi_direct_group_client"), + 3: .standard(proto: "support_wifi_hotspot_host"), + 4: .standard(proto: "support_wifi_hotspot_client"), + 5: .standard(proto: "support_wifi_aware_publisher"), + 6: .standard(proto: "support_wifi_aware_subscriber"), + 7: .standard(proto: "support_awdl_publisher"), + 8: .standard(proto: "support_awdl_subscriber"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBoolField(value: &self._supportWifiDirectGroupOwner) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self._supportWifiDirectGroupClient) }() + case 3: try { try decoder.decodeSingularBoolField(value: &self._supportWifiHotspotHost) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self._supportWifiHotspotClient) }() + case 5: try { try decoder.decodeSingularBoolField(value: &self._supportWifiAwarePublisher) }() + case 6: try { try decoder.decodeSingularBoolField(value: &self._supportWifiAwareSubscriber) }() + case 7: try { try decoder.decodeSingularBoolField(value: &self._supportAwdlPublisher) }() + case 8: try { try decoder.decodeSingularBoolField(value: &self._supportAwdlSubscriber) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._supportWifiDirectGroupOwner { + try visitor.visitSingularBoolField(value: v, fieldNumber: 1) + } }() + try { if let v = self._supportWifiDirectGroupClient { + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + } }() + try { if let v = self._supportWifiHotspotHost { + try visitor.visitSingularBoolField(value: v, fieldNumber: 3) + } }() + try { if let v = self._supportWifiHotspotClient { + try visitor.visitSingularBoolField(value: v, fieldNumber: 4) + } }() + try { if let v = self._supportWifiAwarePublisher { + try visitor.visitSingularBoolField(value: v, fieldNumber: 5) + } }() + try { if let v = self._supportWifiAwareSubscriber { + try visitor.visitSingularBoolField(value: v, fieldNumber: 6) + } }() + try { if let v = self._supportAwdlPublisher { + try visitor.visitSingularBoolField(value: v, fieldNumber: 7) + } }() + try { if let v = self._supportAwdlSubscriber { + try visitor.visitSingularBoolField(value: v, fieldNumber: 8) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_MediumRole, rhs: Location_Nearby_Connections_MediumRole) -> Bool { + if lhs._supportWifiDirectGroupOwner != rhs._supportWifiDirectGroupOwner {return false} + if lhs._supportWifiDirectGroupClient != rhs._supportWifiDirectGroupClient {return false} + if lhs._supportWifiHotspotHost != rhs._supportWifiHotspotHost {return false} + if lhs._supportWifiHotspotClient != rhs._supportWifiHotspotClient {return false} + if lhs._supportWifiAwarePublisher != rhs._supportWifiAwarePublisher {return false} + if lhs._supportWifiAwareSubscriber != rhs._supportWifiAwareSubscriber {return false} + if lhs._supportAwdlPublisher != rhs._supportAwdlPublisher {return false} + if lhs._supportAwdlSubscriber != rhs._supportAwdlSubscriber {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Location_Nearby_Connections_LocationHint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".LocationHint" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -3651,3 +5388,159 @@ extension Location_Nearby_Connections_OsInfo.OsType: SwiftProtobuf._ProtoNamePro 100: .same(proto: "LINUX"), ] } + +extension Location_Nearby_Connections_ConnectionsDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ConnectionsDevice" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "endpoint_type"), + 3: .standard(proto: "connectivity_info_list"), + 4: .standard(proto: "endpoint_info"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self._endpointID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self._endpointType) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self._connectivityInfoList) }() + case 4: try { try decoder.decodeSingularBytesField(value: &self._endpointInfo) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._endpointID { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } }() + try { if let v = self._endpointType { + try visitor.visitSingularEnumField(value: v, fieldNumber: 2) + } }() + try { if let v = self._connectivityInfoList { + try visitor.visitSingularBytesField(value: v, fieldNumber: 3) + } }() + try { if let v = self._endpointInfo { + try visitor.visitSingularBytesField(value: v, fieldNumber: 4) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_ConnectionsDevice, rhs: Location_Nearby_Connections_ConnectionsDevice) -> Bool { + if lhs._endpointID != rhs._endpointID {return false} + if lhs._endpointType != rhs._endpointType {return false} + if lhs._connectivityInfoList != rhs._connectivityInfoList {return false} + if lhs._endpointInfo != rhs._endpointInfo {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_PresenceDevice: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PresenceDevice" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "endpoint_id"), + 2: .standard(proto: "endpoint_type"), + 3: .standard(proto: "connectivity_info_list"), + 4: .standard(proto: "device_id"), + 5: .standard(proto: "device_name"), + 6: .standard(proto: "device_type"), + 7: .standard(proto: "device_image_url"), + 8: .standard(proto: "discovery_medium"), + 9: .same(proto: "actions"), + 10: .standard(proto: "identity_type"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self._endpointID) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self._endpointType) }() + case 3: try { try decoder.decodeSingularBytesField(value: &self._connectivityInfoList) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self._deviceID) }() + case 5: try { try decoder.decodeSingularStringField(value: &self._deviceName) }() + case 6: try { try decoder.decodeSingularEnumField(value: &self._deviceType) }() + case 7: try { try decoder.decodeSingularStringField(value: &self._deviceImageURL) }() + case 8: try { try decoder.decodeRepeatedEnumField(value: &self.discoveryMedium) }() + case 9: try { try decoder.decodeRepeatedInt32Field(value: &self.actions) }() + case 10: try { try decoder.decodeRepeatedInt64Field(value: &self.identityType) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._endpointID { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } }() + try { if let v = self._endpointType { + try visitor.visitSingularEnumField(value: v, fieldNumber: 2) + } }() + try { if let v = self._connectivityInfoList { + try visitor.visitSingularBytesField(value: v, fieldNumber: 3) + } }() + try { if let v = self._deviceID { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 4) + } }() + try { if let v = self._deviceName { + try visitor.visitSingularStringField(value: v, fieldNumber: 5) + } }() + try { if let v = self._deviceType { + try visitor.visitSingularEnumField(value: v, fieldNumber: 6) + } }() + try { if let v = self._deviceImageURL { + try visitor.visitSingularStringField(value: v, fieldNumber: 7) + } }() + if !self.discoveryMedium.isEmpty { + try visitor.visitPackedEnumField(value: self.discoveryMedium, fieldNumber: 8) + } + if !self.actions.isEmpty { + try visitor.visitPackedInt32Field(value: self.actions, fieldNumber: 9) + } + if !self.identityType.isEmpty { + try visitor.visitPackedInt64Field(value: self.identityType, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Location_Nearby_Connections_PresenceDevice, rhs: Location_Nearby_Connections_PresenceDevice) -> Bool { + if lhs._endpointID != rhs._endpointID {return false} + if lhs._endpointType != rhs._endpointType {return false} + if lhs._connectivityInfoList != rhs._connectivityInfoList {return false} + if lhs._deviceID != rhs._deviceID {return false} + if lhs._deviceName != rhs._deviceName {return false} + if lhs._deviceType != rhs._deviceType {return false} + if lhs._deviceImageURL != rhs._deviceImageURL {return false} + if lhs.discoveryMedium != rhs.discoveryMedium {return false} + if lhs.actions != rhs.actions {return false} + if lhs.identityType != rhs.identityType {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Location_Nearby_Connections_PresenceDevice.DeviceType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN"), + 1: .same(proto: "PHONE"), + 2: .same(proto: "TABLET"), + 3: .same(proto: "DISPLAY"), + 4: .same(proto: "LAPTOP"), + 5: .same(proto: "TV"), + 6: .same(proto: "WATCH"), + ] +} diff --git a/NearbyShare/Model/Protobuf/sharing_enums.pb.swift b/NearbyShare/Model/Protobuf/sharing_enums.pb.swift new file mode 100644 index 0000000..3c891db --- /dev/null +++ b/NearbyShare/Model/Protobuf/sharing_enums.pb.swift @@ -0,0 +1,3468 @@ +// DO NOT EDIT. +// swift-format-ignore-file +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: sharing_enums.proto +// +// For information on using the generated types, please see the documentation: +// https://github.com/apple/swift-protobuf/ + +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that you are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// We use event based logging (an event object can be constructed and logged +/// immediately when they occur). To obtain session based information (e.g. +/// durations, counting incoming introductions), we use flowId (sender/receiver) +/// in NearbyClearcutLogger (for android, or clearcut_event_logger as the +/// equivalence for Windows) for all events (may exclude settings), and +/// session_id for a pair of events (start and end of a session). +/// Next id: 74 +enum Location_Nearby_Proto_Sharing_EventType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownEventType // = 0 + + /// When new users accept agreements (like grant permission to contacts for + /// CONTACT_ONLY visibility) and are enrolled into Nearby Sharing. This event + /// is used to count number of new users. + case acceptAgreements // = 1 + + /// User enables/disables nearby sharing from setting or tile service. + case enableNearbySharing // = 2 + + /// User sets visibility preference from setting. + case setVisibility // = 3 + + /// Describe attachments immediately when Nearby Sharing is opened by another + /// app which is used to generate/attach attachments to be shared with other + /// devices. + case describeAttachments // = 4 + + /// Start of a scanning phase at sender. + case scanForShareTargetsStart // = 5 + + /// End of the scanning phase at sender. + case scanForShareTargetsEnd // = 6 + + /// Receiver advertises itself for presence (a pseudo session). + case advertiseDevicePresenceStart // = 7 + + /// End of the advertising phase at receiver. + case advertiseDevicePresenceEnd // = 8 + + /// Sender sends a fast initialization to receiver. + case sendFastInitialization // = 9 + + /// Receiver receives the fast initialization. + case receiveFastInitialization // = 10 + + /// Sender discovers a share target. + case discoverShareTarget // = 11 + + /// Sender sends introduction (before attachments being sent). + case sendIntroduction // = 12 + + /// Receiver receives introduction. + case receiveIntroduction // = 13 + + /// Receiver responds to introduction (before attachments being sent). + /// Actions: Accept, Reject, or (for some reason) Fail. + case respondToIntroduction // = 14 + + /// Start of the sending attachments phase at sender. + case sendAttachmentsStart // = 15 + + /// End of sending attachments phase at sender. + case sendAttachmentsEnd // = 16 + + /// Start of the receiving attachments phase at receiver. + case receiveAttachmentsStart // = 17 + + /// End of receiving attachments phase at receiver. + case receiveAttachmentsEnd // = 18 + + /// Sender cancels sending attachments. + case cancelSendingAttachments // = 19 + + /// Receiver cancels receiving attachments. + case cancelReceivingAttachments // = 20 + + /// Receiver opens received attachments. + case openReceivedAttachments // = 21 + + /// User opens the setup activity. + case launchSetupActivity // = 22 + + /// User adds a contact. + case addContact // = 23 + + /// User removes a contact. + case removeContact // = 24 + + /// Local devices all Fast Share server. + case fastShareServerResponse // = 25 + + /// The start of a sending session. + case sendStart // = 26 + + /// Receiver accepts a fast initialization. + case acceptFastInitialization // = 27 + + /// Set data usage preference. + case setDataUsage // = 28 + + /// Receiver dismisses a fast initialization + case dismissFastInitialization // = 29 + + /// Cancel connection. + case cancelConnection // = 30 + + /// User starts a chimera activity (e.g. ConsentsChimeraActivity, + /// DeviceVisibilityChimeraActivity...) + case launchActivity // = 31 + + /// Receiver dismisses a privacy notification. + case dismissPrivacyNotification // = 32 + + /// Receiver taps a privacy notification. + case tapPrivacyNotification // = 33 + + /// Receiver taps a help page. + case tapHelp // = 34 + + /// Receiver taps a feedback. + case tapFeedback // = 35 + + /// Receiver adds quick settings tile. + case addQuickSettingsTile // = 36 + + /// Receiver removes quick settings tile. + case removeQuickSettingsTile // = 37 + + /// Receiver phone consent clicked. + case launchPhoneConsent // = 38 + + /// Devices show a phone consent banner in Nearby Share Settings + case displayPhoneConsent // = 54 + + /// Receiver taps quick settings tile. + case tapQuickSettingsTile // = 39 + + /// Receiver Installation of APKs status. + case installApk // = 40 + + /// Receiver verification of APKs status. + case verifyApk // = 41 + + /// User starts a consent. + case launchConsent // = 42 + + /// After receiving payloads, Nearby Share still needs to transfer the payloads + /// to correct attachment formats and move files attachments from temporary + /// directory to final destination. + case processReceivedAttachmentsEnd // = 43 + + /// Toggle Show Notification setting item in Nearby Share setting. + case toggleShowNotification // = 44 + + /// Set device name + case setDeviceName // = 45 + + /// users dropped off opt-in page. + case declineAgreements // = 46 + + /// Request setting permissions (Wifi/BT/location/airplane mode). + case requestSettingPermissions // = 47 + + /// Set up a connection with the remote device. + case establishConnection // = 48 + + /// Track device states in Nearby Share setting. + case deviceSettings // = 49 + + /// Receiver auto dismisses a fast initialization notification. + case autoDismissFastInitialization // = 50 + + /// App Crash event. + /// Used only for Windows App now. + case appCrash // = 51 + + /// Sender taps the Send button in quick settings + case tapQuickSettingsFileShare // = 52 + + /// Devices show a privacy notification + case displayPrivacyNotification // = 53 + + /// Preference usage event (e.g. load/save preferences, etc). + /// Used only for Windows App now. + case preferencesUsage // = 55 + + /// Default opt in + case defaultOptIn // = 56 + + /// The result of the setup wizard flow + case setupWizard // = 57 + + /// Sender taps a QR code + case tapQrCode // = 58 + + /// QR code link shown + case qrCodeLinkShown // = 59 + + /// Sender failed to parse endpoint id. + case parsingFailedEndpointID // = 60 + + /// The device is discovered by fast initialization + case fastInitDiscoverDevice // = 61 + + /// Send desktop notification. + case sendDesktopNotification // = 62 + + /// User sets account preference + case setAccount // = 63 + + /// Decrypt certificate failure + case decryptCertificateFailure // = 64 + + /// Show allow permission auto access UI + case showAllowPermissionAutoAccess // = 65 + + /// UI events for transferring files with desktop applications. It includes + /// event types such as DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE. + case sendDesktopTransferEvent // = 66 + + /// Show accept button on Quick Share receive UI + case waitingForAccept // = 67 + + /// High quality event setup + case highQualityMediumSetup // = 68 + + /// RPC call status + case rpcCallStatus // = 69 + + /// A QR code sharing session has started + case startQrCodeSession // = 70 + + /// A QR code URL has been opened in a web client/browser instead of in a + /// native Quick Share app. + case qrCodeOpenedInWebClient // = 71 + + /// A HaTS survey session id has been joined with Quick Share flow id. + case hatsJointEvent // = 72 + + /// Previews received. + case receivePreviews // = 73 + + init() { + self = .unknownEventType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownEventType + case 1: self = .acceptAgreements + case 2: self = .enableNearbySharing + case 3: self = .setVisibility + case 4: self = .describeAttachments + case 5: self = .scanForShareTargetsStart + case 6: self = .scanForShareTargetsEnd + case 7: self = .advertiseDevicePresenceStart + case 8: self = .advertiseDevicePresenceEnd + case 9: self = .sendFastInitialization + case 10: self = .receiveFastInitialization + case 11: self = .discoverShareTarget + case 12: self = .sendIntroduction + case 13: self = .receiveIntroduction + case 14: self = .respondToIntroduction + case 15: self = .sendAttachmentsStart + case 16: self = .sendAttachmentsEnd + case 17: self = .receiveAttachmentsStart + case 18: self = .receiveAttachmentsEnd + case 19: self = .cancelSendingAttachments + case 20: self = .cancelReceivingAttachments + case 21: self = .openReceivedAttachments + case 22: self = .launchSetupActivity + case 23: self = .addContact + case 24: self = .removeContact + case 25: self = .fastShareServerResponse + case 26: self = .sendStart + case 27: self = .acceptFastInitialization + case 28: self = .setDataUsage + case 29: self = .dismissFastInitialization + case 30: self = .cancelConnection + case 31: self = .launchActivity + case 32: self = .dismissPrivacyNotification + case 33: self = .tapPrivacyNotification + case 34: self = .tapHelp + case 35: self = .tapFeedback + case 36: self = .addQuickSettingsTile + case 37: self = .removeQuickSettingsTile + case 38: self = .launchPhoneConsent + case 39: self = .tapQuickSettingsTile + case 40: self = .installApk + case 41: self = .verifyApk + case 42: self = .launchConsent + case 43: self = .processReceivedAttachmentsEnd + case 44: self = .toggleShowNotification + case 45: self = .setDeviceName + case 46: self = .declineAgreements + case 47: self = .requestSettingPermissions + case 48: self = .establishConnection + case 49: self = .deviceSettings + case 50: self = .autoDismissFastInitialization + case 51: self = .appCrash + case 52: self = .tapQuickSettingsFileShare + case 53: self = .displayPrivacyNotification + case 54: self = .displayPhoneConsent + case 55: self = .preferencesUsage + case 56: self = .defaultOptIn + case 57: self = .setupWizard + case 58: self = .tapQrCode + case 59: self = .qrCodeLinkShown + case 60: self = .parsingFailedEndpointID + case 61: self = .fastInitDiscoverDevice + case 62: self = .sendDesktopNotification + case 63: self = .setAccount + case 64: self = .decryptCertificateFailure + case 65: self = .showAllowPermissionAutoAccess + case 66: self = .sendDesktopTransferEvent + case 67: self = .waitingForAccept + case 68: self = .highQualityMediumSetup + case 69: self = .rpcCallStatus + case 70: self = .startQrCodeSession + case 71: self = .qrCodeOpenedInWebClient + case 72: self = .hatsJointEvent + case 73: self = .receivePreviews + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownEventType: return 0 + case .acceptAgreements: return 1 + case .enableNearbySharing: return 2 + case .setVisibility: return 3 + case .describeAttachments: return 4 + case .scanForShareTargetsStart: return 5 + case .scanForShareTargetsEnd: return 6 + case .advertiseDevicePresenceStart: return 7 + case .advertiseDevicePresenceEnd: return 8 + case .sendFastInitialization: return 9 + case .receiveFastInitialization: return 10 + case .discoverShareTarget: return 11 + case .sendIntroduction: return 12 + case .receiveIntroduction: return 13 + case .respondToIntroduction: return 14 + case .sendAttachmentsStart: return 15 + case .sendAttachmentsEnd: return 16 + case .receiveAttachmentsStart: return 17 + case .receiveAttachmentsEnd: return 18 + case .cancelSendingAttachments: return 19 + case .cancelReceivingAttachments: return 20 + case .openReceivedAttachments: return 21 + case .launchSetupActivity: return 22 + case .addContact: return 23 + case .removeContact: return 24 + case .fastShareServerResponse: return 25 + case .sendStart: return 26 + case .acceptFastInitialization: return 27 + case .setDataUsage: return 28 + case .dismissFastInitialization: return 29 + case .cancelConnection: return 30 + case .launchActivity: return 31 + case .dismissPrivacyNotification: return 32 + case .tapPrivacyNotification: return 33 + case .tapHelp: return 34 + case .tapFeedback: return 35 + case .addQuickSettingsTile: return 36 + case .removeQuickSettingsTile: return 37 + case .launchPhoneConsent: return 38 + case .tapQuickSettingsTile: return 39 + case .installApk: return 40 + case .verifyApk: return 41 + case .launchConsent: return 42 + case .processReceivedAttachmentsEnd: return 43 + case .toggleShowNotification: return 44 + case .setDeviceName: return 45 + case .declineAgreements: return 46 + case .requestSettingPermissions: return 47 + case .establishConnection: return 48 + case .deviceSettings: return 49 + case .autoDismissFastInitialization: return 50 + case .appCrash: return 51 + case .tapQuickSettingsFileShare: return 52 + case .displayPrivacyNotification: return 53 + case .displayPhoneConsent: return 54 + case .preferencesUsage: return 55 + case .defaultOptIn: return 56 + case .setupWizard: return 57 + case .tapQrCode: return 58 + case .qrCodeLinkShown: return 59 + case .parsingFailedEndpointID: return 60 + case .fastInitDiscoverDevice: return 61 + case .sendDesktopNotification: return 62 + case .setAccount: return 63 + case .decryptCertificateFailure: return 64 + case .showAllowPermissionAutoAccess: return 65 + case .sendDesktopTransferEvent: return 66 + case .waitingForAccept: return 67 + case .highQualityMediumSetup: return 68 + case .rpcCallStatus: return 69 + case .startQrCodeSession: return 70 + case .qrCodeOpenedInWebClient: return 71 + case .hatsJointEvent: return 72 + case .receivePreviews: return 73 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_EventType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Event category to differentiate whether this comes from sender or receiver, +/// whether this is for communication flow, or for settings. +enum Location_Nearby_Proto_Sharing_EventCategory: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownEventCategory // = 0 + case sendingEvent // = 1 + case receivingEvent // = 2 + case settingsEvent // = 3 + case rpcEvent // = 4 + + init() { + self = .unknownEventCategory + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownEventCategory + case 1: self = .sendingEvent + case 2: self = .receivingEvent + case 3: self = .settingsEvent + case 4: self = .rpcEvent + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownEventCategory: return 0 + case .sendingEvent: return 1 + case .receivingEvent: return 2 + case .settingsEvent: return 3 + case .rpcEvent: return 4 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_EventCategory: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Status of nearby sharing. +enum Location_Nearby_Proto_Sharing_NearbySharingStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownNearbySharingStatus // = 0 + case on // = 1 + case off // = 2 + + init() { + self = .unknownNearbySharingStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownNearbySharingStatus + case 1: self = .on + case 2: self = .off + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownNearbySharingStatus: return 0 + case .on: return 1 + case .off: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_NearbySharingStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_Visibility: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownVisibility // = 0 + case contactsOnly // = 1 + case everyone // = 2 + case selectedContactsOnly // = 3 + case hidden // = 4 + case selfShare // = 5 + + init() { + self = .unknownVisibility + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownVisibility + case 1: self = .contactsOnly + case 2: self = .everyone + case 3: self = .selectedContactsOnly + case 4: self = .hidden + case 5: self = .selfShare + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownVisibility: return 0 + case .contactsOnly: return 1 + case .everyone: return 2 + case .selectedContactsOnly: return 3 + case .hidden: return 4 + case .selfShare: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_Visibility: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_DataUsage: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownDataUsage // = 0 + case online // = 1 + case wifiOnly // = 2 + case offline // = 3 + + init() { + self = .unknownDataUsage + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownDataUsage + case 1: self = .online + case 2: self = .wifiOnly + case 3: self = .offline + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownDataUsage: return 0 + case .online: return 1 + case .wifiOnly: return 2 + case .offline: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DataUsage: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The status of establishing a connection. Used by ESTABLISH_CONNECTION. +enum Location_Nearby_Proto_Sharing_EstablishConnectionStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case connectionStatusUnknown // = 0 + case connectionStatusSuccess // = 1 + case connectionStatusFailure // = 2 + case connectionStatusCancellation // = 3 + case connectionStatusMediaUnavailableAttachment // = 4 + case connectionStatusFailedPairedKeyhandshake // = 5 + case connectionStatusFailedWriteIntroduction // = 6 + case connectionStatusFailedNullConnection // = 7 + case connectionStatusFailedNoTransferUpdateCallback // = 8 + case connectionStatusLostConnectivity // = 9 + + /// TODO: b/341782941 - : Annote this status when it's confirmed by Nearby + /// Connections team. + case connectionStatusInvalidAdvertisement // = 10 + + init() { + self = .connectionStatusUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .connectionStatusUnknown + case 1: self = .connectionStatusSuccess + case 2: self = .connectionStatusFailure + case 3: self = .connectionStatusCancellation + case 4: self = .connectionStatusMediaUnavailableAttachment + case 5: self = .connectionStatusFailedPairedKeyhandshake + case 6: self = .connectionStatusFailedWriteIntroduction + case 7: self = .connectionStatusFailedNullConnection + case 8: self = .connectionStatusFailedNoTransferUpdateCallback + case 9: self = .connectionStatusLostConnectivity + case 10: self = .connectionStatusInvalidAdvertisement + default: return nil + } + } + + var rawValue: Int { + switch self { + case .connectionStatusUnknown: return 0 + case .connectionStatusSuccess: return 1 + case .connectionStatusFailure: return 2 + case .connectionStatusCancellation: return 3 + case .connectionStatusMediaUnavailableAttachment: return 4 + case .connectionStatusFailedPairedKeyhandshake: return 5 + case .connectionStatusFailedWriteIntroduction: return 6 + case .connectionStatusFailedNullConnection: return 7 + case .connectionStatusFailedNoTransferUpdateCallback: return 8 + case .connectionStatusLostConnectivity: return 9 + case .connectionStatusInvalidAdvertisement: return 10 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_EstablishConnectionStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The status of sending and receiving attachments. Used by SEND_ATTACHMENTS. +enum Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownAttachmentTransmissionStatus // = 0 + case completeAttachmentTransmissionStatus // = 1 + case canceledAttachmentTransmissionStatus // = 2 + case failedAttachmentTransmissionStatus // = 3 + case rejectedAttachment // = 4 + case timedOutAttachment // = 5 + case awaitingRemoteAcceptanceFailedAttachment // = 6 + case notEnoughSpaceAttachment // = 7 + case failedNoTransferUpdateCallback // = 8 + case mediaUnavailableAttachment // = 9 + case unsupportedAttachmentTypeAttachment // = 10 + case noAttachmentFound // = 11 + case failedNoShareTargetEndpoint // = 12 + case failedPairedKeyhandshake // = 13 + case failedNullConnection // = 14 + case failedNoPayload // = 15 + case failedWriteIntroduction // = 16 + + /// The remote response is either missing or has an unknown type. + case failedUnknownRemoteResponse // = 17 + + /// Breakdowns of FAILED_NULL_CONNECTION (Desktop side) + case failedNullConnectionInitOutgoing // = 18 + case failedNullConnectionDisconnected // = 19 + + /// Breakdowns of FAILED_NULL_CONNECTION (android side) + /// Connection failed due to Wifi is disconnected or Bluetooth setting is off + /// or user turn on airplane mode. + case failedNullConnectionLostConnectivity // = 20 + + /// Unexpected connection failure. + case failedNullConnectionFailure // = 21 + case rejectedAttachmentTransmissionStatus // = 22 + case timedOutAttachmentTransmissionStatus // = 23 + case notEnoughSpaceAttachmentTransmissionStatus // = 24 + case unsupportedAttachmentTypeAttachmentTransmissionStatus // = 25 + case failedUnknownRemoteResponseTransmissionStatus // = 26 + + /// Connection failed due to Wifi is disconnected or Bluetooth setting is off + /// or user turn on airplane mode. + case noResponseFrameConnectionClosedLostConnectivityTransmissionStatus // = 27 + + /// Unexpected connection failure due to no response frame. + case noResponseFrameConnectionClosedTransmissionStatus // = 28 + + /// Connection failed due to Wifi is disconnected or Bluetooth setting is off + /// or user turn on airplane mode. + case lostConnectivityTransmissionStatus // = 29 + + /// Connection failed due to the medium is not allowed. + case failedDisallowedMedium // = 30 + + init() { + self = .unknownAttachmentTransmissionStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownAttachmentTransmissionStatus + case 1: self = .completeAttachmentTransmissionStatus + case 2: self = .canceledAttachmentTransmissionStatus + case 3: self = .failedAttachmentTransmissionStatus + case 4: self = .rejectedAttachment + case 5: self = .timedOutAttachment + case 6: self = .awaitingRemoteAcceptanceFailedAttachment + case 7: self = .notEnoughSpaceAttachment + case 8: self = .failedNoTransferUpdateCallback + case 9: self = .mediaUnavailableAttachment + case 10: self = .unsupportedAttachmentTypeAttachment + case 11: self = .noAttachmentFound + case 12: self = .failedNoShareTargetEndpoint + case 13: self = .failedPairedKeyhandshake + case 14: self = .failedNullConnection + case 15: self = .failedNoPayload + case 16: self = .failedWriteIntroduction + case 17: self = .failedUnknownRemoteResponse + case 18: self = .failedNullConnectionInitOutgoing + case 19: self = .failedNullConnectionDisconnected + case 20: self = .failedNullConnectionLostConnectivity + case 21: self = .failedNullConnectionFailure + case 22: self = .rejectedAttachmentTransmissionStatus + case 23: self = .timedOutAttachmentTransmissionStatus + case 24: self = .notEnoughSpaceAttachmentTransmissionStatus + case 25: self = .unsupportedAttachmentTypeAttachmentTransmissionStatus + case 26: self = .failedUnknownRemoteResponseTransmissionStatus + case 27: self = .noResponseFrameConnectionClosedLostConnectivityTransmissionStatus + case 28: self = .noResponseFrameConnectionClosedTransmissionStatus + case 29: self = .lostConnectivityTransmissionStatus + case 30: self = .failedDisallowedMedium + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownAttachmentTransmissionStatus: return 0 + case .completeAttachmentTransmissionStatus: return 1 + case .canceledAttachmentTransmissionStatus: return 2 + case .failedAttachmentTransmissionStatus: return 3 + case .rejectedAttachment: return 4 + case .timedOutAttachment: return 5 + case .awaitingRemoteAcceptanceFailedAttachment: return 6 + case .notEnoughSpaceAttachment: return 7 + case .failedNoTransferUpdateCallback: return 8 + case .mediaUnavailableAttachment: return 9 + case .unsupportedAttachmentTypeAttachment: return 10 + case .noAttachmentFound: return 11 + case .failedNoShareTargetEndpoint: return 12 + case .failedPairedKeyhandshake: return 13 + case .failedNullConnection: return 14 + case .failedNoPayload: return 15 + case .failedWriteIntroduction: return 16 + case .failedUnknownRemoteResponse: return 17 + case .failedNullConnectionInitOutgoing: return 18 + case .failedNullConnectionDisconnected: return 19 + case .failedNullConnectionLostConnectivity: return 20 + case .failedNullConnectionFailure: return 21 + case .rejectedAttachmentTransmissionStatus: return 22 + case .timedOutAttachmentTransmissionStatus: return 23 + case .notEnoughSpaceAttachmentTransmissionStatus: return 24 + case .unsupportedAttachmentTypeAttachmentTransmissionStatus: return 25 + case .failedUnknownRemoteResponseTransmissionStatus: return 26 + case .noResponseFrameConnectionClosedLostConnectivityTransmissionStatus: return 27 + case .noResponseFrameConnectionClosedTransmissionStatus: return 28 + case .lostConnectivityTransmissionStatus: return 29 + case .failedDisallowedMedium: return 30 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Generic result status of NearbyConnections API calls. +enum Location_Nearby_Proto_Sharing_ConnectionLayerStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + + /// No status is available + case unknown // = 0 + + /// The operation was successful. + case success // = 1 + + /// The operation failed, without any more information. + case error // = 2 + + /// The app called an API method out of order (i.e. another method is expected + /// to be called first). + case outOfOrderApiCall // = 3 + + /// The app already has active operations (advertising, discovering, or + /// connected to other devices) with another Strategy. Stop these operations on + /// the current Strategy before trying to advertise or discover with a new + /// Strategy. + case alreadyHaveActiveStrategy // = 4 + + /// The app is already advertising; call StopAdvertising() before trying to + /// advertise again. + case alreadyAdvertising // = 5 + + /// The app is already discovering; call StopDiscovery() before trying to + /// discover again. + case alreadyDiscovering // = 6 + + /// NC is already listening for incoming connections from remote endpoints. + case alreadyListening // = 7 + + /// An attempt to read from/write to a connected remote endpoint failed. If + /// this occurs repeatedly, consider invoking DisconnectFromEndpoint(). + case endPointIoError // = 8 + + /// An attempt to interact with a remote endpoint failed because it's unknown + /// to us -- it's either an endpoint that was never discovered, or an endpoint + /// that never connected to us (both of which are indicative of bad input from + /// the client app). + case endPointUnknown // = 9 + + /// The remote endpoint rejected the connection request. + case connectionRejected // = 10 + + /// The app is already connected to the specified endpoint. Multiple + /// connections to a remote endpoint cannot be maintained simultaneously. + case alreadyConnectedToEndPoint // = 11 + + /// The remote endpoint is not connected; messages cannot be sent to it. + case notConnectedToEndPoint // = 12 + + /// There was an error trying to use the device's Bluetooth capabilities. + case bluetoothError // = 13 + + /// There was an error trying to use the device's Bluetooth Low Energy + /// capabilities. + case bleError // = 14 + + /// There was an error trying to use the device's Wi-Fi capabilities. + case wifiLanError // = 15 + + /// An attempt to interact with an in-flight Payload failed because it's + /// unknown to us. + case payloadUnknown // = 16 + + /// The connection was reset + case reset // = 17 + + /// The connection timed out + case timeout // = 18 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .success + case 2: self = .error + case 3: self = .outOfOrderApiCall + case 4: self = .alreadyHaveActiveStrategy + case 5: self = .alreadyAdvertising + case 6: self = .alreadyDiscovering + case 7: self = .alreadyListening + case 8: self = .endPointIoError + case 9: self = .endPointUnknown + case 10: self = .connectionRejected + case 11: self = .alreadyConnectedToEndPoint + case 12: self = .notConnectedToEndPoint + case 13: self = .bluetoothError + case 14: self = .bleError + case 15: self = .wifiLanError + case 16: self = .payloadUnknown + case 17: self = .reset + case 18: self = .timeout + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .success: return 1 + case .error: return 2 + case .outOfOrderApiCall: return 3 + case .alreadyHaveActiveStrategy: return 4 + case .alreadyAdvertising: return 5 + case .alreadyDiscovering: return 6 + case .alreadyListening: return 7 + case .endPointIoError: return 8 + case .endPointUnknown: return 9 + case .connectionRejected: return 10 + case .alreadyConnectedToEndPoint: return 11 + case .notConnectedToEndPoint: return 12 + case .bluetoothError: return 13 + case .bleError: return 14 + case .wifiLanError: return 15 + case .payloadUnknown: return 16 + case .reset: return 17 + case .timeout: return 18 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ConnectionLayerStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The status of processing attachments after receiver received payloads +/// successfully. +enum Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case processingStatusUnknown // = 0 + case processingStatusCompleteProcessingAttachments // = 1 + case processingStatusFailedMovingFiles // = 2 + case processingStatusFailedReceivingApk // = 3 + case processingStatusFailedReceivingText // = 4 + case processingStatusFailedReceivingWifiCredentials // = 5 + + init() { + self = .processingStatusUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .processingStatusUnknown + case 1: self = .processingStatusCompleteProcessingAttachments + case 2: self = .processingStatusFailedMovingFiles + case 3: self = .processingStatusFailedReceivingApk + case 4: self = .processingStatusFailedReceivingText + case 5: self = .processingStatusFailedReceivingWifiCredentials + default: return nil + } + } + + var rawValue: Int { + switch self { + case .processingStatusUnknown: return 0 + case .processingStatusCompleteProcessingAttachments: return 1 + case .processingStatusFailedMovingFiles: return 2 + case .processingStatusFailedReceivingApk: return 3 + case .processingStatusFailedReceivingText: return 4 + case .processingStatusFailedReceivingWifiCredentials: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The status of advertising and discovering sessions. Used by +/// SCAN_FOR_SHARE_TARGETS and ADVERTISE_DEVICE_PRESENCE. +enum Location_Nearby_Proto_Sharing_SessionStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownSessionStatus // = 0 + case succeededSessionStatus // = 1 + + /// TODO: b/341782941 - FAILED_SESSION_STATUS occurs when the status of + /// advertising or discovering sessions is not successful. It can be + /// due to STATUS_INTERNAL_ERROR, STATUS_INTERRUPTION, STATUS_CANCELLED. + /// More session statuses should be logged to determine the status. + case failedSessionStatus // = 2 + + init() { + self = .unknownSessionStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownSessionStatus + case 1: self = .succeededSessionStatus + case 2: self = .failedSessionStatus + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownSessionStatus: return 0 + case .succeededSessionStatus: return 1 + case .failedSessionStatus: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_SessionStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// User's response to introductions. +enum Location_Nearby_Proto_Sharing_ResponseToIntroduction: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownResponseToIntroduction // = 0 + case acceptIntroduction // = 1 + case rejectIntroduction // = 2 + case failIntroduction // = 3 + + init() { + self = .unknownResponseToIntroduction + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownResponseToIntroduction + case 1: self = .acceptIntroduction + case 2: self = .rejectIntroduction + case 3: self = .failIntroduction + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownResponseToIntroduction: return 0 + case .acceptIntroduction: return 1 + case .rejectIntroduction: return 2 + case .failIntroduction: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ResponseToIntroduction: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// TODO(fdi): may eventually include desktop, etc. +/// The type of a remote device. +enum Location_Nearby_Proto_Sharing_DeviceType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownDeviceType // = 0 + case phone // = 1 + case tablet // = 2 + case laptop // = 3 + case car // = 4 + case foldable // = 5 + case xr // = 6 + + init() { + self = .unknownDeviceType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownDeviceType + case 1: self = .phone + case 2: self = .tablet + case 3: self = .laptop + case 4: self = .car + case 5: self = .foldable + case 6: self = .xr + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownDeviceType: return 0 + case .phone: return 1 + case .tablet: return 2 + case .laptop: return 3 + case .car: return 4 + case .foldable: return 5 + case .xr: return 6 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DeviceType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// TODO(fdi): may eventually include windows, iOS, etc. +/// The OS type of a remote device. +enum Location_Nearby_Proto_Sharing_OSType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownOsType // = 0 + case android // = 1 + case chromeOs // = 2 + case ios // = 3 + case windows // = 4 + case macos // = 5 + + init() { + self = .unknownOsType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownOsType + case 1: self = .android + case 2: self = .chromeOs + case 3: self = .ios + case 4: self = .windows + case 5: self = .macos + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownOsType: return 0 + case .android: return 1 + case .chromeOs: return 2 + case .ios: return 3 + case .windows: return 4 + case .macos: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_OSType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Relationship of remote device to sender device. +enum Location_Nearby_Proto_Sharing_DeviceRelationship: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownDeviceRelationship // = 0 + + /// The remote device belongs to the same owner as sender device. + case isSelf // = 1 + + /// The remote device is a contact of sender. + case isContact // = 2 + + /// The remote device is a stranger. + case isStranger // = 3 + + init() { + self = .unknownDeviceRelationship + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownDeviceRelationship + case 1: self = .isSelf + case 2: self = .isContact + case 3: self = .isStranger + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownDeviceRelationship: return 0 + case .isSelf: return 1 + case .isContact: return 2 + case .isStranger: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DeviceRelationship: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The device sources of the clearcut log. +enum Location_Nearby_Proto_Sharing_LogSource: SwiftProtobuf.Enum { + typealias RawValue = Int + case unspecifiedSource // = 0 + + /// Represents the devices in Nearby labs. + case labDevices // = 1 + + /// Represents the devices tested by Nearby engs, in the long term can include + /// any devices with newest feature flags. + case internalDevices // = 2 + + /// Represents the devices testing our in-development features before they're + /// released to the greater public. + case betaTesterDevices // = 3 + + /// Represents the OEM partners (like Samsung) that we're working with to + /// verify functionality on their devices. + case oemDevices // = 4 + + /// Represents the device for debugging. + case debugDevices // = 5 + + /// Represents the device for Nearby Module Food. + case nearbyModuleFoodDevices // = 6 + + /// Represents the device for BeTo Team Food. + case betoDogfoodDevices // = 7 + + /// Represents the device for Nearby dog Food. + case nearbyDogfoodDevices // = 8 + + /// Represents the device for Nearby Team Food. + case nearbyTeamfoodDevices // = 9 + + init() { + self = .unspecifiedSource + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unspecifiedSource + case 1: self = .labDevices + case 2: self = .internalDevices + case 3: self = .betaTesterDevices + case 4: self = .oemDevices + case 5: self = .debugDevices + case 6: self = .nearbyModuleFoodDevices + case 7: self = .betoDogfoodDevices + case 8: self = .nearbyDogfoodDevices + case 9: self = .nearbyTeamfoodDevices + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unspecifiedSource: return 0 + case .labDevices: return 1 + case .internalDevices: return 2 + case .betaTesterDevices: return 3 + case .oemDevices: return 4 + case .debugDevices: return 5 + case .nearbyModuleFoodDevices: return 6 + case .betoDogfoodDevices: return 7 + case .nearbyDogfoodDevices: return 8 + case .nearbyTeamfoodDevices: return 9 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_LogSource: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The Fast Share server action name. +enum Location_Nearby_Proto_Sharing_ServerActionName: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownServerAction // = 0 + case uploadCertificates // = 1 + case downloadCertificates // = 2 + case checkReachability // = 3 + case uploadContacts // = 4 + case updateDeviceName // = 5 + case uploadSenderCertificates // = 6 + case downloadSenderCertificates // = 7 + case uploadContactsAndCertificates // = 8 + case listReachablePhoneNumbers // = 9 + case listMyDevices // = 10 + case listContactPeople // = 11 + + /// used for analytics logger to record action name. + case downloadCertificatesInfo // = 12 + + init() { + self = .unknownServerAction + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownServerAction + case 1: self = .uploadCertificates + case 2: self = .downloadCertificates + case 3: self = .checkReachability + case 4: self = .uploadContacts + case 5: self = .updateDeviceName + case 6: self = .uploadSenderCertificates + case 7: self = .downloadSenderCertificates + case 8: self = .uploadContactsAndCertificates + case 9: self = .listReachablePhoneNumbers + case 10: self = .listMyDevices + case 11: self = .listContactPeople + case 12: self = .downloadCertificatesInfo + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownServerAction: return 0 + case .uploadCertificates: return 1 + case .downloadCertificates: return 2 + case .checkReachability: return 3 + case .uploadContacts: return 4 + case .updateDeviceName: return 5 + case .uploadSenderCertificates: return 6 + case .downloadSenderCertificates: return 7 + case .uploadContactsAndCertificates: return 8 + case .listReachablePhoneNumbers: return 9 + case .listMyDevices: return 10 + case .listContactPeople: return 11 + case .downloadCertificatesInfo: return 12 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ServerActionName: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The Fast Share server response state. +enum Location_Nearby_Proto_Sharing_ServerResponseState: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownServerResponseState // = 0 + case serverResponseSuccess // = 1 + case serverResponseUnknownFailure // = 2 + + /// For StatusException. + case serverResponseStatusOtherFailure // = 3 + case serverResponseStatusDeadlineExceeded // = 4 + case serverResponseStatusPermissionDenied // = 5 + case serverResponseStatusUnavailable // = 6 + case serverResponseStatusUnauthenticated // = 7 + case serverResponseStatusInvalidArgument // = 9 + + /// For GoogleAuthException. + case serverResponseGoogleAuthFailure // = 8 + + /// For Internet connect status. + case serverResponseNotConnectedToInternet // = 10 + + init() { + self = .unknownServerResponseState + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownServerResponseState + case 1: self = .serverResponseSuccess + case 2: self = .serverResponseUnknownFailure + case 3: self = .serverResponseStatusOtherFailure + case 4: self = .serverResponseStatusDeadlineExceeded + case 5: self = .serverResponseStatusPermissionDenied + case 6: self = .serverResponseStatusUnavailable + case 7: self = .serverResponseStatusUnauthenticated + case 8: self = .serverResponseGoogleAuthFailure + case 9: self = .serverResponseStatusInvalidArgument + case 10: self = .serverResponseNotConnectedToInternet + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownServerResponseState: return 0 + case .serverResponseSuccess: return 1 + case .serverResponseUnknownFailure: return 2 + case .serverResponseStatusOtherFailure: return 3 + case .serverResponseStatusDeadlineExceeded: return 4 + case .serverResponseStatusPermissionDenied: return 5 + case .serverResponseStatusUnavailable: return 6 + case .serverResponseStatusUnauthenticated: return 7 + case .serverResponseGoogleAuthFailure: return 8 + case .serverResponseStatusInvalidArgument: return 9 + case .serverResponseNotConnectedToInternet: return 10 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ServerResponseState: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The purpose of requesting the server request. +enum Location_Nearby_Proto_Sharing_SyncPurpose: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + + /// When NearbySharingChimeraService#sync() is called. + case onDemandSync // = 1 + + /// Requested by chime notification. + case chimeNotification // = 2 + + /// For reqular daily sync. + case dailySync // = 3 + + /// Wen a device opts into Nearby Share. + case optInFirstSync // = 4 + + /// Requested when Nearby Share automatically enables a device that shares + /// a single account that has already opted in on another device. + case checkDefaultOptIn // = 5 + + /// When a device enables Nearby Share. + case nearbyShareEnabled // = 6 + + /// When a device is in fast init advertising. + case syncAtFastInit // = 7 + + /// When device start discovery. + case syncAtDiscovery // = 8 + + /// When device tries to load valid private certificate. + case syncAtLoadPrivateCertificate // = 9 + + /// When device start advertiseement. + case syncAtAdvertisement // = 10 + + /// When device contacts list changes. + case contactListChange // = 11 + + /// When showing the C11 banner in Neary Share setting. + case showC11NView // = 12 + + /// For regular check contact reachability. + case regularCheckContactReachability // = 13 + + /// When selected contacts list changes in visibility setting. + case visibilitySelectedContactChange // = 14 + + /// When switching account. + case accountChange // = 15 + + /// When regenerate certificates + case regenerateCertificates // = 16 + + /// When Device Contacts consent changes + case deviceContactsConsentChange // = 17 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .onDemandSync + case 2: self = .chimeNotification + case 3: self = .dailySync + case 4: self = .optInFirstSync + case 5: self = .checkDefaultOptIn + case 6: self = .nearbyShareEnabled + case 7: self = .syncAtFastInit + case 8: self = .syncAtDiscovery + case 9: self = .syncAtLoadPrivateCertificate + case 10: self = .syncAtAdvertisement + case 11: self = .contactListChange + case 12: self = .showC11NView + case 13: self = .regularCheckContactReachability + case 14: self = .visibilitySelectedContactChange + case 15: self = .accountChange + case 16: self = .regenerateCertificates + case 17: self = .deviceContactsConsentChange + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .onDemandSync: return 1 + case .chimeNotification: return 2 + case .dailySync: return 3 + case .optInFirstSync: return 4 + case .checkDefaultOptIn: return 5 + case .nearbyShareEnabled: return 6 + case .syncAtFastInit: return 7 + case .syncAtDiscovery: return 8 + case .syncAtLoadPrivateCertificate: return 9 + case .syncAtAdvertisement: return 10 + case .contactListChange: return 11 + case .showC11NView: return 12 + case .regularCheckContactReachability: return 13 + case .visibilitySelectedContactChange: return 14 + case .accountChange: return 15 + case .regenerateCertificates: return 16 + case .deviceContactsConsentChange: return 17 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_SyncPurpose: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The device role to trigger the server request. +enum Location_Nearby_Proto_Sharing_ClientRole: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case sender // = 1 + case receiver // = 2 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .sender + case 2: self = .receiver + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .sender: return 1 + case .receiver: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ClientRole: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The type of Nearby Sharing scanning. +enum Location_Nearby_Proto_Sharing_ScanType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownScanType // = 0 + case foregroundScan // = 1 + case foregroundRetryScan // = 2 + case directShareScan // = 3 + case backgroundScan // = 4 + + init() { + self = .unknownScanType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownScanType + case 1: self = .foregroundScan + case 2: self = .foregroundRetryScan + case 3: self = .directShareScan + case 4: self = .backgroundScan + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownScanType: return 0 + case .foregroundScan: return 1 + case .foregroundRetryScan: return 2 + case .directShareScan: return 3 + case .backgroundScan: return 4 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ScanType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The type of parsing endpoint id failed type. +enum Location_Nearby_Proto_Sharing_ParsingFailedType: SwiftProtobuf.Enum { + typealias RawValue = Int + case failedUnknownType // = 0 + + /// NULL advertisement is returned due to sender failing to parse advertisement + /// from endpointInfo byte stream from receiver advertisement. + case failedParseAdvertisement // = 1 + + /// NULL shareTarget is returned due to sender failing to create shareTarget + /// from a valid parsed advertisement stemming from issues in certificates, QR + /// code tokens or device names. + case failedConvertShareTarget // = 2 + + init() { + self = .failedUnknownType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .failedUnknownType + case 1: self = .failedParseAdvertisement + case 2: self = .failedConvertShareTarget + default: return nil + } + } + + var rawValue: Int { + switch self { + case .failedUnknownType: return 0 + case .failedParseAdvertisement: return 1 + case .failedConvertShareTarget: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ParsingFailedType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The Nearby Sharing advertising mode. +enum Location_Nearby_Proto_Sharing_AdvertisingMode: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownAdvertisingMode // = 0 + case screenOffAdvertisingMode // = 1 + case backgroundAdvertisingMode // = 2 + case midgroundAdvertisingMode // = 3 + case foregroundAdvertisingMode // = 4 + case suspendedAdvertisingMode // = 5 + + init() { + self = .unknownAdvertisingMode + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownAdvertisingMode + case 1: self = .screenOffAdvertisingMode + case 2: self = .backgroundAdvertisingMode + case 3: self = .midgroundAdvertisingMode + case 4: self = .foregroundAdvertisingMode + case 5: self = .suspendedAdvertisingMode + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownAdvertisingMode: return 0 + case .screenOffAdvertisingMode: return 1 + case .backgroundAdvertisingMode: return 2 + case .midgroundAdvertisingMode: return 3 + case .foregroundAdvertisingMode: return 4 + case .suspendedAdvertisingMode: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_AdvertisingMode: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The Nearby Sharing discovery mode. +enum Location_Nearby_Proto_Sharing_DiscoveryMode: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownDiscoveryMode // = 0 + case screenOffDiscoveryMode // = 1 + case backgroundDiscoveryMode // = 2 + case midgroundDiscoveryMode // = 3 + case foregroundDiscoveryMode // = 4 + case suspendedDiscoveryMode // = 5 + + init() { + self = .unknownDiscoveryMode + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownDiscoveryMode + case 1: self = .screenOffDiscoveryMode + case 2: self = .backgroundDiscoveryMode + case 3: self = .midgroundDiscoveryMode + case 4: self = .foregroundDiscoveryMode + case 5: self = .suspendedDiscoveryMode + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownDiscoveryMode: return 0 + case .screenOffDiscoveryMode: return 1 + case .backgroundDiscoveryMode: return 2 + case .midgroundDiscoveryMode: return 3 + case .foregroundDiscoveryMode: return 4 + case .suspendedDiscoveryMode: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DiscoveryMode: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The class name of chimera activity. +enum Location_Nearby_Proto_Sharing_ActivityName: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownActivity // = 0 + case shareSheetActivity // = 1 + case settingsActivity // = 2 + case receiveSurfaceActivity // = 3 + case setupActivity // = 4 + case deviceVisibilityActivity // = 5 + case consentsActivity // = 6 + case setDeviceNameDialog // = 7 + case setDataUsageDialog // = 8 + case quickSettingsActivity // = 9 + case remoteCopyShareSheetActivity // = 10 + case setupWizardActivity // = 11 + case settingsReviewActivity // = 12 + + init() { + self = .unknownActivity + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownActivity + case 1: self = .shareSheetActivity + case 2: self = .settingsActivity + case 3: self = .receiveSurfaceActivity + case 4: self = .setupActivity + case 5: self = .deviceVisibilityActivity + case 6: self = .consentsActivity + case 7: self = .setDeviceNameDialog + case 8: self = .setDataUsageDialog + case 9: self = .quickSettingsActivity + case 10: self = .remoteCopyShareSheetActivity + case 11: self = .setupWizardActivity + case 12: self = .settingsReviewActivity + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownActivity: return 0 + case .shareSheetActivity: return 1 + case .settingsActivity: return 2 + case .receiveSurfaceActivity: return 3 + case .setupActivity: return 4 + case .deviceVisibilityActivity: return 5 + case .consentsActivity: return 6 + case .setDeviceNameDialog: return 7 + case .setDataUsageDialog: return 8 + case .quickSettingsActivity: return 9 + case .remoteCopyShareSheetActivity: return 10 + case .setupWizardActivity: return 11 + case .settingsReviewActivity: return 12 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ActivityName: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The type of consent page user launches. +enum Location_Nearby_Proto_Sharing_ConsentType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + + /// launch Constellation consent page. + case c11N // = 1 + + /// launch device contact consent page. + case deviceContact // = 2 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .c11N + case 2: self = .deviceContact + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .c11N: return 1 + case .deviceContact: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ConsentType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case consentUnknownAcceptStatus // = 0 + case consentAccepted // = 1 + case consentDeclined // = 2 + + /// unable to enable consent. + case consentUnableToEnable // = 3 + + init() { + self = .consentUnknownAcceptStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .consentUnknownAcceptStatus + case 1: self = .consentAccepted + case 2: self = .consentDeclined + case 3: self = .consentUnableToEnable + default: return nil + } + } + + var rawValue: Int { + switch self { + case .consentUnknownAcceptStatus: return 0 + case .consentAccepted: return 1 + case .consentDeclined: return 2 + case .consentUnableToEnable: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_ApkSource: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownApkSource // = 0 + case apkFromSdCard // = 1 + case installedApp // = 2 + + init() { + self = .unknownApkSource + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownApkSource + case 1: self = .apkFromSdCard + case 2: self = .installedApp + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownApkSource: return 0 + case .apkFromSdCard: return 1 + case .installedApp: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ApkSource: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The Installation status of APK. +enum Location_Nearby_Proto_Sharing_InstallAPKStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownInstallApkStatus // = 0 + case failInstallation // = 1 + case successInstallation // = 2 + + init() { + self = .unknownInstallApkStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownInstallApkStatus + case 1: self = .failInstallation + case 2: self = .successInstallation + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownInstallApkStatus: return 0 + case .failInstallation: return 1 + case .successInstallation: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_InstallAPKStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The verification status of APK. +enum Location_Nearby_Proto_Sharing_VerifyAPKStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownVerifyApkStatus // = 0 + case notInstallable // = 1 + case installable // = 2 + case alreadyInstalled // = 3 + + init() { + self = .unknownVerifyApkStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownVerifyApkStatus + case 1: self = .notInstallable + case 2: self = .installable + case 3: self = .alreadyInstalled + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownVerifyApkStatus: return 0 + case .notInstallable: return 1 + case .installable: return 2 + case .alreadyInstalled: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_VerifyAPKStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_ShowNotificationStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknownShowNotificationStatus // = 0 + case show // = 1 + case notShow // = 2 + + init() { + self = .unknownShowNotificationStatus + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknownShowNotificationStatus + case 1: self = .show + case 2: self = .notShow + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknownShowNotificationStatus: return 0 + case .show: return 1 + case .notShow: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ShowNotificationStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_PermissionRequestResult: SwiftProtobuf.Enum { + typealias RawValue = Int + case permissionUnknownRequestResult // = 0 + case permissionGranted // = 1 + case permissionRejected // = 2 + case permissionUnableToGrant // = 3 + + init() { + self = .permissionUnknownRequestResult + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .permissionUnknownRequestResult + case 1: self = .permissionGranted + case 2: self = .permissionRejected + case 3: self = .permissionUnableToGrant + default: return nil + } + } + + var rawValue: Int { + switch self { + case .permissionUnknownRequestResult: return 0 + case .permissionGranted: return 1 + case .permissionRejected: return 2 + case .permissionUnableToGrant: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_PermissionRequestResult: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_PermissionRequestType: SwiftProtobuf.Enum { + typealias RawValue = Int + case permissionUnknownType // = 0 + case permissionAirplaneModeOff // = 1 + case permissionWifi // = 2 + case permissionBluetooth // = 3 + case permissionLocation // = 4 + case permissionWifiHotspot // = 5 + + init() { + self = .permissionUnknownType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .permissionUnknownType + case 1: self = .permissionAirplaneModeOff + case 2: self = .permissionWifi + case 3: self = .permissionBluetooth + case 4: self = .permissionLocation + case 5: self = .permissionWifiHotspot + default: return nil + } + } + + var rawValue: Int { + switch self { + case .permissionUnknownType: return 0 + case .permissionAirplaneModeOff: return 1 + case .permissionWifi: return 2 + case .permissionBluetooth: return 3 + case .permissionLocation: return 4 + case .permissionWifiHotspot: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_PermissionRequestType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_SharingUseCase: SwiftProtobuf.Enum { + typealias RawValue = Int + case useCaseUnknown // = 0 + case useCaseNearbyShare // = 1 + case useCaseRemoteCopyPaste // = 2 + case useCaseWifiCredential // = 3 + case useCaseAppShare // = 4 + case useCaseQuickSettingFileShare // = 5 + case useCaseSetupWizard // = 6 + + /// Deprecated. QR code is an addition to existing use cases rather than being + /// a separate use case. + case useCaseNearbyShareWithQrCode // = 7 + + /// The user was redirected from Bluetooth sharing UI to Nearby Share + case useCaseRedirectedFromBluetoothShare // = 8 + + init() { + self = .useCaseUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .useCaseUnknown + case 1: self = .useCaseNearbyShare + case 2: self = .useCaseRemoteCopyPaste + case 3: self = .useCaseWifiCredential + case 4: self = .useCaseAppShare + case 5: self = .useCaseQuickSettingFileShare + case 6: self = .useCaseSetupWizard + case 7: self = .useCaseNearbyShareWithQrCode + case 8: self = .useCaseRedirectedFromBluetoothShare + default: return nil + } + } + + var rawValue: Int { + switch self { + case .useCaseUnknown: return 0 + case .useCaseNearbyShare: return 1 + case .useCaseRemoteCopyPaste: return 2 + case .useCaseWifiCredential: return 3 + case .useCaseAppShare: return 4 + case .useCaseQuickSettingFileShare: return 5 + case .useCaseSetupWizard: return 6 + case .useCaseNearbyShareWithQrCode: return 7 + case .useCaseRedirectedFromBluetoothShare: return 8 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_SharingUseCase: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Used only for Windows App now. +enum Location_Nearby_Proto_Sharing_AppCrashReason: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_AppCrashReason: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Thes source where the attachemnt comes from. It can be an action, app name, +/// etc. The first 6 source types are being used as FileSenderType in Nearby +/// Share Windows app. +enum Location_Nearby_Proto_Sharing_AttachmentSourceType: SwiftProtobuf.Enum { + typealias RawValue = Int + case attachmentSourceUnknown // = 0 + case attachmentSourceContextMenu // = 1 + case attachmentSourceDragAndDrop // = 2 + case attachmentSourceSelectFilesButton // = 3 + case attachmentSourcePaste // = 4 + case attachmentSourceSelectFoldersButton // = 5 + case attachmentSourceShareActivation // = 6 + + init() { + self = .attachmentSourceUnknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .attachmentSourceUnknown + case 1: self = .attachmentSourceContextMenu + case 2: self = .attachmentSourceDragAndDrop + case 3: self = .attachmentSourceSelectFilesButton + case 4: self = .attachmentSourcePaste + case 5: self = .attachmentSourceSelectFoldersButton + case 6: self = .attachmentSourceShareActivation + default: return nil + } + } + + var rawValue: Int { + switch self { + case .attachmentSourceUnknown: return 0 + case .attachmentSourceContextMenu: return 1 + case .attachmentSourceDragAndDrop: return 2 + case .attachmentSourceSelectFilesButton: return 3 + case .attachmentSourcePaste: return 4 + case .attachmentSourceSelectFoldersButton: return 5 + case .attachmentSourceShareActivation: return 6 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_AttachmentSourceType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The action to interact with preferences. +/// Used only for Windows App now. +enum Location_Nearby_Proto_Sharing_PreferencesAction: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case noAction // = 1 + + /// Primary actions/functions towards preferences + case loadPreferences // = 2 + case savePreferencess // = 3 + case attemptLoad // = 4 + case restoreFromBackup // = 5 + + /// Other actions within the 4 actions above + case createPreferencesPath // = 6 + case makePreferencesBackupFile // = 7 + case checkIfPreferencesPathExists // = 8 + case checkIfPreferencesInputStreamStatus // = 9 + case checkIfPreferencesFileIsCorrupted // = 10 + case checkIfPreferencesBackupFileExists // = 11 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .noAction + case 2: self = .loadPreferences + case 3: self = .savePreferencess + case 4: self = .attemptLoad + case 5: self = .restoreFromBackup + case 6: self = .createPreferencesPath + case 7: self = .makePreferencesBackupFile + case 8: self = .checkIfPreferencesPathExists + case 9: self = .checkIfPreferencesInputStreamStatus + case 10: self = .checkIfPreferencesFileIsCorrupted + case 11: self = .checkIfPreferencesBackupFileExists + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .noAction: return 1 + case .loadPreferences: return 2 + case .savePreferencess: return 3 + case .attemptLoad: return 4 + case .restoreFromBackup: return 5 + case .createPreferencesPath: return 6 + case .makePreferencesBackupFile: return 7 + case .checkIfPreferencesPathExists: return 8 + case .checkIfPreferencesInputStreamStatus: return 9 + case .checkIfPreferencesFileIsCorrupted: return 10 + case .checkIfPreferencesBackupFileExists: return 11 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_PreferencesAction: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// The status of the action to interact with preferences. +/// Used only for Windows App now. +enum Location_Nearby_Proto_Sharing_PreferencesActionStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case success // = 1 + case fail // = 2 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .success + case 2: self = .fail + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .success: return 1 + case .fail: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_PreferencesActionStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +///* The distance of the found nearby fast init advertisement. +enum Location_Nearby_Proto_Sharing_FastInitState: SwiftProtobuf.Enum { + typealias RawValue = Int + case fastInitUnknownState // = 0 + + /// A device was found in close proximity. + /// distance < fast_init_distance_close_centimeters(50 cm) + case fastInitCloseState // = 1 + + /// A device was found in far proximity. + /// distance < fast_init_distance_close_centimeters(10 m) + case fastInitFarState // = 2 + + /// No devices have been found nearby. The default state. + case fastInitLostState // = 3 + + init() { + self = .fastInitUnknownState + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .fastInitUnknownState + case 1: self = .fastInitCloseState + case 2: self = .fastInitFarState + case 3: self = .fastInitLostState + default: return nil + } + } + + var rawValue: Int { + switch self { + case .fastInitUnknownState: return 0 + case .fastInitCloseState: return 1 + case .fastInitFarState: return 2 + case .fastInitLostState: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_FastInitState: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +///* The type of FastInit advertisement. +enum Location_Nearby_Proto_Sharing_FastInitType: SwiftProtobuf.Enum { + typealias RawValue = Int + case fastInitUnknownType // = 0 + + /// Show HUN to notify the user. + case fastInitNotifyType // = 1 + + /// Not notify the user. + case fastInitSilentType // = 2 + + init() { + self = .fastInitUnknownType + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .fastInitUnknownType + case 1: self = .fastInitNotifyType + case 2: self = .fastInitSilentType + default: return nil + } + } + + var rawValue: Int { + switch self { + case .fastInitUnknownType: return 0 + case .fastInitNotifyType: return 1 + case .fastInitSilentType: return 2 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_FastInitType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +///* The type of desktop notification event. +enum Location_Nearby_Proto_Sharing_DesktopNotification: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case connecting // = 1 + case progress // = 2 + case accept // = 3 + case received // = 4 + case error // = 5 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .connecting + case 2: self = .progress + case 3: self = .accept + case 4: self = .received + case 5: self = .error + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .connecting: return 1 + case .progress: return 2 + case .accept: return 3 + case .received: return 4 + case .error: return 5 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DesktopNotification: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_DesktopTransferEventType: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + + /// Receive attachments. + case desktopTransferEventReceiveTypeAccept // = 1 + case desktopTransferEventReceiveTypeProgress // = 2 + case desktopTransferEventReceiveTypeReceived // = 3 + case desktopTransferEventReceiveTypeError // = 4 + + /// Send attachments. + case desktopTransferEventSendTypeStart // = 5 + case desktopTransferEventSendTypeSelectADevice // = 6 + case desktopTransferEventSendTypeProgress // = 7 + case desktopTransferEventSendTypeSent // = 8 + case desktopTransferEventSendTypeError // = 9 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .desktopTransferEventReceiveTypeAccept + case 2: self = .desktopTransferEventReceiveTypeProgress + case 3: self = .desktopTransferEventReceiveTypeReceived + case 4: self = .desktopTransferEventReceiveTypeError + case 5: self = .desktopTransferEventSendTypeStart + case 6: self = .desktopTransferEventSendTypeSelectADevice + case 7: self = .desktopTransferEventSendTypeProgress + case 8: self = .desktopTransferEventSendTypeSent + case 9: self = .desktopTransferEventSendTypeError + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .desktopTransferEventReceiveTypeAccept: return 1 + case .desktopTransferEventReceiveTypeProgress: return 2 + case .desktopTransferEventReceiveTypeReceived: return 3 + case .desktopTransferEventReceiveTypeError: return 4 + case .desktopTransferEventSendTypeStart: return 5 + case .desktopTransferEventSendTypeSelectADevice: return 6 + case .desktopTransferEventSendTypeProgress: return 7 + case .desktopTransferEventSendTypeSent: return 8 + case .desktopTransferEventSendTypeError: return 9 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DesktopTransferEventType: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case decryptCertUnknownFailure // = 0 + case decryptCertNoSuchAlgorithmFailure // = 1 + case decryptCertNoSuchPaddingFailure // = 2 + case decryptCertInvalidKeyFailure // = 3 + case decryptCertInvalidAlgorithmParameterFailure // = 4 + case decryptCertIllegalBlockSizeFailure // = 5 + case decryptCertBadPaddingFailure // = 6 + + init() { + self = .decryptCertUnknownFailure + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .decryptCertUnknownFailure + case 1: self = .decryptCertNoSuchAlgorithmFailure + case 2: self = .decryptCertNoSuchPaddingFailure + case 3: self = .decryptCertInvalidKeyFailure + case 4: self = .decryptCertInvalidAlgorithmParameterFailure + case 5: self = .decryptCertIllegalBlockSizeFailure + case 6: self = .decryptCertBadPaddingFailure + default: return nil + } + } + + var rawValue: Int { + switch self { + case .decryptCertUnknownFailure: return 0 + case .decryptCertNoSuchAlgorithmFailure: return 1 + case .decryptCertNoSuchPaddingFailure: return 2 + case .decryptCertInvalidKeyFailure: return 3 + case .decryptCertInvalidAlgorithmParameterFailure: return 4 + case .decryptCertIllegalBlockSizeFailure: return 5 + case .decryptCertBadPaddingFailure: return 6 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Refer to go/qs-contacts-consent-2024 for the detail. +enum Location_Nearby_Proto_Sharing_ContactAccess: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case noContactUploaded // = 1 + case onlyUploadGoogleContact // = 2 + case uploadContactForDeviceContactConsent // = 3 + case uploadContactForQuickShareConsent // = 4 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .noContactUploaded + case 2: self = .onlyUploadGoogleContact + case 3: self = .uploadContactForDeviceContactConsent + case 4: self = .uploadContactForQuickShareConsent + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .noContactUploaded: return 1 + case .onlyUploadGoogleContact: return 2 + case .uploadContactForDeviceContactConsent: return 3 + case .uploadContactForQuickShareConsent: return 4 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ContactAccess: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// Refer to go/qs-contacts-consent-2024 for the detail. +enum Location_Nearby_Proto_Sharing_IdentityVerification: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case noPhoneNumberVerified // = 1 + case phoneNumberVerifiedNotLinkedToGaia // = 2 + case phoneNumberVerifiedLinkedToQsGaia // = 3 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .noPhoneNumberVerified + case 2: self = .phoneNumberVerifiedNotLinkedToGaia + case 3: self = .phoneNumberVerifiedLinkedToQsGaia + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .noPhoneNumberVerified: return 1 + case .phoneNumberVerifiedNotLinkedToGaia: return 2 + case .phoneNumberVerifiedLinkedToQsGaia: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_IdentityVerification: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +enum Location_Nearby_Proto_Sharing_ButtonStatus: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case clickAccept // = 1 + case clickReject // = 2 + case ignore // = 3 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .clickAccept + case 2: self = .clickReject + case 3: self = .ignore + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .clickAccept: return 1 + case .clickReject: return 2 + case .ignore: return 3 + } + } + +} + +#if swift(>=4.2) + +extension Location_Nearby_Proto_Sharing_ButtonStatus: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +#if swift(>=5.5) && canImport(_Concurrency) +extension Location_Nearby_Proto_Sharing_EventType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_EventCategory: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_NearbySharingStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_Visibility: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DataUsage: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_EstablishConnectionStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ConnectionLayerStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_SessionStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ResponseToIntroduction: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DeviceType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_OSType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DeviceRelationship: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_LogSource: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ServerActionName: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ServerResponseState: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_SyncPurpose: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ClientRole: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ScanType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ParsingFailedType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_AdvertisingMode: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DiscoveryMode: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ActivityName: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ConsentType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ApkSource: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_InstallAPKStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_VerifyAPKStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ShowNotificationStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_PermissionRequestResult: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_PermissionRequestType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_SharingUseCase: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_AppCrashReason: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_AttachmentSourceType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_PreferencesAction: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_PreferencesActionStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_FastInitState: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_FastInitType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DesktopNotification: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DesktopTransferEventType: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ContactAccess: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_IdentityVerification: @unchecked Sendable {} +extension Location_Nearby_Proto_Sharing_ButtonStatus: @unchecked Sendable {} +#endif // swift(>=5.5) && canImport(_Concurrency) + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +extension Location_Nearby_Proto_Sharing_EventType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_EVENT_TYPE"), + 1: .same(proto: "ACCEPT_AGREEMENTS"), + 2: .same(proto: "ENABLE_NEARBY_SHARING"), + 3: .same(proto: "SET_VISIBILITY"), + 4: .same(proto: "DESCRIBE_ATTACHMENTS"), + 5: .same(proto: "SCAN_FOR_SHARE_TARGETS_START"), + 6: .same(proto: "SCAN_FOR_SHARE_TARGETS_END"), + 7: .same(proto: "ADVERTISE_DEVICE_PRESENCE_START"), + 8: .same(proto: "ADVERTISE_DEVICE_PRESENCE_END"), + 9: .same(proto: "SEND_FAST_INITIALIZATION"), + 10: .same(proto: "RECEIVE_FAST_INITIALIZATION"), + 11: .same(proto: "DISCOVER_SHARE_TARGET"), + 12: .same(proto: "SEND_INTRODUCTION"), + 13: .same(proto: "RECEIVE_INTRODUCTION"), + 14: .same(proto: "RESPOND_TO_INTRODUCTION"), + 15: .same(proto: "SEND_ATTACHMENTS_START"), + 16: .same(proto: "SEND_ATTACHMENTS_END"), + 17: .same(proto: "RECEIVE_ATTACHMENTS_START"), + 18: .same(proto: "RECEIVE_ATTACHMENTS_END"), + 19: .same(proto: "CANCEL_SENDING_ATTACHMENTS"), + 20: .same(proto: "CANCEL_RECEIVING_ATTACHMENTS"), + 21: .same(proto: "OPEN_RECEIVED_ATTACHMENTS"), + 22: .same(proto: "LAUNCH_SETUP_ACTIVITY"), + 23: .same(proto: "ADD_CONTACT"), + 24: .same(proto: "REMOVE_CONTACT"), + 25: .same(proto: "FAST_SHARE_SERVER_RESPONSE"), + 26: .same(proto: "SEND_START"), + 27: .same(proto: "ACCEPT_FAST_INITIALIZATION"), + 28: .same(proto: "SET_DATA_USAGE"), + 29: .same(proto: "DISMISS_FAST_INITIALIZATION"), + 30: .same(proto: "CANCEL_CONNECTION"), + 31: .same(proto: "LAUNCH_ACTIVITY"), + 32: .same(proto: "DISMISS_PRIVACY_NOTIFICATION"), + 33: .same(proto: "TAP_PRIVACY_NOTIFICATION"), + 34: .same(proto: "TAP_HELP"), + 35: .same(proto: "TAP_FEEDBACK"), + 36: .same(proto: "ADD_QUICK_SETTINGS_TILE"), + 37: .same(proto: "REMOVE_QUICK_SETTINGS_TILE"), + 38: .same(proto: "LAUNCH_PHONE_CONSENT"), + 39: .same(proto: "TAP_QUICK_SETTINGS_TILE"), + 40: .same(proto: "INSTALL_APK"), + 41: .same(proto: "VERIFY_APK"), + 42: .same(proto: "LAUNCH_CONSENT"), + 43: .same(proto: "PROCESS_RECEIVED_ATTACHMENTS_END"), + 44: .same(proto: "TOGGLE_SHOW_NOTIFICATION"), + 45: .same(proto: "SET_DEVICE_NAME"), + 46: .same(proto: "DECLINE_AGREEMENTS"), + 47: .same(proto: "REQUEST_SETTING_PERMISSIONS"), + 48: .same(proto: "ESTABLISH_CONNECTION"), + 49: .same(proto: "DEVICE_SETTINGS"), + 50: .same(proto: "AUTO_DISMISS_FAST_INITIALIZATION"), + 51: .same(proto: "APP_CRASH"), + 52: .same(proto: "TAP_QUICK_SETTINGS_FILE_SHARE"), + 53: .same(proto: "DISPLAY_PRIVACY_NOTIFICATION"), + 54: .same(proto: "DISPLAY_PHONE_CONSENT"), + 55: .same(proto: "PREFERENCES_USAGE"), + 56: .same(proto: "DEFAULT_OPT_IN"), + 57: .same(proto: "SETUP_WIZARD"), + 58: .same(proto: "TAP_QR_CODE"), + 59: .same(proto: "QR_CODE_LINK_SHOWN"), + 60: .same(proto: "PARSING_FAILED_ENDPOINT_ID"), + 61: .same(proto: "FAST_INIT_DISCOVER_DEVICE"), + 62: .same(proto: "SEND_DESKTOP_NOTIFICATION"), + 63: .same(proto: "SET_ACCOUNT"), + 64: .same(proto: "DECRYPT_CERTIFICATE_FAILURE"), + 65: .same(proto: "SHOW_ALLOW_PERMISSION_AUTO_ACCESS"), + 66: .same(proto: "SEND_DESKTOP_TRANSFER_EVENT"), + 67: .same(proto: "WAITING_FOR_ACCEPT"), + 68: .same(proto: "HIGH_QUALITY_MEDIUM_SETUP"), + 69: .same(proto: "RPC_CALL_STATUS"), + 70: .same(proto: "START_QR_CODE_SESSION"), + 71: .same(proto: "QR_CODE_OPENED_IN_WEB_CLIENT"), + 72: .same(proto: "HATS_JOINT_EVENT"), + 73: .same(proto: "RECEIVE_PREVIEWS"), + ] +} + +extension Location_Nearby_Proto_Sharing_EventCategory: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_EVENT_CATEGORY"), + 1: .same(proto: "SENDING_EVENT"), + 2: .same(proto: "RECEIVING_EVENT"), + 3: .same(proto: "SETTINGS_EVENT"), + 4: .same(proto: "RPC_EVENT"), + ] +} + +extension Location_Nearby_Proto_Sharing_NearbySharingStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_NEARBY_SHARING_STATUS"), + 1: .same(proto: "ON"), + 2: .same(proto: "OFF"), + ] +} + +extension Location_Nearby_Proto_Sharing_Visibility: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_VISIBILITY"), + 1: .same(proto: "CONTACTS_ONLY"), + 2: .same(proto: "EVERYONE"), + 3: .same(proto: "SELECTED_CONTACTS_ONLY"), + 4: .same(proto: "HIDDEN"), + 5: .same(proto: "SELF_SHARE"), + ] +} + +extension Location_Nearby_Proto_Sharing_DataUsage: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_DATA_USAGE"), + 1: .same(proto: "ONLINE"), + 2: .same(proto: "WIFI_ONLY"), + 3: .same(proto: "OFFLINE"), + ] +} + +extension Location_Nearby_Proto_Sharing_EstablishConnectionStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "CONNECTION_STATUS_UNKNOWN"), + 1: .same(proto: "CONNECTION_STATUS_SUCCESS"), + 2: .same(proto: "CONNECTION_STATUS_FAILURE"), + 3: .same(proto: "CONNECTION_STATUS_CANCELLATION"), + 4: .same(proto: "CONNECTION_STATUS_MEDIA_UNAVAILABLE_ATTACHMENT"), + 5: .same(proto: "CONNECTION_STATUS_FAILED_PAIRED_KEYHANDSHAKE"), + 6: .same(proto: "CONNECTION_STATUS_FAILED_WRITE_INTRODUCTION"), + 7: .same(proto: "CONNECTION_STATUS_FAILED_NULL_CONNECTION"), + 8: .same(proto: "CONNECTION_STATUS_FAILED_NO_TRANSFER_UPDATE_CALLBACK"), + 9: .same(proto: "CONNECTION_STATUS_LOST_CONNECTIVITY"), + 10: .same(proto: "CONNECTION_STATUS_INVALID_ADVERTISEMENT"), + ] +} + +extension Location_Nearby_Proto_Sharing_AttachmentTransmissionStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS"), + 1: .same(proto: "COMPLETE_ATTACHMENT_TRANSMISSION_STATUS"), + 2: .same(proto: "CANCELED_ATTACHMENT_TRANSMISSION_STATUS"), + 3: .same(proto: "FAILED_ATTACHMENT_TRANSMISSION_STATUS"), + 4: .same(proto: "REJECTED_ATTACHMENT"), + 5: .same(proto: "TIMED_OUT_ATTACHMENT"), + 6: .same(proto: "AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT"), + 7: .same(proto: "NOT_ENOUGH_SPACE_ATTACHMENT"), + 8: .same(proto: "FAILED_NO_TRANSFER_UPDATE_CALLBACK"), + 9: .same(proto: "MEDIA_UNAVAILABLE_ATTACHMENT"), + 10: .same(proto: "UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT"), + 11: .same(proto: "NO_ATTACHMENT_FOUND"), + 12: .same(proto: "FAILED_NO_SHARE_TARGET_ENDPOINT"), + 13: .same(proto: "FAILED_PAIRED_KEYHANDSHAKE"), + 14: .same(proto: "FAILED_NULL_CONNECTION"), + 15: .same(proto: "FAILED_NO_PAYLOAD"), + 16: .same(proto: "FAILED_WRITE_INTRODUCTION"), + 17: .same(proto: "FAILED_UNKNOWN_REMOTE_RESPONSE"), + 18: .same(proto: "FAILED_NULL_CONNECTION_INIT_OUTGOING"), + 19: .same(proto: "FAILED_NULL_CONNECTION_DISCONNECTED"), + 20: .same(proto: "FAILED_NULL_CONNECTION_LOST_CONNECTIVITY"), + 21: .same(proto: "FAILED_NULL_CONNECTION_FAILURE"), + 22: .same(proto: "REJECTED_ATTACHMENT_TRANSMISSION_STATUS"), + 23: .same(proto: "TIMED_OUT_ATTACHMENT_TRANSMISSION_STATUS"), + 24: .same(proto: "NOT_ENOUGH_SPACE_ATTACHMENT_TRANSMISSION_STATUS"), + 25: .same(proto: "UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT_TRANSMISSION_STATUS"), + 26: .same(proto: "FAILED_UNKNOWN_REMOTE_RESPONSE_TRANSMISSION_STATUS"), + 27: .same(proto: "NO_RESPONSE_FRAME_CONNECTION_CLOSED_LOST_CONNECTIVITY_TRANSMISSION_STATUS"), + 28: .same(proto: "NO_RESPONSE_FRAME_CONNECTION_CLOSED_TRANSMISSION_STATUS"), + 29: .same(proto: "LOST_CONNECTIVITY_TRANSMISSION_STATUS"), + 30: .same(proto: "FAILED_DISALLOWED_MEDIUM"), + ] +} + +extension Location_Nearby_Proto_Sharing_ConnectionLayerStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "CONNECTION_LAYER_STATUS_UNKNOWN"), + 1: .same(proto: "CONNECTION_LAYER_STATUS_SUCCESS"), + 2: .same(proto: "CONNECTION_LAYER_STATUS_ERROR"), + 3: .same(proto: "CONNECTION_LAYER_STATUS_OUT_OF_ORDER_API_CALL"), + 4: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_HAVE_ACTIVE_STRATEGY"), + 5: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_ADVERTISING"), + 6: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_DISCOVERING"), + 7: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_LISTENING"), + 8: .same(proto: "CONNECTION_LAYER_STATUS_END_POINT_IO_ERROR"), + 9: .same(proto: "CONNECTION_LAYER_STATUS_END_POINT_UNKNOWN"), + 10: .same(proto: "CONNECTION_LAYER_STATUS_CONNECTION_REJECTED"), + 11: .same(proto: "CONNECTION_LAYER_STATUS_ALREADY_CONNECTED_TO_END_POINT"), + 12: .same(proto: "CONNECTION_LAYER_STATUS_NOT_CONNECTED_TO_END_POINT"), + 13: .same(proto: "CONNECTION_LAYER_STATUS_BLUETOOTH_ERROR"), + 14: .same(proto: "CONNECTION_LAYER_STATUS_BLE_ERROR"), + 15: .same(proto: "CONNECTION_LAYER_STATUS_WIFI_LAN_ERROR"), + 16: .same(proto: "CONNECTION_LAYER_STATUS_PAYLOAD_UNKNOWN"), + 17: .same(proto: "CONNECTION_LAYER_STATUS_RESET"), + 18: .same(proto: "CONNECTION_LAYER_STATUS_TIMEOUT"), + ] +} + +extension Location_Nearby_Proto_Sharing_ProcessReceivedAttachmentsStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "PROCESSING_STATUS_UNKNOWN"), + 1: .same(proto: "PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS"), + 2: .same(proto: "PROCESSING_STATUS_FAILED_MOVING_FILES"), + 3: .same(proto: "PROCESSING_STATUS_FAILED_RECEIVING_APK"), + 4: .same(proto: "PROCESSING_STATUS_FAILED_RECEIVING_TEXT"), + 5: .same(proto: "PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS"), + ] +} + +extension Location_Nearby_Proto_Sharing_SessionStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_SESSION_STATUS"), + 1: .same(proto: "SUCCEEDED_SESSION_STATUS"), + 2: .same(proto: "FAILED_SESSION_STATUS"), + ] +} + +extension Location_Nearby_Proto_Sharing_ResponseToIntroduction: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_RESPONSE_TO_INTRODUCTION"), + 1: .same(proto: "ACCEPT_INTRODUCTION"), + 2: .same(proto: "REJECT_INTRODUCTION"), + 3: .same(proto: "FAIL_INTRODUCTION"), + ] +} + +extension Location_Nearby_Proto_Sharing_DeviceType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_DEVICE_TYPE"), + 1: .same(proto: "PHONE"), + 2: .same(proto: "TABLET"), + 3: .same(proto: "LAPTOP"), + 4: .same(proto: "CAR"), + 5: .same(proto: "FOLDABLE"), + 6: .same(proto: "XR"), + ] +} + +extension Location_Nearby_Proto_Sharing_OSType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_OS_TYPE"), + 1: .same(proto: "ANDROID"), + 2: .same(proto: "CHROME_OS"), + 3: .same(proto: "IOS"), + 4: .same(proto: "WINDOWS"), + 5: .same(proto: "MACOS"), + ] +} + +extension Location_Nearby_Proto_Sharing_DeviceRelationship: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_DEVICE_RELATIONSHIP"), + 1: .same(proto: "IS_SELF"), + 2: .same(proto: "IS_CONTACT"), + 3: .same(proto: "IS_STRANGER"), + ] +} + +extension Location_Nearby_Proto_Sharing_LogSource: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNSPECIFIED_SOURCE"), + 1: .same(proto: "LAB_DEVICES"), + 2: .same(proto: "INTERNAL_DEVICES"), + 3: .same(proto: "BETA_TESTER_DEVICES"), + 4: .same(proto: "OEM_DEVICES"), + 5: .same(proto: "DEBUG_DEVICES"), + 6: .same(proto: "NEARBY_MODULE_FOOD_DEVICES"), + 7: .same(proto: "BETO_DOGFOOD_DEVICES"), + 8: .same(proto: "NEARBY_DOGFOOD_DEVICES"), + 9: .same(proto: "NEARBY_TEAMFOOD_DEVICES"), + ] +} + +extension Location_Nearby_Proto_Sharing_ServerActionName: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_SERVER_ACTION"), + 1: .same(proto: "UPLOAD_CERTIFICATES"), + 2: .same(proto: "DOWNLOAD_CERTIFICATES"), + 3: .same(proto: "CHECK_REACHABILITY"), + 4: .same(proto: "UPLOAD_CONTACTS"), + 5: .same(proto: "UPDATE_DEVICE_NAME"), + 6: .same(proto: "UPLOAD_SENDER_CERTIFICATES"), + 7: .same(proto: "DOWNLOAD_SENDER_CERTIFICATES"), + 8: .same(proto: "UPLOAD_CONTACTS_AND_CERTIFICATES"), + 9: .same(proto: "LIST_REACHABLE_PHONE_NUMBERS"), + 10: .same(proto: "LIST_MY_DEVICES"), + 11: .same(proto: "LIST_CONTACT_PEOPLE"), + 12: .same(proto: "DOWNLOAD_CERTIFICATES_INFO"), + ] +} + +extension Location_Nearby_Proto_Sharing_ServerResponseState: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_SERVER_RESPONSE_STATE"), + 1: .same(proto: "SERVER_RESPONSE_SUCCESS"), + 2: .same(proto: "SERVER_RESPONSE_UNKNOWN_FAILURE"), + 3: .same(proto: "SERVER_RESPONSE_STATUS_OTHER_FAILURE"), + 4: .same(proto: "SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED"), + 5: .same(proto: "SERVER_RESPONSE_STATUS_PERMISSION_DENIED"), + 6: .same(proto: "SERVER_RESPONSE_STATUS_UNAVAILABLE"), + 7: .same(proto: "SERVER_RESPONSE_STATUS_UNAUTHENTICATED"), + 8: .same(proto: "SERVER_RESPONSE_GOOGLE_AUTH_FAILURE"), + 9: .same(proto: "SERVER_RESPONSE_STATUS_INVALID_ARGUMENT"), + 10: .same(proto: "SERVER_RESPONSE_NOT_CONNECTED_TO_INTERNET"), + ] +} + +extension Location_Nearby_Proto_Sharing_SyncPurpose: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "SYNC_PURPOSE_UNKNOWN"), + 1: .same(proto: "SYNC_PURPOSE_ON_DEMAND_SYNC"), + 2: .same(proto: "SYNC_PURPOSE_CHIME_NOTIFICATION"), + 3: .same(proto: "SYNC_PURPOSE_DAILY_SYNC"), + 4: .same(proto: "SYNC_PURPOSE_OPT_IN_FIRST_SYNC"), + 5: .same(proto: "SYNC_PURPOSE_CHECK_DEFAULT_OPT_IN"), + 6: .same(proto: "SYNC_PURPOSE_NEARBY_SHARE_ENABLED"), + 7: .same(proto: "SYNC_PURPOSE_SYNC_AT_FAST_INIT"), + 8: .same(proto: "SYNC_PURPOSE_SYNC_AT_DISCOVERY"), + 9: .same(proto: "SYNC_PURPOSE_SYNC_AT_LOAD_PRIVATE_CERTIFICATE"), + 10: .same(proto: "SYNC_PURPOSE_SYNC_AT_ADVERTISEMENT"), + 11: .same(proto: "SYNC_PURPOSE_CONTACT_LIST_CHANGE"), + 12: .same(proto: "SYNC_PURPOSE_SHOW_C11N_VIEW"), + 13: .same(proto: "SYNC_PURPOSE_REGULAR_CHECK_CONTACT_REACHABILITY"), + 14: .same(proto: "SYNC_PURPOSE_VISIBILITY_SELECTED_CONTACT_CHANGE"), + 15: .same(proto: "SYNC_PURPOSE_ACCOUNT_CHANGE"), + 16: .same(proto: "SYNC_PURPOSE_REGENERATE_CERTIFICATES"), + 17: .same(proto: "SYNC_PURPOSE_DEVICE_CONTACTS_CONSENT_CHANGE"), + ] +} + +extension Location_Nearby_Proto_Sharing_ClientRole: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "CLIENT_ROLE_UNKNOWN"), + 1: .same(proto: "CLIENT_ROLE_SENDER"), + 2: .same(proto: "CLIENT_ROLE_RECEIVER"), + ] +} + +extension Location_Nearby_Proto_Sharing_ScanType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_SCAN_TYPE"), + 1: .same(proto: "FOREGROUND_SCAN"), + 2: .same(proto: "FOREGROUND_RETRY_SCAN"), + 3: .same(proto: "DIRECT_SHARE_SCAN"), + 4: .same(proto: "BACKGROUND_SCAN"), + ] +} + +extension Location_Nearby_Proto_Sharing_ParsingFailedType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FAILED_UNKNOWN_TYPE"), + 1: .same(proto: "FAILED_PARSE_ADVERTISEMENT"), + 2: .same(proto: "FAILED_CONVERT_SHARE_TARGET"), + ] +} + +extension Location_Nearby_Proto_Sharing_AdvertisingMode: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_ADVERTISING_MODE"), + 1: .same(proto: "SCREEN_OFF_ADVERTISING_MODE"), + 2: .same(proto: "BACKGROUND_ADVERTISING_MODE"), + 3: .same(proto: "MIDGROUND_ADVERTISING_MODE"), + 4: .same(proto: "FOREGROUND_ADVERTISING_MODE"), + 5: .same(proto: "SUSPENDED_ADVERTISING_MODE"), + ] +} + +extension Location_Nearby_Proto_Sharing_DiscoveryMode: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_DISCOVERY_MODE"), + 1: .same(proto: "SCREEN_OFF_DISCOVERY_MODE"), + 2: .same(proto: "BACKGROUND_DISCOVERY_MODE"), + 3: .same(proto: "MIDGROUND_DISCOVERY_MODE"), + 4: .same(proto: "FOREGROUND_DISCOVERY_MODE"), + 5: .same(proto: "SUSPENDED_DISCOVERY_MODE"), + ] +} + +extension Location_Nearby_Proto_Sharing_ActivityName: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_ACTIVITY"), + 1: .same(proto: "SHARE_SHEET_ACTIVITY"), + 2: .same(proto: "SETTINGS_ACTIVITY"), + 3: .same(proto: "RECEIVE_SURFACE_ACTIVITY"), + 4: .same(proto: "SETUP_ACTIVITY"), + 5: .same(proto: "DEVICE_VISIBILITY_ACTIVITY"), + 6: .same(proto: "CONSENTS_ACTIVITY"), + 7: .same(proto: "SET_DEVICE_NAME_DIALOG"), + 8: .same(proto: "SET_DATA_USAGE_DIALOG"), + 9: .same(proto: "QUICK_SETTINGS_ACTIVITY"), + 10: .same(proto: "REMOTE_COPY_SHARE_SHEET_ACTIVITY"), + 11: .same(proto: "SETUP_WIZARD_ACTIVITY"), + 12: .same(proto: "SETTINGS_REVIEW_ACTIVITY"), + ] +} + +extension Location_Nearby_Proto_Sharing_ConsentType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "CONSENT_TYPE_UNKNOWN"), + 1: .same(proto: "CONSENT_TYPE_C11N"), + 2: .same(proto: "CONSENT_TYPE_DEVICE_CONTACT"), + ] +} + +extension Location_Nearby_Proto_Sharing_ConsentAcceptanceStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "CONSENT_UNKNOWN_ACCEPT_STATUS"), + 1: .same(proto: "CONSENT_ACCEPTED"), + 2: .same(proto: "CONSENT_DECLINED"), + 3: .same(proto: "CONSENT_UNABLE_TO_ENABLE"), + ] +} + +extension Location_Nearby_Proto_Sharing_ApkSource: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_APK_SOURCE"), + 1: .same(proto: "APK_FROM_SD_CARD"), + 2: .same(proto: "INSTALLED_APP"), + ] +} + +extension Location_Nearby_Proto_Sharing_InstallAPKStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_INSTALL_APK_STATUS"), + 1: .same(proto: "FAIL_INSTALLATION"), + 2: .same(proto: "SUCCESS_INSTALLATION"), + ] +} + +extension Location_Nearby_Proto_Sharing_VerifyAPKStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_VERIFY_APK_STATUS"), + 1: .same(proto: "NOT_INSTALLABLE"), + 2: .same(proto: "INSTALLABLE"), + 3: .same(proto: "ALREADY_INSTALLED"), + ] +} + +extension Location_Nearby_Proto_Sharing_ShowNotificationStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN_SHOW_NOTIFICATION_STATUS"), + 1: .same(proto: "SHOW"), + 2: .same(proto: "NOT_SHOW"), + ] +} + +extension Location_Nearby_Proto_Sharing_PermissionRequestResult: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "PERMISSION_UNKNOWN_REQUEST_RESULT"), + 1: .same(proto: "PERMISSION_GRANTED"), + 2: .same(proto: "PERMISSION_REJECTED"), + 3: .same(proto: "PERMISSION_UNABLE_TO_GRANT"), + ] +} + +extension Location_Nearby_Proto_Sharing_PermissionRequestType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "PERMISSION_UNKNOWN_TYPE"), + 1: .same(proto: "PERMISSION_AIRPLANE_MODE_OFF"), + 2: .same(proto: "PERMISSION_WIFI"), + 3: .same(proto: "PERMISSION_BLUETOOTH"), + 4: .same(proto: "PERMISSION_LOCATION"), + 5: .same(proto: "PERMISSION_WIFI_HOTSPOT"), + ] +} + +extension Location_Nearby_Proto_Sharing_SharingUseCase: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "USE_CASE_UNKNOWN"), + 1: .same(proto: "USE_CASE_NEARBY_SHARE"), + 2: .same(proto: "USE_CASE_REMOTE_COPY_PASTE"), + 3: .same(proto: "USE_CASE_WIFI_CREDENTIAL"), + 4: .same(proto: "USE_CASE_APP_SHARE"), + 5: .same(proto: "USE_CASE_QUICK_SETTING_FILE_SHARE"), + 6: .same(proto: "USE_CASE_SETUP_WIZARD"), + 7: .same(proto: "USE_CASE_NEARBY_SHARE_WITH_QR_CODE"), + 8: .same(proto: "USE_CASE_REDIRECTED_FROM_BLUETOOTH_SHARE"), + ] +} + +extension Location_Nearby_Proto_Sharing_AppCrashReason: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "APP_CRASH_REASON_UNKNOWN"), + ] +} + +extension Location_Nearby_Proto_Sharing_AttachmentSourceType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "ATTACHMENT_SOURCE_UNKNOWN"), + 1: .same(proto: "ATTACHMENT_SOURCE_CONTEXT_MENU"), + 2: .same(proto: "ATTACHMENT_SOURCE_DRAG_AND_DROP"), + 3: .same(proto: "ATTACHMENT_SOURCE_SELECT_FILES_BUTTON"), + 4: .same(proto: "ATTACHMENT_SOURCE_PASTE"), + 5: .same(proto: "ATTACHMENT_SOURCE_SELECT_FOLDERS_BUTTON"), + 6: .same(proto: "ATTACHMENT_SOURCE_SHARE_ACTIVATION"), + ] +} + +extension Location_Nearby_Proto_Sharing_PreferencesAction: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "PREFERENCES_ACTION_UNKNOWN"), + 1: .same(proto: "PREFERENCES_ACTION_NO_ACTION"), + 2: .same(proto: "PREFERENCES_ACTION_LOAD_PREFERENCES"), + 3: .same(proto: "PREFERENCES_ACTION_SAVE_PREFERENCESS"), + 4: .same(proto: "PREFERENCES_ACTION_ATTEMPT_LOAD"), + 5: .same(proto: "PREFERENCES_ACTION_RESTORE_FROM_BACKUP"), + 6: .same(proto: "PREFERENCES_ACTION_CREATE_PREFERENCES_PATH"), + 7: .same(proto: "PREFERENCES_ACTION_MAKE_PREFERENCES_BACKUP_FILE"), + 8: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_PATH_EXISTS"), + 9: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_INPUT_STREAM_STATUS"), + 10: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_FILE_IS_CORRUPTED"), + 11: .same(proto: "PREFERENCES_ACTION_CHECK_IF_PREFERENCES_BACKUP_FILE_EXISTS"), + ] +} + +extension Location_Nearby_Proto_Sharing_PreferencesActionStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "PREFERENCES_ACTION_STATUS_UNKNOWN"), + 1: .same(proto: "PREFERENCES_ACTION_STATUS_SUCCESS"), + 2: .same(proto: "PREFERENCES_ACTION_STATUS_FAIL"), + ] +} + +extension Location_Nearby_Proto_Sharing_FastInitState: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FAST_INIT_UNKNOWN_STATE"), + 1: .same(proto: "FAST_INIT_CLOSE_STATE"), + 2: .same(proto: "FAST_INIT_FAR_STATE"), + 3: .same(proto: "FAST_INIT_LOST_STATE"), + ] +} + +extension Location_Nearby_Proto_Sharing_FastInitType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "FAST_INIT_UNKNOWN_TYPE"), + 1: .same(proto: "FAST_INIT_NOTIFY_TYPE"), + 2: .same(proto: "FAST_INIT_SILENT_TYPE"), + ] +} + +extension Location_Nearby_Proto_Sharing_DesktopNotification: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "DESKTOP_NOTIFICATION_UNKNOWN"), + 1: .same(proto: "DESKTOP_NOTIFICATION_CONNECTING"), + 2: .same(proto: "DESKTOP_NOTIFICATION_PROGRESS"), + 3: .same(proto: "DESKTOP_NOTIFICATION_ACCEPT"), + 4: .same(proto: "DESKTOP_NOTIFICATION_RECEIVED"), + 5: .same(proto: "DESKTOP_NOTIFICATION_ERROR"), + ] +} + +extension Location_Nearby_Proto_Sharing_DesktopTransferEventType: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "DESKTOP_TRANSFER_EVENT_TYPE_UNKNOWN"), + 1: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ACCEPT"), + 2: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_PROGRESS"), + 3: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_RECEIVED"), + 4: .same(proto: "DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ERROR"), + 5: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_START"), + 6: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE"), + 7: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_PROGRESS"), + 8: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_SENT"), + 9: .same(proto: "DESKTOP_TRANSFER_EVENT_SEND_TYPE_ERROR"), + ] +} + +extension Location_Nearby_Proto_Sharing_DecryptCertificateFailureStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "DECRYPT_CERT_UNKNOWN_FAILURE"), + 1: .same(proto: "DECRYPT_CERT_NO_SUCH_ALGORITHM_FAILURE"), + 2: .same(proto: "DECRYPT_CERT_NO_SUCH_PADDING_FAILURE"), + 3: .same(proto: "DECRYPT_CERT_INVALID_KEY_FAILURE"), + 4: .same(proto: "DECRYPT_CERT_INVALID_ALGORITHM_PARAMETER_FAILURE"), + 5: .same(proto: "DECRYPT_CERT_ILLEGAL_BLOCK_SIZE_FAILURE"), + 6: .same(proto: "DECRYPT_CERT_BAD_PADDING_FAILURE"), + ] +} + +extension Location_Nearby_Proto_Sharing_ContactAccess: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "CONTACT_ACCESS_UNKNOWN"), + 1: .same(proto: "CONTACT_ACCESS_NO_CONTACT_UPLOADED"), + 2: .same(proto: "CONTACT_ACCESS_ONLY_UPLOAD_GOOGLE_CONTACT"), + 3: .same(proto: "CONTACT_ACCESS_UPLOAD_CONTACT_FOR_DEVICE_CONTACT_CONSENT"), + 4: .same(proto: "CONTACT_ACCESS_UPLOAD_CONTACT_FOR_QUICK_SHARE_CONSENT"), + ] +} + +extension Location_Nearby_Proto_Sharing_IdentityVerification: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "IDENTITY_VERIFICATION_UNKNOWN"), + 1: .same(proto: "IDENTITY_VERIFICATION_NO_PHONE_NUMBER_VERIFIED"), + 2: .same(proto: "IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_NOT_LINKED_TO_GAIA"), + 3: .same(proto: "IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_LINKED_TO_QS_GAIA"), + ] +} + +extension Location_Nearby_Proto_Sharing_ButtonStatus: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "BUTTON_STATUS_UNKNOWN"), + 1: .same(proto: "BUTTON_STATUS_CLICK_ACCEPT"), + 2: .same(proto: "BUTTON_STATUS_CLICK_REJECT"), + 3: .same(proto: "BUTTON_STATUS_IGNORE"), + ] +} diff --git a/NearbyShare/Model/Protobuf/wire_format.pb.swift b/NearbyShare/Model/Protobuf/wire_format.pb.swift index d8c5bd0..a99c16f 100644 --- a/NearbyShare/Model/Protobuf/wire_format.pb.swift +++ b/NearbyShare/Model/Protobuf/wire_format.pb.swift @@ -7,12 +7,19 @@ // For information on using the generated types, please see the documentation: // https://github.com/apple/swift-protobuf/ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Brought from: //depot/google3/location/nearby/sharing/proto/wire_format.proto -// At CL 317565061 +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. import Foundation import SwiftProtobuf @@ -28,7 +35,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP } /// File metadata. Does not include the actual bytes of the file. -/// NEXT_ID=6 +/// NEXT_ID=10 struct Sharing_Nearby_FileMetadata { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -97,6 +104,37 @@ struct Sharing_Nearby_FileMetadata { /// Clears the value of `id`. Subsequent reads from it will return its default value. mutating func clearID() {self._id = nil} + /// The parent folder. + var parentFolder: String { + get {return _parentFolder ?? String()} + set {_parentFolder = newValue} + } + /// Returns true if `parentFolder` has been explicitly set. + var hasParentFolder: Bool {return self._parentFolder != nil} + /// Clears the value of `parentFolder`. Subsequent reads from it will return its default value. + mutating func clearParentFolder() {self._parentFolder = nil} + + /// A stable identifier for the attachment. Used for receiver to identify same + /// attachment from different transfers. + var attachmentHash: Int64 { + get {return _attachmentHash ?? 0} + set {_attachmentHash = newValue} + } + /// Returns true if `attachmentHash` has been explicitly set. + var hasAttachmentHash: Bool {return self._attachmentHash != nil} + /// Clears the value of `attachmentHash`. Subsequent reads from it will return its default value. + mutating func clearAttachmentHash() {self._attachmentHash = nil} + + /// True, if image in file attachment is sensitive + var isSensitiveContent: Bool { + get {return _isSensitiveContent ?? false} + set {_isSensitiveContent = newValue} + } + /// Returns true if `isSensitiveContent` has been explicitly set. + var hasIsSensitiveContent: Bool {return self._isSensitiveContent != nil} + /// Clears the value of `isSensitiveContent`. Subsequent reads from it will return its default value. + mutating func clearIsSensitiveContent() {self._isSensitiveContent = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum TypeEnum: SwiftProtobuf.Enum { @@ -104,8 +142,10 @@ struct Sharing_Nearby_FileMetadata { case unknown // = 0 case image // = 1 case video // = 2 - case app // = 3 + case androidApp // = 3 case audio // = 4 + case document // = 5 + case contactCard // = 6 init() { self = .unknown @@ -116,8 +156,10 @@ struct Sharing_Nearby_FileMetadata { case 0: self = .unknown case 1: self = .image case 2: self = .video - case 3: self = .app + case 3: self = .androidApp case 4: self = .audio + case 5: self = .document + case 6: self = .contactCard default: return nil } } @@ -127,8 +169,10 @@ struct Sharing_Nearby_FileMetadata { case .unknown: return 0 case .image: return 1 case .video: return 2 - case .app: return 3 + case .androidApp: return 3 case .audio: return 4 + case .document: return 5 + case .contactCard: return 6 } } @@ -142,6 +186,9 @@ struct Sharing_Nearby_FileMetadata { fileprivate var _size: Int64? = nil fileprivate var _mimeType: String? = nil fileprivate var _id: Int64? = nil + fileprivate var _parentFolder: String? = nil + fileprivate var _attachmentHash: Int64? = nil + fileprivate var _isSensitiveContent: Bool? = nil } #if swift(>=4.2) @@ -152,7 +199,7 @@ extension Sharing_Nearby_FileMetadata.TypeEnum: CaseIterable { #endif // swift(>=4.2) -/// NEXT_ID=5 +/// NEXT_ID=8 struct Sharing_Nearby_TextMetadata { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -209,6 +256,16 @@ struct Sharing_Nearby_TextMetadata { /// Clears the value of `id`. Subsequent reads from it will return its default value. mutating func clearID() {self._id = nil} + /// True if text is sensitive, e.g. password + var isSensitiveText: Bool { + get {return _isSensitiveText ?? false} + set {_isSensitiveText = newValue} + } + /// Returns true if `isSensitiveText` has been explicitly set. + var hasIsSensitiveText: Bool {return self._isSensitiveText != nil} + /// Clears the value of `isSensitiveText`. Subsequent reads from it will return its default value. + mutating func clearIsSensitiveText() {self._isSensitiveText = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum TypeEnum: SwiftProtobuf.Enum { @@ -259,6 +316,7 @@ struct Sharing_Nearby_TextMetadata { fileprivate var _payloadID: Int64? = nil fileprivate var _size: Int64? = nil fileprivate var _id: Int64? = nil + fileprivate var _isSensitiveText: Bool? = nil } #if swift(>=4.2) @@ -269,7 +327,7 @@ extension Sharing_Nearby_TextMetadata.TypeEnum: CaseIterable { #endif // swift(>=4.2) -/// NEXT_ID=5 +/// NEXT_ID=6 struct Sharing_Nearby_WifiCredentialsMetadata { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -324,6 +382,7 @@ struct Sharing_Nearby_WifiCredentialsMetadata { case `open` // = 1 case wpaPsk // = 2 case wep // = 3 + case sae // = 4 init() { self = .unknownSecurityType @@ -335,6 +394,7 @@ struct Sharing_Nearby_WifiCredentialsMetadata { case 1: self = .open case 2: self = .wpaPsk case 3: self = .wep + case 4: self = .sae default: return nil } } @@ -345,6 +405,7 @@ struct Sharing_Nearby_WifiCredentialsMetadata { case .open: return 1 case .wpaPsk: return 2 case .wep: return 3 + case .sae: return 4 } } @@ -366,6 +427,131 @@ extension Sharing_Nearby_WifiCredentialsMetadata.SecurityType: CaseIterable { #endif // swift(>=4.2) +/// NEXT_ID=8 +struct Sharing_Nearby_AppMetadata { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The app name. This will be sent in introduction. + var appName: String { + get {return _appName ?? String()} + set {_appName = newValue} + } + /// Returns true if `appName` has been explicitly set. + var hasAppName: Bool {return self._appName != nil} + /// Clears the value of `appName`. Subsequent reads from it will return its default value. + mutating func clearAppName() {self._appName = nil} + + /// The size of the all split of apks. + var size: Int64 { + get {return _size ?? 0} + set {_size = newValue} + } + /// Returns true if `size` has been explicitly set. + var hasSize: Bool {return self._size != nil} + /// Clears the value of `size`. Subsequent reads from it will return its default value. + mutating func clearSize() {self._size = nil} + + /// The File payload id that will be sent as a follow up containing the + /// apk paths. + var payloadID: [Int64] = [] + + /// A uuid for the attachment. Should be unique across all attachments. + var id: Int64 { + get {return _id ?? 0} + set {_id = newValue} + } + /// Returns true if `id` has been explicitly set. + var hasID: Bool {return self._id != nil} + /// Clears the value of `id`. Subsequent reads from it will return its default value. + mutating func clearID() {self._id = nil} + + /// The name of apk file. This will be sent in introduction. + var fileName: [String] = [] + + /// The size of apk file. This will be sent in introduction. + var fileSize: [Int64] = [] + + /// The package name. This will be sent in introduction. + var packageName: String { + get {return _packageName ?? String()} + set {_packageName = newValue} + } + /// Returns true if `packageName` has been explicitly set. + var hasPackageName: Bool {return self._packageName != nil} + /// Clears the value of `packageName`. Subsequent reads from it will return its default value. + mutating func clearPackageName() {self._packageName = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _appName: String? = nil + fileprivate var _size: Int64? = nil + fileprivate var _id: Int64? = nil + fileprivate var _packageName: String? = nil +} + +/// NEXT_ID=5 +struct Sharing_Nearby_StreamMetadata { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// A human readable description for the stream. + var description_p: String { + get {return _description_p ?? String()} + set {_description_p = newValue} + } + /// Returns true if `description_p` has been explicitly set. + var hasDescription_p: Bool {return self._description_p != nil} + /// Clears the value of `description_p`. Subsequent reads from it will return its default value. + mutating func clearDescription_p() {self._description_p = nil} + + /// The package name of the sending application. + var packageName: String { + get {return _packageName ?? String()} + set {_packageName = newValue} + } + /// Returns true if `packageName` has been explicitly set. + var hasPackageName: Bool {return self._packageName != nil} + /// Clears the value of `packageName`. Subsequent reads from it will return its default value. + mutating func clearPackageName() {self._packageName = nil} + + /// The payload id that will be send as a followup containing the + /// ParcelFileDescriptor. + var payloadID: Int64 { + get {return _payloadID ?? 0} + set {_payloadID = newValue} + } + /// Returns true if `payloadID` has been explicitly set. + var hasPayloadID: Bool {return self._payloadID != nil} + /// Clears the value of `payloadID`. Subsequent reads from it will return its default value. + mutating func clearPayloadID() {self._payloadID = nil} + + /// The human-readable name of the package that should be displayed as + /// attribution if no other information is available (i.e. the package is not + /// installed locally yet). + var attributedAppName: String { + get {return _attributedAppName ?? String()} + set {_attributedAppName = newValue} + } + /// Returns true if `attributedAppName` has been explicitly set. + var hasAttributedAppName: Bool {return self._attributedAppName != nil} + /// Clears the value of `attributedAppName`. Subsequent reads from it will return its default value. + mutating func clearAttributedAppName() {self._attributedAppName = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _description_p: String? = nil + fileprivate var _packageName: String? = nil + fileprivate var _payloadID: Int64? = nil + fileprivate var _attributedAppName: String? = nil +} + /// A frame used when sending messages over the wire. /// NEXT_ID=3 struct Sharing_Nearby_Frame { @@ -435,66 +621,75 @@ extension Sharing_Nearby_Frame.Version: CaseIterable { #endif // swift(>=4.2) -/// NEXT_ID=7 +/// NEXT_ID=8 struct Sharing_Nearby_V1Frame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. var type: Sharing_Nearby_V1Frame.FrameType { - get {return _type ?? .unknownFrameType} - set {_type = newValue} + get {return _storage._type ?? .unknownFrameType} + set {_uniqueStorage()._type = newValue} } /// Returns true if `type` has been explicitly set. - var hasType: Bool {return self._type != nil} + var hasType: Bool {return _storage._type != nil} /// Clears the value of `type`. Subsequent reads from it will return its default value. - mutating func clearType() {self._type = nil} + mutating func clearType() {_uniqueStorage()._type = nil} - /// Exactly one of the following fields will be set. + /// At most one of the following fields will be set. var introduction: Sharing_Nearby_IntroductionFrame { - get {return _introduction ?? Sharing_Nearby_IntroductionFrame()} - set {_introduction = newValue} + get {return _storage._introduction ?? Sharing_Nearby_IntroductionFrame()} + set {_uniqueStorage()._introduction = newValue} } /// Returns true if `introduction` has been explicitly set. - var hasIntroduction: Bool {return self._introduction != nil} + var hasIntroduction: Bool {return _storage._introduction != nil} /// Clears the value of `introduction`. Subsequent reads from it will return its default value. - mutating func clearIntroduction() {self._introduction = nil} + mutating func clearIntroduction() {_uniqueStorage()._introduction = nil} var connectionResponse: Sharing_Nearby_ConnectionResponseFrame { - get {return _connectionResponse ?? Sharing_Nearby_ConnectionResponseFrame()} - set {_connectionResponse = newValue} + get {return _storage._connectionResponse ?? Sharing_Nearby_ConnectionResponseFrame()} + set {_uniqueStorage()._connectionResponse = newValue} } /// Returns true if `connectionResponse` has been explicitly set. - var hasConnectionResponse: Bool {return self._connectionResponse != nil} + var hasConnectionResponse: Bool {return _storage._connectionResponse != nil} /// Clears the value of `connectionResponse`. Subsequent reads from it will return its default value. - mutating func clearConnectionResponse() {self._connectionResponse = nil} + mutating func clearConnectionResponse() {_uniqueStorage()._connectionResponse = nil} var pairedKeyEncryption: Sharing_Nearby_PairedKeyEncryptionFrame { - get {return _pairedKeyEncryption ?? Sharing_Nearby_PairedKeyEncryptionFrame()} - set {_pairedKeyEncryption = newValue} + get {return _storage._pairedKeyEncryption ?? Sharing_Nearby_PairedKeyEncryptionFrame()} + set {_uniqueStorage()._pairedKeyEncryption = newValue} } /// Returns true if `pairedKeyEncryption` has been explicitly set. - var hasPairedKeyEncryption: Bool {return self._pairedKeyEncryption != nil} + var hasPairedKeyEncryption: Bool {return _storage._pairedKeyEncryption != nil} /// Clears the value of `pairedKeyEncryption`. Subsequent reads from it will return its default value. - mutating func clearPairedKeyEncryption() {self._pairedKeyEncryption = nil} + mutating func clearPairedKeyEncryption() {_uniqueStorage()._pairedKeyEncryption = nil} var pairedKeyResult: Sharing_Nearby_PairedKeyResultFrame { - get {return _pairedKeyResult ?? Sharing_Nearby_PairedKeyResultFrame()} - set {_pairedKeyResult = newValue} + get {return _storage._pairedKeyResult ?? Sharing_Nearby_PairedKeyResultFrame()} + set {_uniqueStorage()._pairedKeyResult = newValue} } /// Returns true if `pairedKeyResult` has been explicitly set. - var hasPairedKeyResult: Bool {return self._pairedKeyResult != nil} + var hasPairedKeyResult: Bool {return _storage._pairedKeyResult != nil} /// Clears the value of `pairedKeyResult`. Subsequent reads from it will return its default value. - mutating func clearPairedKeyResult() {self._pairedKeyResult = nil} + mutating func clearPairedKeyResult() {_uniqueStorage()._pairedKeyResult = nil} var certificateInfo: Sharing_Nearby_CertificateInfoFrame { - get {return _certificateInfo ?? Sharing_Nearby_CertificateInfoFrame()} - set {_certificateInfo = newValue} + get {return _storage._certificateInfo ?? Sharing_Nearby_CertificateInfoFrame()} + set {_uniqueStorage()._certificateInfo = newValue} } /// Returns true if `certificateInfo` has been explicitly set. - var hasCertificateInfo: Bool {return self._certificateInfo != nil} + var hasCertificateInfo: Bool {return _storage._certificateInfo != nil} /// Clears the value of `certificateInfo`. Subsequent reads from it will return its default value. - mutating func clearCertificateInfo() {self._certificateInfo = nil} + mutating func clearCertificateInfo() {_uniqueStorage()._certificateInfo = nil} + + var progressUpdate: Sharing_Nearby_ProgressUpdateFrame { + get {return _storage._progressUpdate ?? Sharing_Nearby_ProgressUpdateFrame()} + set {_uniqueStorage()._progressUpdate = newValue} + } + /// Returns true if `progressUpdate` has been explicitly set. + var hasProgressUpdate: Bool {return _storage._progressUpdate != nil} + /// Clears the value of `progressUpdate`. Subsequent reads from it will return its default value. + mutating func clearProgressUpdate() {_uniqueStorage()._progressUpdate = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -505,9 +700,14 @@ struct Sharing_Nearby_V1Frame { case response // = 2 case pairedKeyEncryption // = 3 case pairedKeyResult // = 4 + + /// No longer used. case certificateInfo // = 5 case cancel // = 6 + /// No longer used. + case progressUpdate // = 7 + init() { self = .unknownFrameType } @@ -521,6 +721,7 @@ struct Sharing_Nearby_V1Frame { case 4: self = .pairedKeyResult case 5: self = .certificateInfo case 6: self = .cancel + case 7: self = .progressUpdate default: return nil } } @@ -534,6 +735,7 @@ struct Sharing_Nearby_V1Frame { case .pairedKeyResult: return 4 case .certificateInfo: return 5 case .cancel: return 6 + case .progressUpdate: return 7 } } @@ -541,12 +743,7 @@ struct Sharing_Nearby_V1Frame { init() {} - fileprivate var _type: Sharing_Nearby_V1Frame.FrameType? = nil - fileprivate var _introduction: Sharing_Nearby_IntroductionFrame? = nil - fileprivate var _connectionResponse: Sharing_Nearby_ConnectionResponseFrame? = nil - fileprivate var _pairedKeyEncryption: Sharing_Nearby_PairedKeyEncryptionFrame? = nil - fileprivate var _pairedKeyResult: Sharing_Nearby_PairedKeyResultFrame? = nil - fileprivate var _certificateInfo: Sharing_Nearby_CertificateInfoFrame? = nil + fileprivate var _storage = _StorageClass.defaultInstance } #if swift(>=4.2) @@ -559,7 +756,7 @@ extension Sharing_Nearby_V1Frame.FrameType: CaseIterable { /// An introduction packet sent by the sending side. Contains a list of files /// they'd like to share. -/// NEXT_ID=4 +/// NEXT_ID=10 struct Sharing_Nearby_IntroductionFrame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -581,16 +778,114 @@ struct Sharing_Nearby_IntroductionFrame { var wifiCredentialsMetadata: [Sharing_Nearby_WifiCredentialsMetadata] = [] + var appMetadata: [Sharing_Nearby_AppMetadata] = [] + + var startTransfer: Bool { + get {return _startTransfer ?? false} + set {_startTransfer = newValue} + } + /// Returns true if `startTransfer` has been explicitly set. + var hasStartTransfer: Bool {return self._startTransfer != nil} + /// Clears the value of `startTransfer`. Subsequent reads from it will return its default value. + mutating func clearStartTransfer() {self._startTransfer = nil} + + var streamMetadata: [Sharing_Nearby_StreamMetadata] = [] + + var useCase: Sharing_Nearby_IntroductionFrame.SharingUseCase { + get {return _useCase ?? .unknown} + set {_useCase = newValue} + } + /// Returns true if `useCase` has been explicitly set. + var hasUseCase: Bool {return self._useCase != nil} + /// Clears the value of `useCase`. Subsequent reads from it will return its default value. + mutating func clearUseCase() {self._useCase = nil} + + var previewPayloadIds: [Int64] = [] + var unknownFields = SwiftProtobuf.UnknownStorage() + enum SharingUseCase: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + case nearbyShare // = 1 + case remoteCopy // = 2 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .nearbyShare + case 2: self = .remoteCopy + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .nearbyShare: return 1 + case .remoteCopy: return 2 + } + } + + } + init() {} fileprivate var _requiredPackage: String? = nil + fileprivate var _startTransfer: Bool? = nil + fileprivate var _useCase: Sharing_Nearby_IntroductionFrame.SharingUseCase? = nil +} + +#if swift(>=4.2) + +extension Sharing_Nearby_IntroductionFrame.SharingUseCase: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// A progress update packet sent by the sending side. Contains transfer progress +/// value. NEXT_ID=3 +struct Sharing_Nearby_ProgressUpdateFrame { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var progress: Float { + get {return _progress ?? 0} + set {_progress = newValue} + } + /// Returns true if `progress` has been explicitly set. + var hasProgress: Bool {return self._progress != nil} + /// Clears the value of `progress`. Subsequent reads from it will return its default value. + mutating func clearProgress() {self._progress = nil} + + /// True, if the receiver should start bandwidth upgrade and receiving the + /// payloads. + var startTransfer: Bool { + get {return _startTransfer ?? false} + set {_startTransfer = newValue} + } + /// Returns true if `startTransfer` has been explicitly set. + var hasStartTransfer: Bool {return self._startTransfer != nil} + /// Clears the value of `startTransfer`. Subsequent reads from it will return its default value. + mutating func clearStartTransfer() {self._startTransfer = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _progress: Float? = nil + fileprivate var _startTransfer: Bool? = nil } /// A response packet sent by the receiving side. Accepts or rejects the list of /// files. -/// NEXT_ID=2 +/// NEXT_ID=4 struct Sharing_Nearby_ConnectionResponseFrame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -606,6 +901,13 @@ struct Sharing_Nearby_ConnectionResponseFrame { /// Clears the value of `status`. Subsequent reads from it will return its default value. mutating func clearStatus() {self._status = nil} + /// Key is attachment hash, value is the details of attachment. + var attachmentDetails: Dictionary = [:] + + /// In the case of a stream attachments, the other side of the pipe. + /// Both sender and receiver should validate matching counts. + var streamMetadata: [Sharing_Nearby_StreamMetadata] = [] + var unknownFields = SwiftProtobuf.UnknownStorage() enum Status: SwiftProtobuf.Enum { @@ -659,8 +961,185 @@ extension Sharing_Nearby_ConnectionResponseFrame.Status: CaseIterable { #endif // swift(>=4.2) -/// A paired key encryption packet sent between devices, contains signed data. +/// Attachment details that sent in ConnectionResponseFrame. /// NEXT_ID=3 +struct Sharing_Nearby_AttachmentDetails { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The attachment family type. + var type: Sharing_Nearby_AttachmentDetails.TypeEnum { + get {return _type ?? .unknown} + set {_type = newValue} + } + /// Returns true if `type` has been explicitly set. + var hasType: Bool {return self._type != nil} + /// Clears the value of `type`. Subsequent reads from it will return its default value. + mutating func clearType() {self._type = nil} + + /// This field is only for FILE type. + var fileAttachmentDetails: Sharing_Nearby_FileAttachmentDetails { + get {return _fileAttachmentDetails ?? Sharing_Nearby_FileAttachmentDetails()} + set {_fileAttachmentDetails = newValue} + } + /// Returns true if `fileAttachmentDetails` has been explicitly set. + var hasFileAttachmentDetails: Bool {return self._fileAttachmentDetails != nil} + /// Clears the value of `fileAttachmentDetails`. Subsequent reads from it will return its default value. + mutating func clearFileAttachmentDetails() {self._fileAttachmentDetails = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + /// LINT.IfChange + enum TypeEnum: SwiftProtobuf.Enum { + typealias RawValue = Int + case unknown // = 0 + + /// Represents FileAttachment. + case file // = 1 + + /// Represents TextAttachment. + case text // = 2 + + /// Represents WifiCredentialsAttachment. + case wifiCredentials // = 3 + + /// Represents AppAttachment. + case app // = 4 + + /// Represents StreamAttachment. + case stream // = 5 + + init() { + self = .unknown + } + + init?(rawValue: Int) { + switch rawValue { + case 0: self = .unknown + case 1: self = .file + case 2: self = .text + case 3: self = .wifiCredentials + case 4: self = .app + case 5: self = .stream + default: return nil + } + } + + var rawValue: Int { + switch self { + case .unknown: return 0 + case .file: return 1 + case .text: return 2 + case .wifiCredentials: return 3 + case .app: return 4 + case .stream: return 5 + } + } + + } + + init() {} + + fileprivate var _type: Sharing_Nearby_AttachmentDetails.TypeEnum? = nil + fileprivate var _fileAttachmentDetails: Sharing_Nearby_FileAttachmentDetails? = nil +} + +#if swift(>=4.2) + +extension Sharing_Nearby_AttachmentDetails.TypeEnum: CaseIterable { + // Support synthesized by the compiler. +} + +#endif // swift(>=4.2) + +/// File attachment details included in ConnectionResponseFrame. +/// NEXT_ID=3 +struct Sharing_Nearby_FileAttachmentDetails { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Existing local file size on receiver side. + var receiverExistingFileSize: Int64 { + get {return _receiverExistingFileSize ?? 0} + set {_receiverExistingFileSize = newValue} + } + /// Returns true if `receiverExistingFileSize` has been explicitly set. + var hasReceiverExistingFileSize: Bool {return self._receiverExistingFileSize != nil} + /// Clears the value of `receiverExistingFileSize`. Subsequent reads from it will return its default value. + mutating func clearReceiverExistingFileSize() {self._receiverExistingFileSize = nil} + + /// The key is attachment hash, a stable identifier for the attachment. + /// Value is list of payload details transferred for the attachment. + var attachmentHashPayloads: Dictionary = [:] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _receiverExistingFileSize: Int64? = nil +} + +/// NEXT_ID=2 +struct Sharing_Nearby_PayloadsDetails { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// The list should be sorted by creation timestamp. + var payloadDetails: [Sharing_Nearby_PayloadDetails] = [] + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} +} + +/// Metadata of a payload file created by Nearby Connections. +/// NEXT_ID=4 +struct Sharing_Nearby_PayloadDetails { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var id: Int64 { + get {return _id ?? 0} + set {_id = newValue} + } + /// Returns true if `id` has been explicitly set. + var hasID: Bool {return self._id != nil} + /// Clears the value of `id`. Subsequent reads from it will return its default value. + mutating func clearID() {self._id = nil} + + var creationTimestampMillis: Int64 { + get {return _creationTimestampMillis ?? 0} + set {_creationTimestampMillis = newValue} + } + /// Returns true if `creationTimestampMillis` has been explicitly set. + var hasCreationTimestampMillis: Bool {return self._creationTimestampMillis != nil} + /// Clears the value of `creationTimestampMillis`. Subsequent reads from it will return its default value. + mutating func clearCreationTimestampMillis() {self._creationTimestampMillis = nil} + + var size: Int64 { + get {return _size ?? 0} + set {_size = newValue} + } + /// Returns true if `size` has been explicitly set. + var hasSize: Bool {return self._size != nil} + /// Clears the value of `size`. Subsequent reads from it will return its default value. + mutating func clearSize() {self._size = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _id: Int64? = nil + fileprivate var _creationTimestampMillis: Int64? = nil + fileprivate var _size: Int64? = nil +} + +/// A paired key encryption packet sent between devices, contains signed data. +/// NEXT_ID=5 struct Sharing_Nearby_PairedKeyEncryptionFrame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -696,6 +1175,20 @@ struct Sharing_Nearby_PairedKeyEncryptionFrame { /// Clears the value of `optionalSignedData`. Subsequent reads from it will return its default value. mutating func clearOptionalSignedData() {self._optionalSignedData = nil} + /// An optional QR code handshake data in a byte array format. + /// For incoming connection contains a signature of the UKEY2 + /// token, created with the sender's private key. + /// For outgoing connection contains an HKDF of the connection token and of the + /// UKEY2 token + var qrCodeHandshakeData: Data { + get {return _qrCodeHandshakeData ?? Data()} + set {_qrCodeHandshakeData = newValue} + } + /// Returns true if `qrCodeHandshakeData` has been explicitly set. + var hasQrCodeHandshakeData: Bool {return self._qrCodeHandshakeData != nil} + /// Clears the value of `qrCodeHandshakeData`. Subsequent reads from it will return its default value. + mutating func clearQrCodeHandshakeData() {self._qrCodeHandshakeData = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} @@ -703,10 +1196,11 @@ struct Sharing_Nearby_PairedKeyEncryptionFrame { fileprivate var _signedData: Data? = nil fileprivate var _secretIDHash: Data? = nil fileprivate var _optionalSignedData: Data? = nil + fileprivate var _qrCodeHandshakeData: Data? = nil } /// A paired key verification result packet sent between devices. -/// NEXT_ID=2 +/// NEXT_ID=3 struct Sharing_Nearby_PairedKeyResultFrame { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -722,6 +1216,16 @@ struct Sharing_Nearby_PairedKeyResultFrame { /// Clears the value of `status`. Subsequent reads from it will return its default value. mutating func clearStatus() {self._status = nil} + /// OS type. + var osType: Location_Nearby_Proto_Sharing_OSType { + get {return _osType ?? .unknownOsType} + set {_osType = newValue} + } + /// Returns true if `osType` has been explicitly set. + var hasOsType: Bool {return self._osType != nil} + /// Clears the value of `osType`. Subsequent reads from it will return its default value. + mutating func clearOsType() {self._osType = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() enum Status: SwiftProtobuf.Enum { @@ -759,6 +1263,7 @@ struct Sharing_Nearby_PairedKeyResultFrame { init() {} fileprivate var _status: Sharing_Nearby_PairedKeyResultFrame.Status? = nil + fileprivate var _osType: Location_Nearby_Proto_Sharing_OSType? = nil } #if swift(>=4.2) @@ -914,6 +1419,29 @@ struct Sharing_Nearby_WifiCredentials { fileprivate var _hiddenSsid: Bool? = nil } +/// NEXT_ID=2 +struct Sharing_Nearby_StreamDetails { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + /// Serialized ParcelFileDescriptor for input stream (for the receiver). + var inputStreamParcelFileDescriptorBytes: Data { + get {return _inputStreamParcelFileDescriptorBytes ?? Data()} + set {_inputStreamParcelFileDescriptorBytes = newValue} + } + /// Returns true if `inputStreamParcelFileDescriptorBytes` has been explicitly set. + var hasInputStreamParcelFileDescriptorBytes: Bool {return self._inputStreamParcelFileDescriptorBytes != nil} + /// Clears the value of `inputStreamParcelFileDescriptorBytes`. Subsequent reads from it will return its default value. + mutating func clearInputStreamParcelFileDescriptorBytes() {self._inputStreamParcelFileDescriptorBytes = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _inputStreamParcelFileDescriptorBytes: Data? = nil +} + #if swift(>=5.5) && canImport(_Concurrency) extension Sharing_Nearby_FileMetadata: @unchecked Sendable {} extension Sharing_Nearby_FileMetadata.TypeEnum: @unchecked Sendable {} @@ -921,19 +1449,29 @@ extension Sharing_Nearby_TextMetadata: @unchecked Sendable {} extension Sharing_Nearby_TextMetadata.TypeEnum: @unchecked Sendable {} extension Sharing_Nearby_WifiCredentialsMetadata: @unchecked Sendable {} extension Sharing_Nearby_WifiCredentialsMetadata.SecurityType: @unchecked Sendable {} +extension Sharing_Nearby_AppMetadata: @unchecked Sendable {} +extension Sharing_Nearby_StreamMetadata: @unchecked Sendable {} extension Sharing_Nearby_Frame: @unchecked Sendable {} extension Sharing_Nearby_Frame.Version: @unchecked Sendable {} extension Sharing_Nearby_V1Frame: @unchecked Sendable {} extension Sharing_Nearby_V1Frame.FrameType: @unchecked Sendable {} extension Sharing_Nearby_IntroductionFrame: @unchecked Sendable {} +extension Sharing_Nearby_IntroductionFrame.SharingUseCase: @unchecked Sendable {} +extension Sharing_Nearby_ProgressUpdateFrame: @unchecked Sendable {} extension Sharing_Nearby_ConnectionResponseFrame: @unchecked Sendable {} extension Sharing_Nearby_ConnectionResponseFrame.Status: @unchecked Sendable {} +extension Sharing_Nearby_AttachmentDetails: @unchecked Sendable {} +extension Sharing_Nearby_AttachmentDetails.TypeEnum: @unchecked Sendable {} +extension Sharing_Nearby_FileAttachmentDetails: @unchecked Sendable {} +extension Sharing_Nearby_PayloadsDetails: @unchecked Sendable {} +extension Sharing_Nearby_PayloadDetails: @unchecked Sendable {} extension Sharing_Nearby_PairedKeyEncryptionFrame: @unchecked Sendable {} extension Sharing_Nearby_PairedKeyResultFrame: @unchecked Sendable {} extension Sharing_Nearby_PairedKeyResultFrame.Status: @unchecked Sendable {} extension Sharing_Nearby_CertificateInfoFrame: @unchecked Sendable {} extension Sharing_Nearby_PublicCertificate: @unchecked Sendable {} extension Sharing_Nearby_WifiCredentials: @unchecked Sendable {} +extension Sharing_Nearby_StreamDetails: @unchecked Sendable {} #endif // swift(>=5.5) && canImport(_Concurrency) // MARK: - Code below here is support for the SwiftProtobuf runtime. @@ -949,6 +1487,9 @@ extension Sharing_Nearby_FileMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes 4: .same(proto: "size"), 5: .standard(proto: "mime_type"), 6: .same(proto: "id"), + 7: .standard(proto: "parent_folder"), + 8: .standard(proto: "attachment_hash"), + 9: .standard(proto: "is_sensitive_content"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -963,6 +1504,9 @@ extension Sharing_Nearby_FileMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes case 4: try { try decoder.decodeSingularInt64Field(value: &self._size) }() case 5: try { try decoder.decodeSingularStringField(value: &self._mimeType) }() case 6: try { try decoder.decodeSingularInt64Field(value: &self._id) }() + case 7: try { try decoder.decodeSingularStringField(value: &self._parentFolder) }() + case 8: try { try decoder.decodeSingularInt64Field(value: &self._attachmentHash) }() + case 9: try { try decoder.decodeSingularBoolField(value: &self._isSensitiveContent) }() default: break } } @@ -991,6 +1535,15 @@ extension Sharing_Nearby_FileMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes try { if let v = self._id { try visitor.visitSingularInt64Field(value: v, fieldNumber: 6) } }() + try { if let v = self._parentFolder { + try visitor.visitSingularStringField(value: v, fieldNumber: 7) + } }() + try { if let v = self._attachmentHash { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 8) + } }() + try { if let v = self._isSensitiveContent { + try visitor.visitSingularBoolField(value: v, fieldNumber: 9) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1001,6 +1554,9 @@ extension Sharing_Nearby_FileMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes if lhs._size != rhs._size {return false} if lhs._mimeType != rhs._mimeType {return false} if lhs._id != rhs._id {return false} + if lhs._parentFolder != rhs._parentFolder {return false} + if lhs._attachmentHash != rhs._attachmentHash {return false} + if lhs._isSensitiveContent != rhs._isSensitiveContent {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1011,8 +1567,10 @@ extension Sharing_Nearby_FileMetadata.TypeEnum: SwiftProtobuf._ProtoNameProvidin 0: .same(proto: "UNKNOWN"), 1: .same(proto: "IMAGE"), 2: .same(proto: "VIDEO"), - 3: .same(proto: "APP"), + 3: .same(proto: "ANDROID_APP"), 4: .same(proto: "AUDIO"), + 5: .same(proto: "DOCUMENT"), + 6: .same(proto: "CONTACT_CARD"), ] } @@ -1024,6 +1582,7 @@ extension Sharing_Nearby_TextMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes 4: .standard(proto: "payload_id"), 5: .same(proto: "size"), 6: .same(proto: "id"), + 7: .standard(proto: "is_sensitive_text"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1037,6 +1596,7 @@ extension Sharing_Nearby_TextMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes case 4: try { try decoder.decodeSingularInt64Field(value: &self._payloadID) }() case 5: try { try decoder.decodeSingularInt64Field(value: &self._size) }() case 6: try { try decoder.decodeSingularInt64Field(value: &self._id) }() + case 7: try { try decoder.decodeSingularBoolField(value: &self._isSensitiveText) }() default: break } } @@ -1062,6 +1622,9 @@ extension Sharing_Nearby_TextMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes try { if let v = self._id { try visitor.visitSingularInt64Field(value: v, fieldNumber: 6) } }() + try { if let v = self._isSensitiveText { + try visitor.visitSingularBoolField(value: v, fieldNumber: 7) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1071,6 +1634,7 @@ extension Sharing_Nearby_TextMetadata: SwiftProtobuf.Message, SwiftProtobuf._Mes if lhs._payloadID != rhs._payloadID {return false} if lhs._size != rhs._size {return false} if lhs._id != rhs._id {return false} + if lhs._isSensitiveText != rhs._isSensitiveText {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1146,9 +1710,136 @@ extension Sharing_Nearby_WifiCredentialsMetadata.SecurityType: SwiftProtobuf._Pr 1: .same(proto: "OPEN"), 2: .same(proto: "WPA_PSK"), 3: .same(proto: "WEP"), + 4: .same(proto: "SAE"), ] } +extension Sharing_Nearby_AppMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AppMetadata" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "app_name"), + 2: .same(proto: "size"), + 3: .standard(proto: "payload_id"), + 4: .same(proto: "id"), + 5: .standard(proto: "file_name"), + 6: .standard(proto: "file_size"), + 7: .standard(proto: "package_name"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self._appName) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self._size) }() + case 3: try { try decoder.decodeRepeatedInt64Field(value: &self.payloadID) }() + case 4: try { try decoder.decodeSingularInt64Field(value: &self._id) }() + case 5: try { try decoder.decodeRepeatedStringField(value: &self.fileName) }() + case 6: try { try decoder.decodeRepeatedInt64Field(value: &self.fileSize) }() + case 7: try { try decoder.decodeSingularStringField(value: &self._packageName) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._appName { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } }() + try { if let v = self._size { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 2) + } }() + if !self.payloadID.isEmpty { + try visitor.visitPackedInt64Field(value: self.payloadID, fieldNumber: 3) + } + try { if let v = self._id { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 4) + } }() + if !self.fileName.isEmpty { + try visitor.visitRepeatedStringField(value: self.fileName, fieldNumber: 5) + } + if !self.fileSize.isEmpty { + try visitor.visitPackedInt64Field(value: self.fileSize, fieldNumber: 6) + } + try { if let v = self._packageName { + try visitor.visitSingularStringField(value: v, fieldNumber: 7) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_AppMetadata, rhs: Sharing_Nearby_AppMetadata) -> Bool { + if lhs._appName != rhs._appName {return false} + if lhs._size != rhs._size {return false} + if lhs.payloadID != rhs.payloadID {return false} + if lhs._id != rhs._id {return false} + if lhs.fileName != rhs.fileName {return false} + if lhs.fileSize != rhs.fileSize {return false} + if lhs._packageName != rhs._packageName {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Sharing_Nearby_StreamMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".StreamMetadata" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .standard(proto: "package_name"), + 3: .standard(proto: "payload_id"), + 4: .standard(proto: "attributed_app_name"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularStringField(value: &self._description_p) }() + case 2: try { try decoder.decodeSingularStringField(value: &self._packageName) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self._payloadID) }() + case 4: try { try decoder.decodeSingularStringField(value: &self._attributedAppName) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._description_p { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } }() + try { if let v = self._packageName { + try visitor.visitSingularStringField(value: v, fieldNumber: 2) + } }() + try { if let v = self._payloadID { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 3) + } }() + try { if let v = self._attributedAppName { + try visitor.visitSingularStringField(value: v, fieldNumber: 4) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_StreamMetadata, rhs: Sharing_Nearby_StreamMetadata) -> Bool { + if lhs._description_p != rhs._description_p {return false} + if lhs._packageName != rhs._packageName {return false} + if lhs._payloadID != rhs._payloadID {return false} + if lhs._attributedAppName != rhs._attributedAppName {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Sharing_Nearby_Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Frame" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -1207,58 +1898,108 @@ extension Sharing_Nearby_V1Frame: SwiftProtobuf.Message, SwiftProtobuf._MessageI 4: .standard(proto: "paired_key_encryption"), 5: .standard(proto: "paired_key_result"), 6: .standard(proto: "certificate_info"), + 7: .standard(proto: "progress_update"), ] + fileprivate class _StorageClass { + var _type: Sharing_Nearby_V1Frame.FrameType? = nil + var _introduction: Sharing_Nearby_IntroductionFrame? = nil + var _connectionResponse: Sharing_Nearby_ConnectionResponseFrame? = nil + var _pairedKeyEncryption: Sharing_Nearby_PairedKeyEncryptionFrame? = nil + var _pairedKeyResult: Sharing_Nearby_PairedKeyResultFrame? = nil + var _certificateInfo: Sharing_Nearby_CertificateInfoFrame? = nil + var _progressUpdate: Sharing_Nearby_ProgressUpdateFrame? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _introduction = source._introduction + _connectionResponse = source._connectionResponse + _pairedKeyEncryption = source._pairedKeyEncryption + _pairedKeyResult = source._pairedKeyResult + _certificateInfo = source._certificateInfo + _progressUpdate = source._progressUpdate + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._introduction) }() - case 3: try { try decoder.decodeSingularMessageField(value: &self._connectionResponse) }() - case 4: try { try decoder.decodeSingularMessageField(value: &self._pairedKeyEncryption) }() - case 5: try { try decoder.decodeSingularMessageField(value: &self._pairedKeyResult) }() - case 6: try { try decoder.decodeSingularMessageField(value: &self._certificateInfo) }() - default: break + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &_storage._type) }() + case 2: try { try decoder.decodeSingularMessageField(value: &_storage._introduction) }() + case 3: try { try decoder.decodeSingularMessageField(value: &_storage._connectionResponse) }() + case 4: try { try decoder.decodeSingularMessageField(value: &_storage._pairedKeyEncryption) }() + case 5: try { try decoder.decodeSingularMessageField(value: &_storage._pairedKeyResult) }() + case 6: try { try decoder.decodeSingularMessageField(value: &_storage._certificateInfo) }() + case 7: try { try decoder.decodeSingularMessageField(value: &_storage._progressUpdate) }() + default: break + } } } } func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - try { if let v = self._type { - try visitor.visitSingularEnumField(value: v, fieldNumber: 1) - } }() - try { if let v = self._introduction { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try { if let v = self._connectionResponse { - try visitor.visitSingularMessageField(value: v, fieldNumber: 3) - } }() - try { if let v = self._pairedKeyEncryption { - try visitor.visitSingularMessageField(value: v, fieldNumber: 4) - } }() - try { if let v = self._pairedKeyResult { - try visitor.visitSingularMessageField(value: v, fieldNumber: 5) - } }() - try { if let v = self._certificateInfo { - try visitor.visitSingularMessageField(value: v, fieldNumber: 6) - } }() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = _storage._type { + try visitor.visitSingularEnumField(value: v, fieldNumber: 1) + } }() + try { if let v = _storage._introduction { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try { if let v = _storage._connectionResponse { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } }() + try { if let v = _storage._pairedKeyEncryption { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } }() + try { if let v = _storage._pairedKeyResult { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } }() + try { if let v = _storage._certificateInfo { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } }() + try { if let v = _storage._progressUpdate { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } }() + } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Sharing_Nearby_V1Frame, rhs: Sharing_Nearby_V1Frame) -> Bool { - if lhs._type != rhs._type {return false} - if lhs._introduction != rhs._introduction {return false} - if lhs._connectionResponse != rhs._connectionResponse {return false} - if lhs._pairedKeyEncryption != rhs._pairedKeyEncryption {return false} - if lhs._pairedKeyResult != rhs._pairedKeyResult {return false} - if lhs._certificateInfo != rhs._certificateInfo {return false} + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in + let _storage = _args.0 + let rhs_storage = _args.1 + if _storage._type != rhs_storage._type {return false} + if _storage._introduction != rhs_storage._introduction {return false} + if _storage._connectionResponse != rhs_storage._connectionResponse {return false} + if _storage._pairedKeyEncryption != rhs_storage._pairedKeyEncryption {return false} + if _storage._pairedKeyResult != rhs_storage._pairedKeyResult {return false} + if _storage._certificateInfo != rhs_storage._certificateInfo {return false} + if _storage._progressUpdate != rhs_storage._progressUpdate {return false} + return true + } + if !storagesAreEqual {return false} + } if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1273,6 +2014,7 @@ extension Sharing_Nearby_V1Frame.FrameType: SwiftProtobuf._ProtoNameProviding { 4: .same(proto: "PAIRED_KEY_RESULT"), 5: .same(proto: "CERTIFICATE_INFO"), 6: .same(proto: "CANCEL"), + 7: .same(proto: "PROGRESS_UPDATE"), ] } @@ -1283,6 +2025,11 @@ extension Sharing_Nearby_IntroductionFrame: SwiftProtobuf.Message, SwiftProtobuf 2: .standard(proto: "text_metadata"), 3: .standard(proto: "required_package"), 4: .standard(proto: "wifi_credentials_metadata"), + 5: .standard(proto: "app_metadata"), + 6: .standard(proto: "start_transfer"), + 7: .standard(proto: "stream_metadata"), + 8: .standard(proto: "use_case"), + 9: .standard(proto: "preview_payload_ids"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1295,6 +2042,11 @@ extension Sharing_Nearby_IntroductionFrame: SwiftProtobuf.Message, SwiftProtobuf case 2: try { try decoder.decodeRepeatedMessageField(value: &self.textMetadata) }() case 3: try { try decoder.decodeSingularStringField(value: &self._requiredPackage) }() case 4: try { try decoder.decodeRepeatedMessageField(value: &self.wifiCredentialsMetadata) }() + case 5: try { try decoder.decodeRepeatedMessageField(value: &self.appMetadata) }() + case 6: try { try decoder.decodeSingularBoolField(value: &self._startTransfer) }() + case 7: try { try decoder.decodeRepeatedMessageField(value: &self.streamMetadata) }() + case 8: try { try decoder.decodeSingularEnumField(value: &self._useCase) }() + case 9: try { try decoder.decodeRepeatedInt64Field(value: &self.previewPayloadIds) }() default: break } } @@ -1317,6 +2069,21 @@ extension Sharing_Nearby_IntroductionFrame: SwiftProtobuf.Message, SwiftProtobuf if !self.wifiCredentialsMetadata.isEmpty { try visitor.visitRepeatedMessageField(value: self.wifiCredentialsMetadata, fieldNumber: 4) } + if !self.appMetadata.isEmpty { + try visitor.visitRepeatedMessageField(value: self.appMetadata, fieldNumber: 5) + } + try { if let v = self._startTransfer { + try visitor.visitSingularBoolField(value: v, fieldNumber: 6) + } }() + if !self.streamMetadata.isEmpty { + try visitor.visitRepeatedMessageField(value: self.streamMetadata, fieldNumber: 7) + } + try { if let v = self._useCase { + try visitor.visitSingularEnumField(value: v, fieldNumber: 8) + } }() + if !self.previewPayloadIds.isEmpty { + try visitor.visitRepeatedInt64Field(value: self.previewPayloadIds, fieldNumber: 9) + } try unknownFields.traverse(visitor: &visitor) } @@ -1325,6 +2092,61 @@ extension Sharing_Nearby_IntroductionFrame: SwiftProtobuf.Message, SwiftProtobuf if lhs.textMetadata != rhs.textMetadata {return false} if lhs._requiredPackage != rhs._requiredPackage {return false} if lhs.wifiCredentialsMetadata != rhs.wifiCredentialsMetadata {return false} + if lhs.appMetadata != rhs.appMetadata {return false} + if lhs._startTransfer != rhs._startTransfer {return false} + if lhs.streamMetadata != rhs.streamMetadata {return false} + if lhs._useCase != rhs._useCase {return false} + if lhs.previewPayloadIds != rhs.previewPayloadIds {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Sharing_Nearby_IntroductionFrame.SharingUseCase: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN"), + 1: .same(proto: "NEARBY_SHARE"), + 2: .same(proto: "REMOTE_COPY"), + ] +} + +extension Sharing_Nearby_ProgressUpdateFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ProgressUpdateFrame" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "progress"), + 2: .standard(proto: "start_transfer"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularFloatField(value: &self._progress) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self._startTransfer) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._progress { + try visitor.visitSingularFloatField(value: v, fieldNumber: 1) + } }() + try { if let v = self._startTransfer { + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_ProgressUpdateFrame, rhs: Sharing_Nearby_ProgressUpdateFrame) -> Bool { + if lhs._progress != rhs._progress {return false} + if lhs._startTransfer != rhs._startTransfer {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1334,6 +2156,8 @@ extension Sharing_Nearby_ConnectionResponseFrame: SwiftProtobuf.Message, SwiftPr static let protoMessageName: String = _protobuf_package + ".ConnectionResponseFrame" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "status"), + 2: .standard(proto: "attachment_details"), + 3: .standard(proto: "stream_metadata"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1343,6 +2167,8 @@ extension Sharing_Nearby_ConnectionResponseFrame: SwiftProtobuf.Message, SwiftPr // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularEnumField(value: &self._status) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.attachmentDetails) }() + case 3: try { try decoder.decodeRepeatedMessageField(value: &self.streamMetadata) }() default: break } } @@ -1356,11 +2182,19 @@ extension Sharing_Nearby_ConnectionResponseFrame: SwiftProtobuf.Message, SwiftPr try { if let v = self._status { try visitor.visitSingularEnumField(value: v, fieldNumber: 1) } }() + if !self.attachmentDetails.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.attachmentDetails, fieldNumber: 2) + } + if !self.streamMetadata.isEmpty { + try visitor.visitRepeatedMessageField(value: self.streamMetadata, fieldNumber: 3) + } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Sharing_Nearby_ConnectionResponseFrame, rhs: Sharing_Nearby_ConnectionResponseFrame) -> Bool { if lhs._status != rhs._status {return false} + if lhs.attachmentDetails != rhs.attachmentDetails {return false} + if lhs.streamMetadata != rhs.streamMetadata {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1377,12 +2211,188 @@ extension Sharing_Nearby_ConnectionResponseFrame.Status: SwiftProtobuf._ProtoNam ] } +extension Sharing_Nearby_AttachmentDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AttachmentDetails" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .standard(proto: "file_attachment_details"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularEnumField(value: &self._type) }() + case 2: try { try decoder.decodeSingularMessageField(value: &self._fileAttachmentDetails) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._type { + try visitor.visitSingularEnumField(value: v, fieldNumber: 1) + } }() + try { if let v = self._fileAttachmentDetails { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_AttachmentDetails, rhs: Sharing_Nearby_AttachmentDetails) -> Bool { + if lhs._type != rhs._type {return false} + if lhs._fileAttachmentDetails != rhs._fileAttachmentDetails {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Sharing_Nearby_AttachmentDetails.TypeEnum: SwiftProtobuf._ProtoNameProviding { + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "UNKNOWN"), + 1: .same(proto: "FILE"), + 2: .same(proto: "TEXT"), + 3: .same(proto: "WIFI_CREDENTIALS"), + 4: .same(proto: "APP"), + 5: .same(proto: "STREAM"), + ] +} + +extension Sharing_Nearby_FileAttachmentDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".FileAttachmentDetails" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "receiver_existing_file_size"), + 2: .standard(proto: "attachment_hash_payloads"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self._receiverExistingFileSize) }() + case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: &self.attachmentHashPayloads) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._receiverExistingFileSize { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 1) + } }() + if !self.attachmentHashPayloads.isEmpty { + try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMessageMap.self, value: self.attachmentHashPayloads, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_FileAttachmentDetails, rhs: Sharing_Nearby_FileAttachmentDetails) -> Bool { + if lhs._receiverExistingFileSize != rhs._receiverExistingFileSize {return false} + if lhs.attachmentHashPayloads != rhs.attachmentHashPayloads {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Sharing_Nearby_PayloadsDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PayloadsDetails" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "payload_details"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeRepeatedMessageField(value: &self.payloadDetails) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if !self.payloadDetails.isEmpty { + try visitor.visitRepeatedMessageField(value: self.payloadDetails, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_PayloadsDetails, rhs: Sharing_Nearby_PayloadsDetails) -> Bool { + if lhs.payloadDetails != rhs.payloadDetails {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension Sharing_Nearby_PayloadDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".PayloadDetails" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .standard(proto: "creation_timestamp_millis"), + 3: .same(proto: "size"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularInt64Field(value: &self._id) }() + case 2: try { try decoder.decodeSingularInt64Field(value: &self._creationTimestampMillis) }() + case 3: try { try decoder.decodeSingularInt64Field(value: &self._size) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._id { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 1) + } }() + try { if let v = self._creationTimestampMillis { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 2) + } }() + try { if let v = self._size { + try visitor.visitSingularInt64Field(value: v, fieldNumber: 3) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_PayloadDetails, rhs: Sharing_Nearby_PayloadDetails) -> Bool { + if lhs._id != rhs._id {return false} + if lhs._creationTimestampMillis != rhs._creationTimestampMillis {return false} + if lhs._size != rhs._size {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + extension Sharing_Nearby_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".PairedKeyEncryptionFrame" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "signed_data"), 2: .standard(proto: "secret_id_hash"), 3: .standard(proto: "optional_signed_data"), + 4: .standard(proto: "qr_code_handshake_data"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1394,6 +2404,7 @@ extension Sharing_Nearby_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftP case 1: try { try decoder.decodeSingularBytesField(value: &self._signedData) }() case 2: try { try decoder.decodeSingularBytesField(value: &self._secretIDHash) }() case 3: try { try decoder.decodeSingularBytesField(value: &self._optionalSignedData) }() + case 4: try { try decoder.decodeSingularBytesField(value: &self._qrCodeHandshakeData) }() default: break } } @@ -1413,6 +2424,9 @@ extension Sharing_Nearby_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftP try { if let v = self._optionalSignedData { try visitor.visitSingularBytesField(value: v, fieldNumber: 3) } }() + try { if let v = self._qrCodeHandshakeData { + try visitor.visitSingularBytesField(value: v, fieldNumber: 4) + } }() try unknownFields.traverse(visitor: &visitor) } @@ -1420,6 +2434,7 @@ extension Sharing_Nearby_PairedKeyEncryptionFrame: SwiftProtobuf.Message, SwiftP if lhs._signedData != rhs._signedData {return false} if lhs._secretIDHash != rhs._secretIDHash {return false} if lhs._optionalSignedData != rhs._optionalSignedData {return false} + if lhs._qrCodeHandshakeData != rhs._qrCodeHandshakeData {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1429,6 +2444,7 @@ extension Sharing_Nearby_PairedKeyResultFrame: SwiftProtobuf.Message, SwiftProto static let protoMessageName: String = _protobuf_package + ".PairedKeyResultFrame" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "status"), + 2: .standard(proto: "os_type"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1438,6 +2454,7 @@ extension Sharing_Nearby_PairedKeyResultFrame: SwiftProtobuf.Message, SwiftProto // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularEnumField(value: &self._status) }() + case 2: try { try decoder.decodeSingularEnumField(value: &self._osType) }() default: break } } @@ -1451,11 +2468,15 @@ extension Sharing_Nearby_PairedKeyResultFrame: SwiftProtobuf.Message, SwiftProto try { if let v = self._status { try visitor.visitSingularEnumField(value: v, fieldNumber: 1) } }() + try { if let v = self._osType { + try visitor.visitSingularEnumField(value: v, fieldNumber: 2) + } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: Sharing_Nearby_PairedKeyResultFrame, rhs: Sharing_Nearby_PairedKeyResultFrame) -> Bool { if lhs._status != rhs._status {return false} + if lhs._osType != rhs._osType {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -1615,3 +2636,39 @@ extension Sharing_Nearby_WifiCredentials: SwiftProtobuf.Message, SwiftProtobuf._ return true } } + +extension Sharing_Nearby_StreamDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".StreamDetails" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "input_stream_parcel_file_descriptor_bytes"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every case branch when no optimizations are + // enabled. https://github.com/apple/swift-protobuf/issues/1034 + switch fieldNumber { + case 1: try { try decoder.decodeSingularBytesField(value: &self._inputStreamParcelFileDescriptorBytes) }() + default: break + } + } + } + + func traverse(visitor: inout V) throws { + // The use of inline closures is to circumvent an issue where the compiler + // allocates stack space for every if/case branch local when no optimizations + // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and + // https://github.com/apple/swift-protobuf/issues/1182 + try { if let v = self._inputStreamParcelFileDescriptorBytes { + try visitor.visitSingularBytesField(value: v, fieldNumber: 1) + } }() + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: Sharing_Nearby_StreamDetails, rhs: Sharing_Nearby_StreamDetails) -> Bool { + if lhs._inputStreamParcelFileDescriptorBytes != rhs._inputStreamParcelFileDescriptorBytes {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} diff --git a/NearbyShare/Model/ProtobufSource/offline_wire_formats.proto b/NearbyShare/Model/ProtobufSource/offline_wire_formats.proto index c112004..afd0ed7 100644 --- a/NearbyShare/Model/ProtobufSource/offline_wire_formats.proto +++ b/NearbyShare/Model/ProtobufSource/offline_wire_formats.proto @@ -16,6 +16,8 @@ syntax = "proto2"; package location.nearby.connections; +// import "storage/datapol/annotations/proto/semantic_annotations.proto"; + option optimize_for = LITE_RUNTIME; option java_outer_classname = "OfflineWireFormatsProto"; option java_package = "com.google.location.nearby.connections.proto"; @@ -43,6 +45,11 @@ message V1Frame { KEEP_ALIVE = 5; DISCONNECTION = 6; PAIRED_KEY_ENCRYPTION = 7; + AUTHENTICATION_MESSAGE = 8; + AUTHENTICATION_RESULT = 9; + AUTO_RESUME = 10; + AUTO_RECONNECT = 11; + BANDWIDTH_UPGRADE_RETRY = 12; } optional FrameType type = 1; @@ -54,6 +61,11 @@ message V1Frame { optional KeepAliveFrame keep_alive = 6; optional DisconnectionFrame disconnection = 7; optional PairedKeyEncryptionFrame paired_key_encryption = 8; + optional AuthenticationMessageFrame authentication_message = 9; + optional AuthenticationResultFrame authentication_result = 10; + optional AutoResumeFrame auto_resume = 11; + optional AutoReconnectFrame auto_reconnect = 12; + optional BandwidthUpgradeRetryFrame bandwidth_upgrade_retry = 13; } message ConnectionRequestFrame { @@ -72,6 +84,15 @@ message ConnectionRequestFrame { WEB_RTC = 9; BLE_L2CAP = 10; USB = 11; + WEB_RTC_NON_CELLULAR = 12; + AWDL = 13; + } + // LINT.ThenChange(//depot/google3/third_party/nearby/proto/connections_enums.proto) + + // LINT.IfChange + enum ConnectionMode { + LEGACY = 0; + INSTANT = 1; } // LINT.ThenChange(//depot/google3/third_party/nearby/proto/connections_enums.proto) @@ -91,9 +112,16 @@ message ConnectionRequestFrame { optional int32 keep_alive_interval_millis = 8; optional int32 keep_alive_timeout_millis = 9; // The type of {@link Device} object. - optional int32 device_type = 10 [default = 0]; + optional int32 device_type = 10 [default = 0, deprecated = true]; // The bytes of serialized {@link Device} object. - optional bytes device_info = 11; + optional bytes device_info = 11 [deprecated = true]; + // Represents the {@link Device} that invokes the request. + oneof Device { + ConnectionsDevice connections_device = 12; + PresenceDevice presence_device = 13; + } + optional ConnectionMode connection_mode = 14; + optional LocationHint location_hint = 15; } message ConnectionResponseFrame { @@ -125,7 +153,10 @@ message ConnectionResponseFrame { // means bt supports multiplex while 0x00 means not. Refer to ClientProxy.java // for the bit usages. optional int32 multiplex_socket_bitmask = 5; - optional int32 nearby_connections_version = 6; + optional int32 nearby_connections_version = 6 [deprecated = true]; + optional int32 safe_to_disconnect_version = 7; + optional LocationHint location_hint = 8; + optional int32 keep_alive_timeout_millis = 9; } message PayloadTransferFrame { @@ -133,6 +164,7 @@ message PayloadTransferFrame { UNKNOWN_PACKET_TYPE = 0; DATA = 1; CONTROL = 2; + PAYLOAD_ACK = 3; } message PayloadHeader { @@ -148,6 +180,8 @@ message PayloadTransferFrame { optional bool is_sensitive = 4; optional string file_name = 5; optional string parent_folder = 6; + // Time since the epoch in milliseconds. + optional int64 last_modified_timestamp_millis = 7; } // Accompanies DATA packets. @@ -158,6 +192,7 @@ message PayloadTransferFrame { optional int32 flags = 1; optional int64 offset = 2; optional bytes body = 3; + optional int32 index = 4; } // Accompanies CONTROL packets. @@ -166,7 +201,8 @@ message PayloadTransferFrame { UNKNOWN_EVENT_TYPE = 0; PAYLOAD_ERROR = 1; PAYLOAD_CANCELED = 2; - PAYLOAD_RECEIVED_ACK = 3; + // Use PacketType.PAYLOAD_ACK instead + PAYLOAD_RECEIVED_ACK = 3 [deprecated = true]; } optional EventType event = 1; @@ -190,6 +226,9 @@ message BandwidthUpgradeNegotiationFrame { CLIENT_INTRODUCTION = 4; UPGRADE_FAILURE = 5; CLIENT_INTRODUCTION_ACK = 6; + // The event type that requires the remote device to send the available + // upgrade path. + UPGRADE_PATH_REQUEST = 7; } // Accompanies UPGRADE_PATH_AVAILABLE and UPGRADE_FAILURE events. @@ -208,12 +247,15 @@ message BandwidthUpgradeNegotiationFrame { WEB_RTC = 9; // 10 is reserved. USB = 11; + WEB_RTC_NON_CELLULAR = 12; + AWDL = 13; } // Accompanies Medium.WIFI_HOTSPOT. message WifiHotspotCredentials { optional string ssid = 1; - optional string password = 2; + optional string password = 2 + /* type = ST_ACCOUNT_CREDENTIAL */; optional int32 port = 3; optional string gateway = 4 [default = "0.0.0.0"]; // This field can be a band or frequency @@ -236,16 +278,22 @@ message BandwidthUpgradeNegotiationFrame { message WifiAwareCredentials { optional string service_id = 1; optional bytes service_info = 2; - optional string password = 3; + optional string password = 3 + /* type = ST_ACCOUNT_CREDENTIAL */; } // Accompanies Medium.WIFI_DIRECT. message WifiDirectCredentials { optional string ssid = 1; - optional string password = 2; + optional string password = 2 + /* type = ST_ACCOUNT_CREDENTIAL */; optional int32 port = 3; optional int32 frequency = 4; optional string gateway = 5 [default = "0.0.0.0"]; + // IPv6 link-local address, network order (128bits). + // The GO should listen on both IPv4 and IPv6 addresses. + // https://en.wikipedia.org/wiki/Link-local_address#IPv6 + optional bytes ip_v6_address = 6; } // Accompanies Medium.WEB_RTC @@ -254,6 +302,20 @@ message BandwidthUpgradeNegotiationFrame { optional LocationHint location_hint = 2; } + // Accompanies Medium.AWDL. + message AwdlCredentials { + optional string service_name = 1; + optional string service_type = 2; + optional string password = 3 + /* type = ST_ACCOUNT_CREDENTIAL */; + } + + message UpgradePathRequest { + // Supported mediums on the advertiser device. + repeated Medium mediums = 1 [packed = true]; + optional MediumMetadata medium_meta_data = 2; + } + optional Medium medium = 1; // Exactly one of the following fields will be set. @@ -263,18 +325,27 @@ message BandwidthUpgradeNegotiationFrame { optional WifiAwareCredentials wifi_aware_credentials = 5; optional WifiDirectCredentials wifi_direct_credentials = 6; optional WebRtcCredentials web_rtc_credentials = 8; + optional AwdlCredentials awdl_credentials = 11; // Disable Encryption for this upgrade medium to improve throughput. optional bool supports_disabling_encryption = 7; // An ack will be sent after the CLIENT_INTRODUCTION frame. optional bool supports_client_introduction_ack = 9; + + optional UpgradePathRequest upgrade_path_request = 10; + } + + // Accompanies SAFE_TO_CLOSE_PRIOR_CHANNEL events. + message SafeToClosePriorChannel { + optional int32 sta_frequency = 1; } // Accompanies CLIENT_INTRODUCTION events. message ClientIntroduction { optional string endpoint_id = 1; optional bool supports_disabling_encryption = 2; + optional string last_endpoint_id = 3; } // Accompanies CLIENT_INTRODUCTION_ACK events. @@ -286,11 +357,44 @@ message BandwidthUpgradeNegotiationFrame { optional UpgradePathInfo upgrade_path_info = 2; optional ClientIntroduction client_introduction = 3; optional ClientIntroductionAck client_introduction_ack = 4; + optional SafeToClosePriorChannel safe_to_close_prior_channel = 5; +} + +message BandwidthUpgradeRetryFrame { + // Should always match cs/symbol:location.nearby.proto.connections.Medium + // LINT.IfChange + enum Medium { + UNKNOWN_MEDIUM = 0; + // 1 is reserved. + 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; + AWDL = 13; + } + // LINT.ThenChange(//depot/google3/third_party/nearby/proto/connections_enums.proto) + + // The mediums this device supports upgrading to. This list should be filtered + // by both the strategy and this device's individual limitations. + repeated Medium supported_medium = 1; + + // If true, expect the remote endpoint to send back the latest + // supported_medium. + optional bool is_request = 2; } message KeepAliveFrame { // And ack will be sent after receiving KEEP_ALIVE frame. optional bool ack = 1; + // The sequence number + optional uint32 seq_num = 2; } // Informs the remote side to immediately severe the socket connection. @@ -313,6 +417,45 @@ message PairedKeyEncryptionFrame { optional bytes signed_data = 1; } +// Nearby Connections authentication frame, contains the bytes format of a +// DeviceProvider's authentication message. +message AuthenticationMessageFrame { + // An auth message generated by DeviceProvider. + // To be sent to the remote device for verification during connection setups. + optional bytes auth_message = 1; +} + +// Nearby Connections authentication result frame. +message AuthenticationResultFrame { + // The authentication result. Non null if this frame is used to exchange + // authentication result. + optional int32 result = 1; +} + +message AutoResumeFrame { + enum EventType { + UNKNOWN_AUTO_RESUME_EVENT_TYPE = 0; + PAYLOAD_RESUME_TRANSFER_START = 1; + PAYLOAD_RESUME_TRANSFER_ACK = 2; + } + + optional EventType event_type = 1; + optional int64 pending_payload_id = 2; + optional int32 next_payload_chunk_index = 3; + optional int32 version = 4; +} + +message AutoReconnectFrame { + enum EventType { + UNKNOWN_EVENT_TYPE = 0; + CLIENT_INTRODUCTION = 1; + CLIENT_INTRODUCTION_ACK = 2; + } + optional string endpoint_id = 1; + optional EventType event_type = 2; + optional string last_endpoint_id = 3; +} + message MediumMetadata { // True if local device supports 5GHz. optional bool supports_5_ghz = 1; @@ -338,6 +481,8 @@ message MediumMetadata { optional WifiAwareUsableChannels wifi_aware_usable_channels = 10; // Usable WiFi Hotspot STA channels on the local device. optional WifiHotspotStaUsableChannels wifi_hotspot_sta_usable_channels = 11; + // The supported medium roles. + optional MediumRole medium_role = 12; } // Available channels on the local device. @@ -365,6 +510,18 @@ message WifiHotspotStaUsableChannels { repeated int32 channels = 1 [packed = true]; } +// The medium roles. +message MediumRole { + optional bool support_wifi_direct_group_owner = 1; + optional bool support_wifi_direct_group_client = 2; + optional bool support_wifi_hotspot_host = 3; + optional bool support_wifi_hotspot_client = 4; + optional bool support_wifi_aware_publisher = 5; + optional bool support_wifi_aware_subscriber = 6; + optional bool support_awdl_publisher = 7; + optional bool support_awdl_subscriber = 8; +} + // LocationHint is used to specify a location as well as format. message LocationHint { // Location is the location, provided in the format specified by format. @@ -401,3 +558,39 @@ message OsInfo { optional OsType type = 1; } + +enum EndpointType { + UNKNOWN_ENDPOINT = 0; + CONNECTIONS_ENDPOINT = 1; + PRESENCE_ENDPOINT = 2; +} + +message ConnectionsDevice { + optional string endpoint_id = 1; + optional EndpointType endpoint_type = 2; + optional bytes connectivity_info_list = 3; // Data Elements. + optional bytes endpoint_info = 4; +} + +message PresenceDevice { + enum DeviceType { + UNKNOWN = 0; + PHONE = 1; + TABLET = 2; + DISPLAY = 3; + LAPTOP = 4; + TV = 5; + WATCH = 6; + } + + optional string endpoint_id = 1; + optional EndpointType endpoint_type = 2; + optional bytes connectivity_info_list = 3; // Data Elements. + optional int64 device_id = 4; + optional string device_name = 5; + optional DeviceType device_type = 6; + optional string device_image_url = 7; + repeated ConnectionRequestFrame.Medium discovery_medium = 8 [packed = true]; + repeated int32 actions = 9 [packed = true]; + repeated int64 identity_type = 10 [packed = true]; +} diff --git a/NearbyShare/Model/ProtobufSource/sharing_enums.proto b/NearbyShare/Model/ProtobufSource/sharing_enums.proto new file mode 100644 index 0000000..e0e227c --- /dev/null +++ b/NearbyShare/Model/ProtobufSource/sharing_enums.proto @@ -0,0 +1,962 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package location.nearby.proto.sharing; + +// import "logs/proto/logs_annotations/logs_annotations.proto"; +// import "logs/proto/wireless/beto/beto_enums.proto"; +// import "logs/proto/wireless/beto/log_dimension_annotations.proto"; + +// option (logs_proto.file_not_used_for_logging_except_enums) = true; +option optimize_for = LITE_RUNTIME; +option java_package = "com.google.location.nearby.proto"; +option java_outer_classname = "SharingEnums"; +option objc_class_prefix = "GNSHP"; + +// We use event based logging (an event object can be constructed and logged +// immediately when they occur). To obtain session based information (e.g. +// durations, counting incoming introductions), we use flowId (sender/receiver) +// in NearbyClearcutLogger (for android, or clearcut_event_logger as the +// equivalence for Windows) for all events (may exclude settings), and +// session_id for a pair of events (start and end of a session). +// Next id: 74 +enum EventType { + UNKNOWN_EVENT_TYPE = 0; + + // LINT.IfChange(EventType) + + // When new users accept agreements (like grant permission to contacts for + // CONTACT_ONLY visibility) and are enrolled into Nearby Sharing. This event + // is used to count number of new users. + ACCEPT_AGREEMENTS = 1; + + // User enables/disables nearby sharing from setting or tile service. + ENABLE_NEARBY_SHARING = 2; + + // User sets visibility preference from setting. + SET_VISIBILITY = 3; + + // Describe attachments immediately when Nearby Sharing is opened by another + // app which is used to generate/attach attachments to be shared with other + // devices. + DESCRIBE_ATTACHMENTS = 4 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // Start of a scanning phase at sender. + SCAN_FOR_SHARE_TARGETS_START = 5 /*[[*/ + /*( device_role = DEVICE_ROLE_INITIATOR, )*/ + /*( stage = STAGE_QS_DISCOVER_START )*/ + /*]]*/; + + // End of the scanning phase at sender. + SCAN_FOR_SHARE_TARGETS_END = 6 /*[[*/ + /*( device_role = DEVICE_ROLE_INITIATOR, )*/ + /*( stage = STAGE_QS_DISCOVER_END )*/ + /*]]*/; + + // Receiver advertises itself for presence (a pseudo session). + ADVERTISE_DEVICE_PRESENCE_START = 7 /*[[*/ + /*( device_role = DEVICE_ROLE_REMOTE, )*/ + /*( stage = STAGE_QS_ADVERTISE_START )*/ + /*]]*/; + + // End of the advertising phase at receiver. + ADVERTISE_DEVICE_PRESENCE_END = 8 /*[[*/ + /*( device_role = DEVICE_ROLE_REMOTE, )*/ + /*( stage = STAGE_QS_ADVERTISE_END )*/ + /*]]*/; + + // Sender sends a fast initialization to receiver. + SEND_FAST_INITIALIZATION = 9 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // Receiver receives the fast initialization. + RECEIVE_FAST_INITIALIZATION = 10 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Sender discovers a share target. + DISCOVER_SHARE_TARGET = 11 /*[[*/ + /*( device_role = DEVICE_ROLE_INITIATOR, )*/ + /*( stage = STAGE_QS_DISCOVERED )*/ + /*]]*/; + + // Sender sends introduction (before attachments being sent). + SEND_INTRODUCTION = 12 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // Receiver receives introduction. + RECEIVE_INTRODUCTION = 13 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Receiver responds to introduction (before attachments being sent). + // Actions: Accept, Reject, or (for some reason) Fail. + RESPOND_TO_INTRODUCTION = 14 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Start of the sending attachments phase at sender. + SEND_ATTACHMENTS_START = 15 /*[[*/ + /*( device_role = DEVICE_ROLE_INITIATOR, )*/ + /*( stage = STAGE_QS_TRANSFER_START )*/ + /*]]*/; + + // End of sending attachments phase at sender. + SEND_ATTACHMENTS_END = 16 /*[[*/ + /*( device_role = DEVICE_ROLE_INITIATOR, )*/ + /*( stage = STAGE_QS_TRANSFER_END )*/ + /*]]*/; + + // Start of the receiving attachments phase at receiver. + RECEIVE_ATTACHMENTS_START = 17 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // End of receiving attachments phase at receiver. + RECEIVE_ATTACHMENTS_END = 18 /*[[*/ + /*( device_role = DEVICE_ROLE_REMOTE, )*/ + /*( stage = STAGE_QS_TRANSFER_END )*/ + /*]]*/; + + // Sender cancels sending attachments. + CANCEL_SENDING_ATTACHMENTS = 19 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // Receiver cancels receiving attachments. + CANCEL_RECEIVING_ATTACHMENTS = 20 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Receiver opens received attachments. + OPEN_RECEIVED_ATTACHMENTS = 21 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // User opens the setup activity. + LAUNCH_SETUP_ACTIVITY = 22 [deprecated = true]; + + // User adds a contact. + ADD_CONTACT = 23; + + // User removes a contact. + REMOVE_CONTACT = 24; + + // Local devices all Fast Share server. + FAST_SHARE_SERVER_RESPONSE = 25; + + // The start of a sending session. + SEND_START = 26 /*[[*/ + /*( device_role = DEVICE_ROLE_INITIATOR, )*/ + /*( stage = STAGE_QS_CONNECT_START )*/ + /*]]*/; + + // Receiver accepts a fast initialization. + ACCEPT_FAST_INITIALIZATION = 27 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Set data usage preference. + SET_DATA_USAGE = 28; + + // Receiver dismisses a fast initialization + DISMISS_FAST_INITIALIZATION = 29 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Cancel connection. + CANCEL_CONNECTION = 30 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // User starts a chimera activity (e.g. ConsentsChimeraActivity, + // DeviceVisibilityChimeraActivity...) + LAUNCH_ACTIVITY = 31; + + // Receiver dismisses a privacy notification. + DISMISS_PRIVACY_NOTIFICATION = 32; + + // Receiver taps a privacy notification. + TAP_PRIVACY_NOTIFICATION = 33; + + // Receiver taps a help page. + TAP_HELP = 34; + + // Receiver taps a feedback. + TAP_FEEDBACK = 35; + + // Receiver adds quick settings tile. + ADD_QUICK_SETTINGS_TILE = 36; + + // Receiver removes quick settings tile. + REMOVE_QUICK_SETTINGS_TILE = 37; + + // Receiver phone consent clicked. + LAUNCH_PHONE_CONSENT = 38; + + // Devices show a phone consent banner in Nearby Share Settings + DISPLAY_PHONE_CONSENT = 54; + + // Receiver taps quick settings tile. + TAP_QUICK_SETTINGS_TILE = 39; + + // Receiver Installation of APKs status. + INSTALL_APK = 40 /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Receiver verification of APKs status. + VERIFY_APK = 41 /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // User starts a consent. + LAUNCH_CONSENT = 42; + + // After receiving payloads, Nearby Share still needs to transfer the payloads + // to correct attachment formats and move files attachments from temporary + // directory to final destination. + PROCESS_RECEIVED_ATTACHMENTS_END = 43 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Toggle Show Notification setting item in Nearby Share setting. + TOGGLE_SHOW_NOTIFICATION = 44; + + // Set device name + SET_DEVICE_NAME = 45; + + // users dropped off opt-in page. + DECLINE_AGREEMENTS = 46; + + // Request setting permissions (Wifi/BT/location/airplane mode). + REQUEST_SETTING_PERMISSIONS = 47; + + // Set up a connection with the remote device. + ESTABLISH_CONNECTION = 48 /*[ stage = STAGE_QS_CONNECT_END ]*/; + + // Track device states in Nearby Share setting. + DEVICE_SETTINGS = 49; + + // Receiver auto dismisses a fast initialization notification. + AUTO_DISMISS_FAST_INITIALIZATION = 50 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // App Crash event. + // Used only for Windows App now. + APP_CRASH = 51; + + // Sender taps the Send button in quick settings + TAP_QUICK_SETTINGS_FILE_SHARE = 52 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // Devices show a privacy notification + DISPLAY_PRIVACY_NOTIFICATION = 53; + + // Preference usage event (e.g. load/save preferences, etc). + // Used only for Windows App now. + PREFERENCES_USAGE = 55; + + // Default opt in + DEFAULT_OPT_IN = 56; + + // The result of the setup wizard flow + SETUP_WIZARD = 57; + + // Sender taps a QR code + TAP_QR_CODE = 58 /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // QR code link shown + QR_CODE_LINK_SHOWN = 59 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // Sender failed to parse endpoint id. + PARSING_FAILED_ENDPOINT_ID = 60 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // The device is discovered by fast initialization + FAST_INIT_DISCOVER_DEVICE = 61 + /*[ device_role = DEVICE_ROLE_REMOTE ]*/; + + // Send desktop notification. + SEND_DESKTOP_NOTIFICATION = 62; + + // User sets account preference + SET_ACCOUNT = 63; + + // Decrypt certificate failure + DECRYPT_CERTIFICATE_FAILURE = 64; + + // Show allow permission auto access UI + SHOW_ALLOW_PERMISSION_AUTO_ACCESS = 65 + /*[ device_role = DEVICE_ROLE_INITIATOR ]*/; + + // UI events for transferring files with desktop applications. It includes + // event types such as DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE. + SEND_DESKTOP_TRANSFER_EVENT = 66; + + // Show accept button on Quick Share receive UI + WAITING_FOR_ACCEPT = 67; + + // High quality event setup + HIGH_QUALITY_MEDIUM_SETUP = 68; + + // RPC call status + RPC_CALL_STATUS = 69; + + // A QR code sharing session has started + START_QR_CODE_SESSION = 70; + + // A QR code URL has been opened in a web client/browser instead of in a + // native Quick Share app. + QR_CODE_OPENED_IN_WEB_CLIENT = 71; + + // A HaTS survey session id has been joined with Quick Share flow id. + HATS_JOINT_EVENT = 72; + + // Previews received. + RECEIVE_PREVIEWS = 73; + + // LINT.ThenChange(//depot/google3/location/nearby/proto/nearby_event_codes.proto:SharingEventCode) +} + +// Event category to differentiate whether this comes from sender or receiver, +// whether this is for communication flow, or for settings. +enum EventCategory { + UNKNOWN_EVENT_CATEGORY = 0; + SENDING_EVENT = 1; + RECEIVING_EVENT = 2; + SETTINGS_EVENT = 3; + RPC_EVENT = 4; +} + +// Status of nearby sharing. +enum NearbySharingStatus { + UNKNOWN_NEARBY_SHARING_STATUS = 0; + + ON = 1; + OFF = 2; +} + +enum Visibility { + UNKNOWN_VISIBILITY = 0; + + CONTACTS_ONLY = 1; + EVERYONE = 2; + SELECTED_CONTACTS_ONLY = 3 [deprecated = true]; + HIDDEN = 4; + SELF_SHARE = 5; +} + +enum DataUsage { + UNKNOWN_DATA_USAGE = 0; + + ONLINE = 1; + WIFI_ONLY = 2; + OFFLINE = 3; +} + +// The status of establishing a connection. Used by ESTABLISH_CONNECTION. +enum EstablishConnectionStatus { + CONNECTION_STATUS_UNKNOWN = 0; + + CONNECTION_STATUS_SUCCESS = 1 + /*[ status_bucket = STATUS_SUCCESSFUL ]*/; + CONNECTION_STATUS_FAILURE = 2 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + CONNECTION_STATUS_CANCELLATION = 3 + /*[ status_bucket = STATUS_CANCELLED ]*/; + CONNECTION_STATUS_MEDIA_UNAVAILABLE_ATTACHMENT = 4 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + CONNECTION_STATUS_FAILED_PAIRED_KEYHANDSHAKE = 5 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + CONNECTION_STATUS_FAILED_WRITE_INTRODUCTION = 6 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + CONNECTION_STATUS_FAILED_NULL_CONNECTION = 7 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + CONNECTION_STATUS_FAILED_NO_TRANSFER_UPDATE_CALLBACK = 8 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + CONNECTION_STATUS_LOST_CONNECTIVITY = 9 + /*[ status_bucket = STATUS_INTERRUPTION ]*/; + // TODO: b/341782941 - : Annote this status when it's confirmed by Nearby + // Connections team. + CONNECTION_STATUS_INVALID_ADVERTISEMENT = 10; +} + +// The status of sending and receiving attachments. Used by SEND_ATTACHMENTS. +enum AttachmentTransmissionStatus { + UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS = 0; + COMPLETE_ATTACHMENT_TRANSMISSION_STATUS = 1 + /*[ status_bucket = STATUS_SUCCESSFUL ]*/; + CANCELED_ATTACHMENT_TRANSMISSION_STATUS = 2 + /*[ status_bucket = STATUS_CANCELLED ]*/; + FAILED_ATTACHMENT_TRANSMISSION_STATUS = 3 + /*[ status_bucket = STATUS_INTERNAL_ERROR ]*/; + REJECTED_ATTACHMENT = 4 [deprecated = true]; + TIMED_OUT_ATTACHMENT = 5 [deprecated = true]; + AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT = 6 [deprecated = true]; + NOT_ENOUGH_SPACE_ATTACHMENT = 7 [deprecated = true]; + FAILED_NO_TRANSFER_UPDATE_CALLBACK = 8 [deprecated = true]; + MEDIA_UNAVAILABLE_ATTACHMENT = 9 [deprecated = true]; + UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT = 10 [deprecated = true]; + NO_ATTACHMENT_FOUND = 11 [deprecated = true]; + FAILED_NO_SHARE_TARGET_ENDPOINT = 12 [deprecated = true]; + FAILED_PAIRED_KEYHANDSHAKE = 13 [deprecated = true]; + FAILED_NULL_CONNECTION = 14 [deprecated = true]; + FAILED_NO_PAYLOAD = 15 [deprecated = true]; + FAILED_WRITE_INTRODUCTION = 16 [deprecated = true]; + + // The remote response is either missing or has an unknown type. + FAILED_UNKNOWN_REMOTE_RESPONSE = 17 [deprecated = true]; + + // Breakdowns of FAILED_NULL_CONNECTION (Desktop side) + FAILED_NULL_CONNECTION_INIT_OUTGOING = 18; + FAILED_NULL_CONNECTION_DISCONNECTED = 19; + + // Breakdowns of FAILED_NULL_CONNECTION (android side) + // Connection failed due to Wifi is disconnected or Bluetooth setting is off + // or user turn on airplane mode. + FAILED_NULL_CONNECTION_LOST_CONNECTIVITY = 20 [deprecated = true]; + // Unexpected connection failure. + FAILED_NULL_CONNECTION_FAILURE = 21 [deprecated = true]; + + REJECTED_ATTACHMENT_TRANSMISSION_STATUS = 22; + TIMED_OUT_ATTACHMENT_TRANSMISSION_STATUS = 23; + NOT_ENOUGH_SPACE_ATTACHMENT_TRANSMISSION_STATUS = 24 + /*[ status_bucket = STATUS_INTERRUPTION ]*/; + UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT_TRANSMISSION_STATUS = 25; + FAILED_UNKNOWN_REMOTE_RESPONSE_TRANSMISSION_STATUS = 26; + // Connection failed due to Wifi is disconnected or Bluetooth setting is off + // or user turn on airplane mode. + NO_RESPONSE_FRAME_CONNECTION_CLOSED_LOST_CONNECTIVITY_TRANSMISSION_STATUS = 27 + [deprecated = true]; + // Unexpected connection failure due to no response frame. + NO_RESPONSE_FRAME_CONNECTION_CLOSED_TRANSMISSION_STATUS = 28; + // Connection failed due to Wifi is disconnected or Bluetooth setting is off + // or user turn on airplane mode. + LOST_CONNECTIVITY_TRANSMISSION_STATUS = 29 + /*[ status_bucket = STATUS_INTERRUPTION ]*/; + // Connection failed due to the medium is not allowed. + FAILED_DISALLOWED_MEDIUM = 30; +} + +// Generic result status of NearbyConnections API calls. +enum ConnectionLayerStatus { + // No status is available + CONNECTION_LAYER_STATUS_UNKNOWN = 0; + // The operation was successful. + CONNECTION_LAYER_STATUS_SUCCESS = 1; + // The operation failed, without any more information. + CONNECTION_LAYER_STATUS_ERROR = 2; + // The app called an API method out of order (i.e. another method is expected + // to be called first). + CONNECTION_LAYER_STATUS_OUT_OF_ORDER_API_CALL = 3; + // The app already has active operations (advertising, discovering, or + // connected to other devices) with another Strategy. Stop these operations on + // the current Strategy before trying to advertise or discover with a new + // Strategy. + CONNECTION_LAYER_STATUS_ALREADY_HAVE_ACTIVE_STRATEGY = 4; + // The app is already advertising; call StopAdvertising() before trying to + // advertise again. + CONNECTION_LAYER_STATUS_ALREADY_ADVERTISING = 5; + // The app is already discovering; call StopDiscovery() before trying to + // discover again. + CONNECTION_LAYER_STATUS_ALREADY_DISCOVERING = 6; + // NC is already listening for incoming connections from remote endpoints. + CONNECTION_LAYER_STATUS_ALREADY_LISTENING = 7; + // An attempt to read from/write to a connected remote endpoint failed. If + // this occurs repeatedly, consider invoking DisconnectFromEndpoint(). + CONNECTION_LAYER_STATUS_END_POINT_IO_ERROR = 8; + // An attempt to interact with a remote endpoint failed because it's unknown + // to us -- it's either an endpoint that was never discovered, or an endpoint + // that never connected to us (both of which are indicative of bad input from + // the client app). + CONNECTION_LAYER_STATUS_END_POINT_UNKNOWN = 9; + // The remote endpoint rejected the connection request. + CONNECTION_LAYER_STATUS_CONNECTION_REJECTED = 10; + // The app is already connected to the specified endpoint. Multiple + // connections to a remote endpoint cannot be maintained simultaneously. + CONNECTION_LAYER_STATUS_ALREADY_CONNECTED_TO_END_POINT = 11; + // The remote endpoint is not connected; messages cannot be sent to it. + CONNECTION_LAYER_STATUS_NOT_CONNECTED_TO_END_POINT = 12; + // There was an error trying to use the device's Bluetooth capabilities. + CONNECTION_LAYER_STATUS_BLUETOOTH_ERROR = 13; + // There was an error trying to use the device's Bluetooth Low Energy + // capabilities. + CONNECTION_LAYER_STATUS_BLE_ERROR = 14; + // There was an error trying to use the device's Wi-Fi capabilities. + CONNECTION_LAYER_STATUS_WIFI_LAN_ERROR = 15; + // An attempt to interact with an in-flight Payload failed because it's + // unknown to us. + CONNECTION_LAYER_STATUS_PAYLOAD_UNKNOWN = 16; + // The connection was reset + CONNECTION_LAYER_STATUS_RESET = 17; + // The connection timed out + CONNECTION_LAYER_STATUS_TIMEOUT = 18; +} + +// The status of processing attachments after receiver received payloads +// successfully. +enum ProcessReceivedAttachmentsStatus { + PROCESSING_STATUS_UNKNOWN = 0; + + PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS = 1; + PROCESSING_STATUS_FAILED_MOVING_FILES = 2; + PROCESSING_STATUS_FAILED_RECEIVING_APK = 3; + PROCESSING_STATUS_FAILED_RECEIVING_TEXT = 4; + PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS = 5; +} + +// The status of advertising and discovering sessions. Used by +// SCAN_FOR_SHARE_TARGETS and ADVERTISE_DEVICE_PRESENCE. +enum SessionStatus { + UNKNOWN_SESSION_STATUS = 0; + SUCCEEDED_SESSION_STATUS = 1 + /*[ status_bucket = STATUS_SUCCESSFUL ]*/; + + // TODO: b/341782941 - FAILED_SESSION_STATUS occurs when the status of + // advertising or discovering sessions is not successful. It can be + // due to STATUS_INTERNAL_ERROR, STATUS_INTERRUPTION, STATUS_CANCELLED. + // More session statuses should be logged to determine the status. + FAILED_SESSION_STATUS = 2; +} + +// User's response to introductions. +enum ResponseToIntroduction { + UNKNOWN_RESPONSE_TO_INTRODUCTION = 0; + + ACCEPT_INTRODUCTION = 1; + REJECT_INTRODUCTION = 2; + FAIL_INTRODUCTION = 3; +} + +// TODO(fdi): may eventually include desktop, etc. +// The type of a remote device. +enum DeviceType { + UNKNOWN_DEVICE_TYPE = 0; + + PHONE = 1; + TABLET = 2; + LAPTOP = 3; + CAR = 4; + FOLDABLE = 5; + XR = 6; +} + +// TODO(fdi): may eventually include windows, iOS, etc. +// The OS type of a remote device. +enum OSType { + UNKNOWN_OS_TYPE = 0; + + ANDROID = 1; + CHROME_OS = 2; + IOS = 3; + WINDOWS = 4; + MACOS = 5; +} + +// Relationship of remote device to sender device. +enum DeviceRelationship { + UNKNOWN_DEVICE_RELATIONSHIP = 0; + + // The remote device belongs to the same owner as sender device. + IS_SELF = 1; + // The remote device is a contact of sender. + IS_CONTACT = 2; + // The remote device is a stranger. + IS_STRANGER = 3; +} + +// The device sources of the clearcut log. +enum LogSource { + UNSPECIFIED_SOURCE = 0; + + // Represents the devices in Nearby labs. + LAB_DEVICES = 1; + // Represents the devices tested by Nearby engs, in the long term can include + // any devices with newest feature flags. + INTERNAL_DEVICES = 2; + // Represents the devices testing our in-development features before they're + // released to the greater public. + BETA_TESTER_DEVICES = 3; + // Represents the OEM partners (like Samsung) that we're working with to + // verify functionality on their devices. + OEM_DEVICES = 4; + // Represents the device for debugging. + DEBUG_DEVICES = 5; + // Represents the device for Nearby Module Food. + NEARBY_MODULE_FOOD_DEVICES = 6; + // Represents the device for BeTo Team Food. + BETO_DOGFOOD_DEVICES = 7; + // Represents the device for Nearby dog Food. + NEARBY_DOGFOOD_DEVICES = 8; + // Represents the device for Nearby Team Food. + NEARBY_TEAMFOOD_DEVICES = 9; +} + +// The Fast Share server action name. +enum ServerActionName { + UNKNOWN_SERVER_ACTION = 0; + + UPLOAD_CERTIFICATES = 1; + DOWNLOAD_CERTIFICATES = 2; + CHECK_REACHABILITY = 3; + UPLOAD_CONTACTS = 4; + UPDATE_DEVICE_NAME = 5; + UPLOAD_SENDER_CERTIFICATES = 6; + DOWNLOAD_SENDER_CERTIFICATES = 7; + UPLOAD_CONTACTS_AND_CERTIFICATES = 8; + LIST_REACHABLE_PHONE_NUMBERS = 9; + LIST_MY_DEVICES = 10; + LIST_CONTACT_PEOPLE = 11; + + // used for analytics logger to record action name. + DOWNLOAD_CERTIFICATES_INFO = 12; +} + +// The Fast Share server response state. +enum ServerResponseState { + UNKNOWN_SERVER_RESPONSE_STATE = 0; + + SERVER_RESPONSE_SUCCESS = 1; + SERVER_RESPONSE_UNKNOWN_FAILURE = 2; + + // For StatusException. + SERVER_RESPONSE_STATUS_OTHER_FAILURE = 3; + SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED = 4; + SERVER_RESPONSE_STATUS_PERMISSION_DENIED = 5; + SERVER_RESPONSE_STATUS_UNAVAILABLE = 6; + SERVER_RESPONSE_STATUS_UNAUTHENTICATED = 7; + SERVER_RESPONSE_STATUS_INVALID_ARGUMENT = 9; + + // For GoogleAuthException. + SERVER_RESPONSE_GOOGLE_AUTH_FAILURE = 8; + + // For Internet connect status. + SERVER_RESPONSE_NOT_CONNECTED_TO_INTERNET = 10; +} + +// The purpose of requesting the server request. +enum SyncPurpose { + SYNC_PURPOSE_UNKNOWN = 0; + // When NearbySharingChimeraService#sync() is called. + SYNC_PURPOSE_ON_DEMAND_SYNC = 1; + // Requested by chime notification. + SYNC_PURPOSE_CHIME_NOTIFICATION = 2; + // For reqular daily sync. + SYNC_PURPOSE_DAILY_SYNC = 3; + // Wen a device opts into Nearby Share. + SYNC_PURPOSE_OPT_IN_FIRST_SYNC = 4; + // Requested when Nearby Share automatically enables a device that shares + // a single account that has already opted in on another device. + SYNC_PURPOSE_CHECK_DEFAULT_OPT_IN = 5; + // When a device enables Nearby Share. + SYNC_PURPOSE_NEARBY_SHARE_ENABLED = 6; + // When a device is in fast init advertising. + SYNC_PURPOSE_SYNC_AT_FAST_INIT = 7; + // When device start discovery. + SYNC_PURPOSE_SYNC_AT_DISCOVERY = 8; + // When device tries to load valid private certificate. + SYNC_PURPOSE_SYNC_AT_LOAD_PRIVATE_CERTIFICATE = 9; + // When device start advertiseement. + SYNC_PURPOSE_SYNC_AT_ADVERTISEMENT = 10; + // When device contacts list changes. + SYNC_PURPOSE_CONTACT_LIST_CHANGE = 11; + // When showing the C11 banner in Neary Share setting. + SYNC_PURPOSE_SHOW_C11N_VIEW = 12; + // For regular check contact reachability. + SYNC_PURPOSE_REGULAR_CHECK_CONTACT_REACHABILITY = 13; + // When selected contacts list changes in visibility setting. + SYNC_PURPOSE_VISIBILITY_SELECTED_CONTACT_CHANGE = 14; + // When switching account. + SYNC_PURPOSE_ACCOUNT_CHANGE = 15; + // When regenerate certificates + SYNC_PURPOSE_REGENERATE_CERTIFICATES = 16; + // When Device Contacts consent changes + SYNC_PURPOSE_DEVICE_CONTACTS_CONSENT_CHANGE = 17; +} + +// The device role to trigger the server request. +enum ClientRole { + CLIENT_ROLE_UNKNOWN = 0; + CLIENT_ROLE_SENDER = 1; + CLIENT_ROLE_RECEIVER = 2; +} + +// The type of Nearby Sharing scanning. +enum ScanType { + UNKNOWN_SCAN_TYPE = 0; + FOREGROUND_SCAN = 1; + FOREGROUND_RETRY_SCAN = 2; + DIRECT_SHARE_SCAN = 3; + BACKGROUND_SCAN = 4; +} + +// The type of parsing endpoint id failed type. +enum ParsingFailedType { + FAILED_UNKNOWN_TYPE = 0; + // NULL advertisement is returned due to sender failing to parse advertisement + // from endpointInfo byte stream from receiver advertisement. + FAILED_PARSE_ADVERTISEMENT = 1; + // NULL shareTarget is returned due to sender failing to create shareTarget + // from a valid parsed advertisement stemming from issues in certificates, QR + // code tokens or device names. + FAILED_CONVERT_SHARE_TARGET = 2; +} + +// The Nearby Sharing advertising mode. +enum AdvertisingMode { + UNKNOWN_ADVERTISING_MODE = 0; + SCREEN_OFF_ADVERTISING_MODE = 1; + BACKGROUND_ADVERTISING_MODE = 2; + MIDGROUND_ADVERTISING_MODE = 3; + FOREGROUND_ADVERTISING_MODE = 4; + SUSPENDED_ADVERTISING_MODE = 5; +} + +// The Nearby Sharing discovery mode. +enum DiscoveryMode { + UNKNOWN_DISCOVERY_MODE = 0; + SCREEN_OFF_DISCOVERY_MODE = 1; + BACKGROUND_DISCOVERY_MODE = 2; + MIDGROUND_DISCOVERY_MODE = 3; + FOREGROUND_DISCOVERY_MODE = 4; + SUSPENDED_DISCOVERY_MODE = 5; +} + +// The class name of chimera activity. +enum ActivityName { + UNKNOWN_ACTIVITY = 0; + + SHARE_SHEET_ACTIVITY = 1; + SETTINGS_ACTIVITY = 2; + RECEIVE_SURFACE_ACTIVITY = 3; + SETUP_ACTIVITY = 4; + DEVICE_VISIBILITY_ACTIVITY = 5; + CONSENTS_ACTIVITY = 6; + SET_DEVICE_NAME_DIALOG = 7; + SET_DATA_USAGE_DIALOG = 8; + QUICK_SETTINGS_ACTIVITY = 9; + REMOTE_COPY_SHARE_SHEET_ACTIVITY = 10; + SETUP_WIZARD_ACTIVITY = 11; + SETTINGS_REVIEW_ACTIVITY = 12; +} + +// The type of consent page user launches. +enum ConsentType { + CONSENT_TYPE_UNKNOWN = 0; + + // launch Constellation consent page. + CONSENT_TYPE_C11N = 1; + // launch device contact consent page. + CONSENT_TYPE_DEVICE_CONTACT = 2; +} + +enum ConsentAcceptanceStatus { + CONSENT_UNKNOWN_ACCEPT_STATUS = 0; + + CONSENT_ACCEPTED = 1; + CONSENT_DECLINED = 2; + // unable to enable consent. + CONSENT_UNABLE_TO_ENABLE = 3; +} + +enum ApkSource { + UNKNOWN_APK_SOURCE = 0; + + APK_FROM_SD_CARD = 1; + INSTALLED_APP = 2; +} + +// The Installation status of APK. +enum InstallAPKStatus { + UNKNOWN_INSTALL_APK_STATUS = 0; + + FAIL_INSTALLATION = 1; + SUCCESS_INSTALLATION = 2; +} + +// The verification status of APK. +enum VerifyAPKStatus { + UNKNOWN_VERIFY_APK_STATUS = 0; + + NOT_INSTALLABLE = 1; + INSTALLABLE = 2; + ALREADY_INSTALLED = 3; +} + +enum ShowNotificationStatus { + UNKNOWN_SHOW_NOTIFICATION_STATUS = 0; + + SHOW = 1; + NOT_SHOW = 2; +} + +enum PermissionRequestResult { + PERMISSION_UNKNOWN_REQUEST_RESULT = 0; + + PERMISSION_GRANTED = 1; + PERMISSION_REJECTED = 2; + PERMISSION_UNABLE_TO_GRANT = 3; +} + +enum PermissionRequestType { + PERMISSION_UNKNOWN_TYPE = 0; + + PERMISSION_AIRPLANE_MODE_OFF = 1; + PERMISSION_WIFI = 2; + PERMISSION_BLUETOOTH = 3; + PERMISSION_LOCATION = 4; + PERMISSION_WIFI_HOTSPOT = 5; +} + +enum SharingUseCase { + USE_CASE_UNKNOWN = 0; + + USE_CASE_NEARBY_SHARE = 1; + USE_CASE_REMOTE_COPY_PASTE = 2; + USE_CASE_WIFI_CREDENTIAL = 3; + USE_CASE_APP_SHARE = 4; + USE_CASE_QUICK_SETTING_FILE_SHARE = 5; + USE_CASE_SETUP_WIZARD = 6; + // Deprecated. QR code is an addition to existing use cases rather than being + // a separate use case. + USE_CASE_NEARBY_SHARE_WITH_QR_CODE = 7 [deprecated = true]; + // The user was redirected from Bluetooth sharing UI to Nearby Share + USE_CASE_REDIRECTED_FROM_BLUETOOTH_SHARE = 8; +} + +// Used only for Windows App now. +enum AppCrashReason { + APP_CRASH_REASON_UNKNOWN = 0; +} + +// Thes source where the attachemnt comes from. It can be an action, app name, +// etc. The first 6 source types are being used as FileSenderType in Nearby +// Share Windows app. +enum AttachmentSourceType { + ATTACHMENT_SOURCE_UNKNOWN = 0; + ATTACHMENT_SOURCE_CONTEXT_MENU = 1; + ATTACHMENT_SOURCE_DRAG_AND_DROP = 2; + ATTACHMENT_SOURCE_SELECT_FILES_BUTTON = 3; + ATTACHMENT_SOURCE_PASTE = 4; + ATTACHMENT_SOURCE_SELECT_FOLDERS_BUTTON = 5; + ATTACHMENT_SOURCE_SHARE_ACTIVATION = 6; +} + +// The action to interact with preferences. +// Used only for Windows App now. +enum PreferencesAction { + PREFERENCES_ACTION_UNKNOWN = 0; + PREFERENCES_ACTION_NO_ACTION = 1; + + // Primary actions/functions towards preferences + PREFERENCES_ACTION_LOAD_PREFERENCES = 2; + PREFERENCES_ACTION_SAVE_PREFERENCESS = 3; + PREFERENCES_ACTION_ATTEMPT_LOAD = 4; + PREFERENCES_ACTION_RESTORE_FROM_BACKUP = 5; + + // Other actions within the 4 actions above + PREFERENCES_ACTION_CREATE_PREFERENCES_PATH = 6; + PREFERENCES_ACTION_MAKE_PREFERENCES_BACKUP_FILE = 7; + PREFERENCES_ACTION_CHECK_IF_PREFERENCES_PATH_EXISTS = 8; + PREFERENCES_ACTION_CHECK_IF_PREFERENCES_INPUT_STREAM_STATUS = 9; + PREFERENCES_ACTION_CHECK_IF_PREFERENCES_FILE_IS_CORRUPTED = 10; + PREFERENCES_ACTION_CHECK_IF_PREFERENCES_BACKUP_FILE_EXISTS = 11; +} + +// The status of the action to interact with preferences. +// Used only for Windows App now. +enum PreferencesActionStatus { + PREFERENCES_ACTION_STATUS_UNKNOWN = 0; + PREFERENCES_ACTION_STATUS_SUCCESS = 1; + PREFERENCES_ACTION_STATUS_FAIL = 2; +} + +/** The distance of the found nearby fast init advertisement. */ +enum FastInitState { + FAST_INIT_UNKNOWN_STATE = 0; + // A device was found in close proximity. + // distance < fast_init_distance_close_centimeters(50 cm) + FAST_INIT_CLOSE_STATE = 1; + // A device was found in far proximity. + // distance < fast_init_distance_close_centimeters(10 m) + FAST_INIT_FAR_STATE = 2; + // No devices have been found nearby. The default state. + FAST_INIT_LOST_STATE = 3; +} + +/** The type of FastInit advertisement. */ +enum FastInitType { + FAST_INIT_UNKNOWN_TYPE = 0; + // Show HUN to notify the user. + FAST_INIT_NOTIFY_TYPE = 1; + // Not notify the user. + FAST_INIT_SILENT_TYPE = 2; +} + +// LINT.IfChange +/** The type of desktop notification event. */ +enum DesktopNotification { + DESKTOP_NOTIFICATION_UNKNOWN = 0; + DESKTOP_NOTIFICATION_CONNECTING = 1; + DESKTOP_NOTIFICATION_PROGRESS = 2; + DESKTOP_NOTIFICATION_ACCEPT = 3; + DESKTOP_NOTIFICATION_RECEIVED = 4; + DESKTOP_NOTIFICATION_ERROR = 5; +} + +enum DesktopTransferEventType { + DESKTOP_TRANSFER_EVENT_TYPE_UNKNOWN = 0; + + // Receive attachments. + DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ACCEPT = 1; + DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_PROGRESS = 2; + DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_RECEIVED = 3; + DESKTOP_TRANSFER_EVENT_RECEIVE_TYPE_ERROR = 4; + + // Send attachments. + DESKTOP_TRANSFER_EVENT_SEND_TYPE_START = 5; + DESKTOP_TRANSFER_EVENT_SEND_TYPE_SELECT_A_DEVICE = 6; + DESKTOP_TRANSFER_EVENT_SEND_TYPE_PROGRESS = 7; + DESKTOP_TRANSFER_EVENT_SEND_TYPE_SENT = 8; + DESKTOP_TRANSFER_EVENT_SEND_TYPE_ERROR = 9; +} + +enum DecryptCertificateFailureStatus { + DECRYPT_CERT_UNKNOWN_FAILURE = 0; + DECRYPT_CERT_NO_SUCH_ALGORITHM_FAILURE = 1; + DECRYPT_CERT_NO_SUCH_PADDING_FAILURE = 2; + DECRYPT_CERT_INVALID_KEY_FAILURE = 3; + DECRYPT_CERT_INVALID_ALGORITHM_PARAMETER_FAILURE = 4; + DECRYPT_CERT_ILLEGAL_BLOCK_SIZE_FAILURE = 5; + DECRYPT_CERT_BAD_PADDING_FAILURE = 6; +} + +// Refer to go/qs-contacts-consent-2024 for the detail. +enum ContactAccess { + CONTACT_ACCESS_UNKNOWN = 0; + + CONTACT_ACCESS_NO_CONTACT_UPLOADED = 1; + CONTACT_ACCESS_ONLY_UPLOAD_GOOGLE_CONTACT = 2; + CONTACT_ACCESS_UPLOAD_CONTACT_FOR_DEVICE_CONTACT_CONSENT = 3; + CONTACT_ACCESS_UPLOAD_CONTACT_FOR_QUICK_SHARE_CONSENT = 4; +} + +// Refer to go/qs-contacts-consent-2024 for the detail. +enum IdentityVerification { + IDENTITY_VERIFICATION_UNKNOWN = 0; + + IDENTITY_VERIFICATION_NO_PHONE_NUMBER_VERIFIED = 1; + IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_NOT_LINKED_TO_GAIA = 2; + IDENTITY_VERIFICATION_PHONE_NUMBER_VERIFIED_LINKED_TO_QS_GAIA = 3; +} + +enum ButtonStatus { + BUTTON_STATUS_UNKNOWN = 0; + BUTTON_STATUS_CLICK_ACCEPT = 1; + BUTTON_STATUS_CLICK_REJECT = 2; + BUTTON_STATUS_IGNORE = 3; +} +// LINT.ThenChange( +// //depot/google3/location/nearby/cpp/sharing/clients/dart/platform/lib/types/models.dart +// ) diff --git a/NearbyShare/Model/ProtobufSource/wire_format.proto b/NearbyShare/Model/ProtobufSource/wire_format.proto index 6853e22..82510d3 100644 --- a/NearbyShare/Model/ProtobufSource/wire_format.proto +++ b/NearbyShare/Model/ProtobufSource/wire_format.proto @@ -1,26 +1,41 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Brought from: //depot/google3/location/nearby/sharing/proto/wire_format.proto -// At CL 317565061 +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. syntax = "proto2"; +//package nearby.sharing.service.proto; package sharing.nearby; -// Required in Chrome. +// import "storage/datapol/annotations/proto/semantic_annotations.proto"; +import "sharing_enums.proto"; + +option java_package = "com.google.android.gms.nearby.sharing"; +option java_outer_classname = "Protocol"; +option objc_class_prefix = "GNSHP"; option optimize_for = LITE_RUNTIME; // File metadata. Does not include the actual bytes of the file. -// NEXT_ID=6 +// NEXT_ID=10 message FileMetadata { enum Type { UNKNOWN = 0; IMAGE = 1; VIDEO = 2; - APP = 3; + ANDROID_APP = 3; AUDIO = 4; + DOCUMENT = 5; + CONTACT_CARD = 6; } // The human readable name of this file (eg. 'Cookbook.pdf'). @@ -43,9 +58,19 @@ message FileMetadata { // A uuid for the attachment. Should be unique across all attachments. optional int64 id = 6; + + // The parent folder. + optional string parent_folder = 7; + + // A stable identifier for the attachment. Used for receiver to identify same + // attachment from different transfers. + optional int64 attachment_hash = 8; + + // True, if image in file attachment is sensitive + optional bool is_sensitive_content = 9; } -// NEXT_ID=5 +// NEXT_ID=8 message TextMetadata { enum Type { UNKNOWN = 0; @@ -73,15 +98,19 @@ message TextMetadata { // A uuid for the attachment. Should be unique across all attachments. optional int64 id = 6; + + // True if text is sensitive, e.g. password + optional bool is_sensitive_text = 7; } -// NEXT_ID=5 +// NEXT_ID=6 message WifiCredentialsMetadata { enum SecurityType { UNKNOWN_SECURITY_TYPE = 0; OPEN = 1; WPA_PSK = 2; WEP = 3; + SAE = 4; } // The Wifi network name. This will be sent in introduction. @@ -98,6 +127,49 @@ message WifiCredentialsMetadata { optional int64 id = 5; } +// NEXT_ID=8 +message AppMetadata { + // The app name. This will be sent in introduction. + optional string app_name = 1; + + // The size of the all split of apks. + optional int64 size = 2; + + // The File payload id that will be sent as a follow up containing the + // apk paths. + repeated int64 payload_id = 3 [packed = true]; + + // A uuid for the attachment. Should be unique across all attachments. + optional int64 id = 4; + + // The name of apk file. This will be sent in introduction. + repeated string file_name = 5; + + // The size of apk file. This will be sent in introduction. + repeated int64 file_size = 6 [packed = true]; + + // The package name. This will be sent in introduction. + optional string package_name = 7; +} + +// NEXT_ID=5 +message StreamMetadata { + // A human readable description for the stream. + optional string description = 1; + + // The package name of the sending application. + optional string package_name = 2; + + // The payload id that will be send as a followup containing the + // ParcelFileDescriptor. + optional int64 payload_id = 3; + + // The human-readable name of the package that should be displayed as + // attribution if no other information is available (i.e. the package is not + // installed locally yet). + optional string attributed_app_name = 4; +} + // A frame used when sending messages over the wire. // NEXT_ID=3 message Frame { @@ -112,7 +184,7 @@ message Frame { optional V1Frame v1 = 2; } -// NEXT_ID=7 +// NEXT_ID=8 message V1Frame { enum FrameType { UNKNOWN_FRAME_TYPE = 0; @@ -120,34 +192,59 @@ message V1Frame { RESPONSE = 2; PAIRED_KEY_ENCRYPTION = 3; PAIRED_KEY_RESULT = 4; + // No longer used. CERTIFICATE_INFO = 5; CANCEL = 6; + // No longer used. + PROGRESS_UPDATE = 7; } optional FrameType type = 1; - // Exactly one of the following fields will be set. + // At most one of the following fields will be set. optional IntroductionFrame introduction = 2; optional ConnectionResponseFrame connection_response = 3; optional PairedKeyEncryptionFrame paired_key_encryption = 4; optional PairedKeyResultFrame paired_key_result = 5; - optional CertificateInfoFrame certificate_info = 6; + optional CertificateInfoFrame certificate_info = 6 [deprecated = true]; + optional ProgressUpdateFrame progress_update = 7 [deprecated = true]; } // An introduction packet sent by the sending side. Contains a list of files // they'd like to share. -// NEXT_ID=4 +// NEXT_ID=10 message IntroductionFrame { + enum SharingUseCase { + UNKNOWN = 0; + NEARBY_SHARE = 1; + REMOTE_COPY = 2; + } + repeated FileMetadata file_metadata = 1; repeated TextMetadata text_metadata = 2; // The required app package to open the content. May be null. optional string required_package = 3; repeated WifiCredentialsMetadata wifi_credentials_metadata = 4; + repeated AppMetadata app_metadata = 5; + optional bool start_transfer = 6; + repeated StreamMetadata stream_metadata = 7; + optional SharingUseCase use_case = 8; + repeated int64 preview_payload_ids = 9; +} + +// A progress update packet sent by the sending side. Contains transfer progress +// value. NEXT_ID=3 +message ProgressUpdateFrame { + optional float progress = 1; + + // True, if the receiver should start bandwidth upgrade and receiving the + // payloads. + optional bool start_transfer = 2; } // A response packet sent by the receiving side. Accepts or rejects the list of // files. -// NEXT_ID=2 +// NEXT_ID=4 message ConnectionResponseFrame { enum Status { UNKNOWN = 0; @@ -160,10 +257,68 @@ message ConnectionResponseFrame { // The receiving side's response. optional Status status = 1; + + // Key is attachment hash, value is the details of attachment. + map attachment_details = 2; + + // In the case of a stream attachments, the other side of the pipe. + // Both sender and receiver should validate matching counts. + repeated StreamMetadata stream_metadata = 3; +} + +// Attachment details that sent in ConnectionResponseFrame. +// NEXT_ID=3 +message AttachmentDetails { + // LINT.IfChange + enum Type { + UNKNOWN = 0; + // Represents FileAttachment. + FILE = 1; + // Represents TextAttachment. + TEXT = 2; + // Represents WifiCredentialsAttachment. + WIFI_CREDENTIALS = 3; + // Represents AppAttachment. + APP = 4; + // Represents StreamAttachment. + STREAM = 5; + } + // LINT.ThenChange(//depot/google3/java/com/google/android/gmscore/integ/client/nearby/src/com/google/android/gms/nearby/sharing/Attachment.java) + + // The attachment family type. + optional Type type = 1; + + // This field is only for FILE type. + optional FileAttachmentDetails file_attachment_details = 2; +} + +// File attachment details included in ConnectionResponseFrame. +// NEXT_ID=3 +message FileAttachmentDetails { + // Existing local file size on receiver side. + optional int64 receiver_existing_file_size = 1; + + // The key is attachment hash, a stable identifier for the attachment. + // Value is list of payload details transferred for the attachment. + map attachment_hash_payloads = 2; +} + +// NEXT_ID=2 +message PayloadsDetails { + // The list should be sorted by creation timestamp. + repeated PayloadDetails payload_details = 1; +} + +// Metadata of a payload file created by Nearby Connections. +// NEXT_ID=4 +message PayloadDetails { + optional int64 id = 1; + optional int64 creation_timestamp_millis = 2; + optional int64 size = 3; } // A paired key encryption packet sent between devices, contains signed data. -// NEXT_ID=3 +// NEXT_ID=5 message PairedKeyEncryptionFrame { // The encrypted data in byte array format. optional bytes signed_data = 1; @@ -173,10 +328,17 @@ message PairedKeyEncryptionFrame { // An optional encrypted data in byte array format. optional bytes optional_signed_data = 3; + + // An optional QR code handshake data in a byte array format. + // For incoming connection contains a signature of the UKEY2 + // token, created with the sender's private key. + // For outgoing connection contains an HKDF of the connection token and of the + // UKEY2 token + optional bytes qr_code_handshake_data = 4; } // A paired key verification result packet sent between devices. -// NEXT_ID=2 +// NEXT_ID=3 message PairedKeyResultFrame { enum Status { UNKNOWN = 0; @@ -187,6 +349,9 @@ message PairedKeyResultFrame { // The verification result. optional Status status = 1; + + // OS type. + optional location.nearby.proto.sharing.OSType os_type = 2; } // A package containing certificate info to be shared to remote device offline. @@ -229,8 +394,15 @@ message PublicCertificate { // NEXT_ID=3 message WifiCredentials { // Wi-Fi password. - optional string password = 1; + optional string password = 1 + /* type = ST_ACCOUNT_CREDENTIAL */; // True if the network is a hidden network that is not broadcasting its SSID. // Default is false. optional bool hidden_ssid = 2 [default = false]; -} \ No newline at end of file +} + +// NEXT_ID=2 +message StreamDetails { + // Serialized ParcelFileDescriptor for input stream (for the receiver). + optional bytes input_stream_parcel_file_descriptor_bytes = 1; +} diff --git a/QuickDrop.xcodeproj/project.pbxproj b/QuickDrop.xcodeproj/project.pbxproj index fda2b9b..fabd30c 100644 --- a/QuickDrop.xcodeproj/project.pbxproj +++ b/QuickDrop.xcodeproj/project.pbxproj @@ -92,6 +92,9 @@ EB96ED8D2D7F7EA3004B3FF1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 69DA9A1329E0BF5200A442DA /* Assets.xcassets */; }; EB96ED8F2D7F8105004B3FF1 /* Localized.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB96ED8E2D7F8103004B3FF1 /* Localized.swift */; }; EB96ED902D7F8114004B3FF1 /* Localized.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB96ED8E2D7F8103004B3FF1 /* Localized.swift */; }; + EB9925802E45D53E00357055 /* sharing_enums.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB99257F2E45D53E00357055 /* sharing_enums.pb.swift */; }; + EB9925812E45D53E00357055 /* sharing_enums.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB99257F2E45D53E00357055 /* sharing_enums.pb.swift */; }; + EB9925822E45D53E00357055 /* sharing_enums.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB99257F2E45D53E00357055 /* sharing_enums.pb.swift */; }; EBC05C5B2E33937200EECC18 /* ErrorAlertHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC05C5A2E33936C00EECC18 /* ErrorAlertHandler.swift */; }; EBC05C5C2E3394EF00EECC18 /* ErrorAlertHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC05C5A2E33936C00EECC18 /* ErrorAlertHandler.swift */; }; EBC05C712E33B57D00EECC18 /* Converter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC05C6D2E33B57D00EECC18 /* Converter.swift */; }; @@ -197,12 +200,6 @@ EB2B41E32DC63AC80070FC39 /* SleepManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SleepManager.swift; sourceTree = ""; }; EB2F9BFA2DA04B67004010A2 /* Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Helpers.swift; sourceTree = ""; }; EB36435F2D73A29F009CDFF8 /* AudioManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioManager.swift; sourceTree = ""; }; - EB3B73F32DC8FF3A00369951 /* device_to_device_messages.proto */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.protobuf; path = device_to_device_messages.proto; sourceTree = ""; }; - EB3B73F42DC8FF3A00369951 /* offline_wire_formats.proto */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.protobuf; path = offline_wire_formats.proto; sourceTree = ""; }; - EB3B73F52DC8FF3A00369951 /* securegcm.proto */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.protobuf; path = securegcm.proto; sourceTree = ""; }; - EB3B73F62DC8FF3A00369951 /* securemessage.proto */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.protobuf; path = securemessage.proto; sourceTree = ""; }; - EB3B73F72DC8FF3A00369951 /* ukey.proto */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.protobuf; path = ukey.proto; sourceTree = ""; }; - EB3B73F82DC8FF3A00369951 /* wire_format.proto */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.protobuf; path = wire_format.proto; sourceTree = ""; }; EB5C36922E34EBBD0052EFD7 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; EB5C36952E34EBBD0052EFD7 /* mul */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; name = mul; path = mul.lproj/ShareViewController.xcstrings; sourceTree = ""; }; EB5C36E32E34EC0E0052EFD7 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = ""; }; @@ -218,6 +215,7 @@ EB7F54132D78E9E400989564 /* LicenseWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseWindow.swift; sourceTree = ""; }; EB96ED8A2D7F7CF4004B3FF1 /* SmallSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallSheetView.swift; sourceTree = ""; }; EB96ED8E2D7F8103004B3FF1 /* Localized.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Localized.swift; sourceTree = ""; }; + EB99257F2E45D53E00357055 /* sharing_enums.pb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = sharing_enums.pb.swift; sourceTree = ""; }; EBC05C5A2E33936C00EECC18 /* ErrorAlertHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorAlertHandler.swift; sourceTree = ""; }; EBC05C6D2E33B57D00EECC18 /* Converter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Converter.swift; sourceTree = ""; }; EBC05C6E2E33B57D00EECC18 /* Helper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Helper.swift; sourceTree = ""; }; @@ -336,6 +334,7 @@ 69DA9A2929E18CB500A442DA /* wire_format.pb.swift */, 69DA9A2A29E18CB500A442DA /* device_to_device_messages.pb.swift */, 69DA9A2B29E18CB500A442DA /* offline_wire_formats.pb.swift */, + EB99257F2E45D53E00357055 /* sharing_enums.pb.swift */, 69DA9A2C29E18CB500A442DA /* securegcm.pb.swift */, 69DA9A2D29E18CB500A442DA /* securemessage.pb.swift */, ); @@ -352,19 +351,6 @@ path = NearbyShare; sourceTree = ""; }; - EB3B73F92DC8FF3A00369951 /* ProtobufSource */ = { - isa = PBXGroup; - children = ( - EB3B73F32DC8FF3A00369951 /* device_to_device_messages.proto */, - EB3B73F42DC8FF3A00369951 /* offline_wire_formats.proto */, - EB3B73F52DC8FF3A00369951 /* securegcm.proto */, - EB3B73F62DC8FF3A00369951 /* securemessage.proto */, - EB3B73F72DC8FF3A00369951 /* ukey.proto */, - EB3B73F82DC8FF3A00369951 /* wire_format.proto */, - ); - path = ProtobufSource; - sourceTree = ""; - }; EB5C371C2E3669010052EFD7 /* Util */ = { isa = PBXGroup; children = ( @@ -411,7 +397,6 @@ EB5C37DD2E377B430052EFD7 /* Model */ = { isa = PBXGroup; children = ( - EB3B73F92DC8FF3A00369951 /* ProtobufSource */, 69DA9A2729E18CB500A442DA /* Protobuf */, EB5C36E82E3546100052EFD7 /* DataModel.swift */, ); @@ -688,6 +673,7 @@ EB5C37D42E377A7F0052EFD7 /* NearbyConnectionManager.swift in Sources */, EB5C37BD2E377A700052EFD7 /* Helpers.swift in Sources */, EB5C37BE2E377A700052EFD7 /* SaveFilesManager.swift in Sources */, + EB9925822E45D53E00357055 /* sharing_enums.pb.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -725,6 +711,7 @@ 69DA9A1229E0BF5100A442DA /* AppDelegate.swift in Sources */, EB6F62D72D91F4AF00534EC2 /* SettingsView.swift in Sources */, EB7F54122D78E96000989564 /* TutorialView.swift in Sources */, + EB9925812E45D53E00357055 /* sharing_enums.pb.swift in Sources */, EB96ED8F2D7F8105004B3FF1 /* Localized.swift in Sources */, EB7CD1452D6FB0C300CB0CB5 /* Logger.swift in Sources */, EBC05C822E33B58300EECC18 /* ApIsolationIssueView.swift in Sources */, @@ -750,6 +737,7 @@ EB5C37F92E377CE70052EFD7 /* securegcm.pb.swift in Sources */, EB5C37FA2E377CE70052EFD7 /* Helpers.swift in Sources */, EB5C37FB2E377CE70052EFD7 /* InboundNearbyConnection.swift in Sources */, + EB9925802E45D53E00357055 /* sharing_enums.pb.swift in Sources */, EB5C37FC2E377CE70052EFD7 /* OutboundNearbyConnection.swift in Sources */, EB5C37FD2E377CE70052EFD7 /* Logger.swift in Sources */, EB5C37FE2E377CE70052EFD7 /* offline_wire_formats.pb.swift in Sources */, diff --git a/QuickDrop/Localizable.xcstrings b/QuickDrop/Localizable.xcstrings index ed5210e..3f49cce 100644 --- a/QuickDrop/Localizable.xcstrings +++ b/QuickDrop/Localizable.xcstrings @@ -6621,111 +6621,7 @@ } }, "QuickDrop" : { - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "de" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "es" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "fr" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "hu" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "it" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ja" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ko" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "nl" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "pt-PT" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ro" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ru" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "th" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "uk" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - } - }, - "shouldTranslate" : false + }, "QuickDropAndroidAppAdvertisement" : { "extractionState" : "manual", @@ -7263,112 +7159,7 @@ } }, "Reset UD" : { - "extractionState" : "stale", - "localizations" : { - "ar" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "de" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "en" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "es" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "fr" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "hu" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "it" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ja" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ko" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "nl" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "pt-BR" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "pt-PT" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ro" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "ru" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "th" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "uk" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "new", - "value" : "" - } - } - }, - "shouldTranslate" : false + }, "SaveFilesLocation" : { "extractionState" : "manual", diff --git a/Resources/License.txt b/Resources/License.txt index 97d7008..f6f5a6b 100644 --- a/Resources/License.txt +++ b/Resources/License.txt @@ -255,6 +255,186 @@ OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE PRODUCT OR THE USE OR OTHER DEALINGS IN OR WITH THE PRODUCT. +Nearby +https://github.com/google/nearby + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + ukey2 https://github.com/google/ukey2 Copyright 2023 Google @@ -320,6 +500,7 @@ The disclaimer of warranties and limitation of liability provided above shall be [...] + All sounds are copyrighted material of https://notificationsounds.com Terms of use: https://notificationsounds.com/terms-of-use