enums.proto 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. syntax = "proto3";
  5. package nearby.fastpair;
  6. // Represents the format of the final device notification (which is directly
  7. // correlated to the action taken by the notification).
  8. enum NotificationType {
  9. // Unspecified notification type.
  10. NOTIFICATION_TYPE_UNSPECIFIED = 0;
  11. // Notification launches the fast pair intent.
  12. // Example Notification Title: "Bose SoundLink II"
  13. // Notification Description: "Tap to pair with this device"
  14. FAST_PAIR = 1;
  15. // Notification launches an app.
  16. // Notification Title: "[X]" where X is type/name of the device.
  17. // Notification Description: "Tap to setup this device"
  18. APP_LAUNCH = 2;
  19. // Notification launches for Nearby Setup. The notification title and
  20. // description is the same as APP_LAUNCH.
  21. NEARBY_SETUP = 3;
  22. // Notification launches the fast pair intent, but doesn't include an anti-
  23. // spoofing key. The notification title and description is the same as
  24. // FAST_PAIR.
  25. FAST_PAIR_ONE = 4;
  26. // Notification launches Smart Setup on devices.
  27. // These notifications are identical to APP_LAUNCH except that they always
  28. // launch Smart Setup intents within GMSCore.
  29. SMART_SETUP = 5;
  30. }
  31. // How the device will be interacted with when it is seen.
  32. enum InteractionType {
  33. INTERACTION_TYPE_UNKNOWN = 0;
  34. AUTO_LAUNCH = 1;
  35. NOTIFICATION = 2;
  36. }
  37. // The status of the user's consent opt-in.
  38. enum OptInStatus {
  39. STATUS_UNKNOWN = 0;
  40. STATUS_OPTED_IN = 1;
  41. STATUS_OPTED_OUT = 2;
  42. }
  43. // The type of a NearbyItem. Determines how the item is handled (e.g. we may
  44. // display a different notification style for different types). It may not
  45. // indicate the source of the data (e.g., an attachment on the Proximity Beacon
  46. // Service that represents a device needing to be set up might become a
  47. // NearbyItem with type=DEVICE).
  48. enum NearbyType {
  49. NEARBY_TYPE_UNKNOWN = 0;
  50. // Proximity Beacon Service (PBS). This is the only type of nearbyItems which
  51. // can be customized by 3p and therefore the intents passed should not be
  52. // completely trusted. Deprecated already.
  53. NEARBY_PROXIMITY_BEACON = 1;
  54. // Physical Web URL beacon. Deprecated already.
  55. NEARBY_PHYSICAL_WEB = 2;
  56. // Chromecast beacon. Used on client-side only.
  57. NEARBY_CHROMECAST = 3;
  58. // Wear beacon. Used on client-side only.
  59. NEARBY_WEAR = 4;
  60. // A device (e.g. a Magic Pair device that needs to be set up). The special-
  61. // case devices above (e.g. ChromeCast, Wear) might migrate to this type.
  62. NEARBY_DEVICE = 6;
  63. // Popular apps/urls based on user's current geo-location.
  64. NEARBY_POPULAR_HERE = 7;
  65. reserved 5;
  66. }
  67. enum ResolvedUrlType {
  68. RESOLVED_URL_TYPE_UNKNOWN = 0;
  69. // The url is resolved to a web page that is not a play store app.
  70. // This can be considered as the default resolved type when it's
  71. // not the other specific types.
  72. WEBPAGE = 1;
  73. // The url is resolved to the Google Play store app
  74. // ie. play.google.com/store
  75. APP = 2;
  76. }
  77. enum DiscoveryAttachmentType {
  78. DISCOVERY_ATTACHMENT_TYPE_UNKNOWN = 0;
  79. // The attachment is posted in the prod namespace (without "-debug")
  80. DISCOVERY_ATTACHMENT_TYPE_NORMAL = 1;
  81. // The attachment is posted in the debug namespace (with "-debug")
  82. DISCOVERY_ATTACHMENT_TYPE_DEBUG = 2;
  83. }
  84. // Used when evaluating Relevance of a NearbyItem
  85. // Values correspond to levels in the Discoverer Notification Policy Worksheet:
  86. enum Evaluation {
  87. EVALUATION_UNKNOWN = 0;
  88. EVALUATION_BAD = 100;
  89. EVALUATION_POOR = 200;
  90. EVALUATION_NEUTRAL = 300;
  91. EVALUATION_OK = 400;
  92. EVALUATION_GOOD = 500;
  93. EVALUATION_GREAT = 600;
  94. EVALUATION_AMAZING = 700;
  95. }
  96. // Represents the type for the manufacturer.
  97. enum ManufacturerType {
  98. // Unknown manufacturer type.
  99. MANUFACTURER_TYPE_UNKNOWN = 0;
  100. // Manufacturer of 1P devices.
  101. FIRST_PARTY = 1;
  102. // Manufacturer of 3P devices.
  103. THIRD_PARTY = 2;
  104. }
  105. // Features that can be enabled for a Fast Pair device.
  106. enum FastPairFeature {
  107. FAST_PAIR_FEATURE_UNKNOWN = 0;
  108. SILENCE_MODE = 1;
  109. WIRELESS_CHARGING = 2;
  110. DYNAMIC_BUFFER_SIZE = 3;
  111. NO_PERSONALIZED_NAME = 4;
  112. }
  113. // Represents the type of device that is being registered.
  114. enum DeviceType {
  115. // Unspecified device type.
  116. DEVICE_TYPE_UNSPECIFIED = 0;
  117. // Headphones or Earbuds.
  118. HEADPHONES = 1;
  119. // Speaker.
  120. SPEAKER = 2;
  121. // Wearable such as a watch.
  122. WEARABLE = 3;
  123. // Input devices such as keyboards, mice, etc.
  124. INPUT_DEVICE = 4;
  125. // Cars.
  126. AUTOMOTIVE = 5;
  127. // TODO(b/115353368): Add a custom description field for devices of type
  128. // OTHER (referencing how Status is structured).
  129. OTHER = 6;
  130. // True Wireless headphones (these include additional configuration options).
  131. TRUE_WIRELESS_HEADPHONES = 7;
  132. // WearOS watch. This should trigger explicit functionality on clients when
  133. // used, such as specifying BR/EDR transport type when creating a bond. It is
  134. // a subset of wearables working around specific issues on that platform.
  135. WEAR_OS = 8;
  136. // Android Auto has the particular Fast Pair UX flows which may not be bought
  137. // in by some car manufacturers (e.g. BMW). Sees go/fastpair-android-auto for
  138. // more details.
  139. ANDROID_AUTO = 9;
  140. }