mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Implement Westworld logging of preconnect events
PiperOrigin-RevId: 620374739
This commit is contained in:
+10
@@ -38,6 +38,16 @@ cc_proto_library(
|
||||
deps = [":connections_enums_proto"],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "connections_westworld_enums_proto",
|
||||
srcs = ["connections_westworld_enums.proto"],
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "connections_westworld_enums_java_proto",
|
||||
deps = [":connections_westworld_enums_proto"],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "sharing_enums_proto",
|
||||
srcs = ["sharing_enums.proto"],
|
||||
|
||||
@@ -64,40 +64,6 @@ enum ConnectionsStrategy {
|
||||
P2P_POINT_TO_POINT = 5;
|
||||
}
|
||||
|
||||
// An indication of the client using the Nearby Connections library.
|
||||
enum ConnectionsClient {
|
||||
CONNECTIONS_CLIENT_UNKNOWN = 0;
|
||||
CONNECTIONS_CLIENT_NEARBY_SHARE = 1;
|
||||
CONNECTIONS_CLIENT_QUICK_START = 2;
|
||||
CONNECTIONS_CLIENT_OTHER_FIRST_PARTY = 3;
|
||||
CONNECTIONS_CLIENT_THIRD_PARTY = 4;
|
||||
}
|
||||
|
||||
// An identifier for the type of event being reported in a shared proto.
|
||||
enum ReportedEventType {
|
||||
NC_EVENT_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// The client has started discovery.
|
||||
NC_EVENT_TYPE_START_DISCOVERY = 1;
|
||||
|
||||
// The client has stopped discovery.
|
||||
NC_EVENT_TYPE_STOP_DISCOVERY = 2;
|
||||
|
||||
// Logged when discovery is active and an endpoint matching the current
|
||||
// discovery parameters has been found.
|
||||
NC_EVENT_TYPE_ENDPOINT_FOUND = 3;
|
||||
|
||||
// Logged when discovery is active and an endpoint which had previously
|
||||
// matched the current discovery parameters is no longer detected.
|
||||
NC_EVENT_TYPE_ENDPOINT_LOST = 4;
|
||||
|
||||
// A call to the startAdvertising method.
|
||||
NC_EVENT_TYPE_START_ADVERTISING = 5;
|
||||
|
||||
// A call to the stopAdvertising method.
|
||||
NC_EVENT_TYPE_STOP_ADVERTISING = 6;
|
||||
}
|
||||
|
||||
// LINT.ThenChange(
|
||||
// //depot/google3/wireless/android/stats/platform/westworld/public/protos/enums/android/nearby/connections/enums.proto
|
||||
// )
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
// Copyright 2024 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.connections;
|
||||
|
||||
// import "logs/proto/logs_annotations/logs_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 = "ConnectionsWestworldEnums";
|
||||
|
||||
// LINT.IfChange
|
||||
|
||||
// An indication of the client using the Nearby Connections library.
|
||||
enum ConnectionsClient {
|
||||
CONNECTIONS_CLIENT_UNKNOWN = 0;
|
||||
CONNECTIONS_CLIENT_NEARBY_SHARE = 1;
|
||||
CONNECTIONS_CLIENT_QUICK_START = 2;
|
||||
CONNECTIONS_CLIENT_OTHER_FIRST_PARTY = 3;
|
||||
CONNECTIONS_CLIENT_THIRD_PARTY = 4;
|
||||
}
|
||||
|
||||
// An identifier for the type of event being reported in a shared proto.
|
||||
enum ReportedEventType {
|
||||
NC_EVENT_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// The client has started discovery.
|
||||
NC_EVENT_TYPE_START_DISCOVERY = 1;
|
||||
|
||||
// The client has stopped discovery.
|
||||
NC_EVENT_TYPE_STOP_DISCOVERY = 2;
|
||||
|
||||
// Logged when discovery is active and an endpoint matching the current
|
||||
// discovery parameters has been found.
|
||||
NC_EVENT_TYPE_ENDPOINT_FOUND = 3;
|
||||
|
||||
// Logged when discovery is active and an endpoint which had previously
|
||||
// matched the current discovery parameters is no longer detected.
|
||||
NC_EVENT_TYPE_ENDPOINT_LOST = 4;
|
||||
|
||||
// A call to the startAdvertising method.
|
||||
NC_EVENT_TYPE_START_ADVERTISING = 5;
|
||||
|
||||
// A call to the stopAdvertising method.
|
||||
NC_EVENT_TYPE_STOP_ADVERTISING = 6;
|
||||
|
||||
// The current discovery options have been modified, for instance to include
|
||||
// a different power level or mediums.
|
||||
NC_EVENT_TYPE_DISCOVERY_OPTIONS_UPDATED = 7;
|
||||
}
|
||||
|
||||
// LINT.ThenChange(
|
||||
// //depot/google3/wireless/android/stats/platform/westworld/public/protos/enums/android/nearby/connections/enums.proto
|
||||
// )
|
||||
Reference in New Issue
Block a user