File: enums.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (181 lines) | stat: -rw-r--r-- 5,818 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

package nearby.fastpair;

// Represents the format of the final device notification (which is directly
// correlated to the action taken by the notification).
enum NotificationType {
  // Unspecified notification type.
  NOTIFICATION_TYPE_UNSPECIFIED = 0;
  // Notification launches the fast pair intent.
  // Example Notification Title: "Bose SoundLink II"
  // Notification Description: "Tap to pair with this device"
  FAST_PAIR = 1;
  // Notification launches an app.
  // Notification Title: "[X]" where X is type/name of the device.
  // Notification Description: "Tap to setup this device"
  APP_LAUNCH = 2;
  // Notification launches for Nearby Setup. The notification title and
  // description is the same as APP_LAUNCH.
  NEARBY_SETUP = 3;
  // Notification launches the fast pair intent, but doesn't include an anti-
  // spoofing key. The notification title and description is the same as
  // FAST_PAIR.
  FAST_PAIR_ONE = 4;
  // Notification launches Smart Setup on devices.
  // These notifications are identical to APP_LAUNCH except that they always
  // launch Smart Setup intents within GMSCore.
  SMART_SETUP = 5;
}

// How the device will be interacted with when it is seen.
enum InteractionType {
  INTERACTION_TYPE_UNKNOWN = 0;
  AUTO_LAUNCH = 1;
  NOTIFICATION = 2;
}

// The status of the user's consent opt-in.
enum OptInStatus {
  STATUS_UNKNOWN = 0;
  STATUS_OPTED_IN = 1;
  STATUS_OPTED_OUT = 2;
  STATUS_ERROR_RETRIEVING_FROM_FOOTPRINTS_SERVER = 3;
}

// The type of a NearbyItem. Determines how the item is handled (e.g. we may
// display a different notification style for different types). It may not
// indicate the source of the data (e.g., an attachment on the Proximity Beacon
// Service that represents a device needing to be set up might become a
// NearbyItem with type=DEVICE).
enum NearbyType {
  NEARBY_TYPE_UNKNOWN = 0;
  // Proximity Beacon Service (PBS). This is the only type of nearbyItems which
  // can be customized by 3p and therefore the intents passed should not be
  // completely trusted. Deprecated already.
  NEARBY_PROXIMITY_BEACON = 1;
  // Physical Web URL beacon. Deprecated already.
  NEARBY_PHYSICAL_WEB = 2;
  // Chromecast beacon. Used on client-side only.
  NEARBY_CHROMECAST = 3;
  // Wear beacon. Used on client-side only.
  NEARBY_WEAR = 4;
  // A device (e.g. a Magic Pair device that needs to be set up). The special-
  // case devices above (e.g. ChromeCast, Wear) might migrate to this type.
  NEARBY_DEVICE = 6;
  // Popular apps/urls based on user's current geo-location.
  NEARBY_POPULAR_HERE = 7;

  reserved 5;
}

enum ResolvedUrlType {
  RESOLVED_URL_TYPE_UNKNOWN = 0;

  // The url is resolved to a web page that is not a play store app.
  // This can be considered as the default resolved type when it's
  // not the other specific types.
  WEBPAGE = 1;

  // The url is resolved to the Google Play store app
  // ie. play.google.com/store
  APP = 2;
}

enum DiscoveryAttachmentType {
  DISCOVERY_ATTACHMENT_TYPE_UNKNOWN = 0;

  // The attachment is posted in the prod namespace (without "-debug")
  DISCOVERY_ATTACHMENT_TYPE_NORMAL = 1;

  // The attachment is posted in the debug namespace (with "-debug")
  DISCOVERY_ATTACHMENT_TYPE_DEBUG = 2;
}

// Used when evaluating Relevance of a NearbyItem
// Values correspond to levels in the Discoverer Notification Policy Worksheet:
enum Evaluation {
  EVALUATION_UNKNOWN = 0;
  EVALUATION_BAD = 100;
  EVALUATION_POOR = 200;
  EVALUATION_NEUTRAL = 300;
  EVALUATION_OK = 400;
  EVALUATION_GOOD = 500;
  EVALUATION_GREAT = 600;
  EVALUATION_AMAZING = 700;
}

// Represents the type for the manufacturer.
enum ManufacturerType {
  // Unknown manufacturer type.
  MANUFACTURER_TYPE_UNKNOWN = 0;
  // Manufacturer of 1P devices.
  FIRST_PARTY = 1;
  // Manufacturer of 3P devices.
  THIRD_PARTY = 2;
}

// Features that can be enabled for a Fast Pair device.
enum FastPairFeature {
  FAST_PAIR_FEATURE_UNKNOWN = 0;
  SILENCE_MODE = 1;
  WIRELESS_CHARGING = 2;
  DYNAMIC_BUFFER_SIZE = 3;
  NO_PERSONALIZED_NAME = 4;
}

// Represents the type of device that is being registered.
enum DeviceType {
  // Unspecified device type.
  DEVICE_TYPE_UNSPECIFIED = 0;
  // Headphones or Earbuds.
  HEADPHONES = 1;
  // Speaker.
  SPEAKER = 2;
  // Wearable such as a watch.
  WEARABLE = 3;
  // Input devices such as keyboards, mice, etc.
  INPUT_DEVICE = 4;
  // Cars.
  AUTOMOTIVE = 5;
  // TODO(b/115353368): Add a custom description field for devices of type
  // OTHER (referencing how Status is structured).
  OTHER = 6;
  // True Wireless headphones (these include additional configuration options).
  TRUE_WIRELESS_HEADPHONES = 7;
  // WearOS watch. This should trigger explicit functionality on clients when
  // used, such as specifying BR/EDR transport type when creating a bond. It is
  // a subset of wearables working around specific issues on that platform.
  WEAR_OS = 8;
  // Android Auto has the particular Fast Pair UX flows which may not be bought
  // in by some car manufacturers (e.g. BMW). Sees go/fastpair-android-auto for
  // more details.
  ANDROID_AUTO = 9;
  GLASS = 10;
  LOCATOR_TAG = 11;
  CHROME_OS = 12;
  ANDROID_PHONE = 13;
  STYLUS = 14;
  ANDROID_TV = 15;
  BT_PORTABLE_PRINTER = 16;
  MOUSE = 17;
}

// Status types available for each device.
// PUBLISHED is the only state that shows notifications to the public.
enum StatusType {
  // Unknown status.
  TYPE_UNSPECIFIED = 0;
  // Drafted device.
  DRAFT = 1;
  // Submitted and waiting for approval.
  SUBMITTED = 2;
  // Fully approved and available for end users.
  PUBLISHED = 3;
  // Rejected and not available for end users.
  REJECTED = 4;
}