bt_metrics_registry/
bt_metrics_registry.rs

1// This file was generated by Cobalt's Registry parser based on the registry YAML
2// in the cobalt_config repository. Edit the YAML there to make changes.
3pub const CUSTOMER_NAME: &str = "fuchsia";
4pub const CUSTOMER_ID: u32 = 1;
5pub const PROJECT_NAME: &str = "bluetooth";
6pub const PROJECT_ID: u32 = 2322225253;
7
8// Exponential bucket constants for bt_host_adapter_event bt_host_adapter_event_histogram
9pub const BT_HOST_ADAPTER_EVENT_BT_HOST_ADAPTER_EVENT_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
10pub const BT_HOST_ADAPTER_EVENT_BT_HOST_ADAPTER_EVENT_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 23;
11pub const BT_HOST_ADAPTER_EVENT_BT_HOST_ADAPTER_EVENT_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 2;
12pub const BT_HOST_ADAPTER_EVENT_BT_HOST_ADAPTER_EVENT_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 0;
13pub const BT_HOST_ADAPTER_EVENT_BT_HOST_ADAPTER_EVENT_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
14
15// Linear bucket constants for paired_devices_total paired_devices_total_per_device_max
16pub const PAIRED_DEVICES_TOTAL_PAIRED_DEVICES_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_FLOOR: i64 = 0;
17pub const PAIRED_DEVICES_TOTAL_PAIRED_DEVICES_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_NUM_BUCKETS: u32 = 32;
18pub const PAIRED_DEVICES_TOTAL_PAIRED_DEVICES_TOTAL_PER_DEVICE_MAX_INT_BUCKETS_STEP_SIZE: u32 = 1;
19
20// Linear bucket constants for avdtp_delay_report_in_nanoseconds avdtp_average_delay_report_in_ns_histogram
21pub const AVDTP_DELAY_REPORT_IN_NANOSECONDS_AVDTP_AVERAGE_DELAY_REPORT_IN_NS_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
22pub const AVDTP_DELAY_REPORT_IN_NANOSECONDS_AVDTP_AVERAGE_DELAY_REPORT_IN_NS_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 20;
23pub const AVDTP_DELAY_REPORT_IN_NANOSECONDS_AVDTP_AVERAGE_DELAY_REPORT_IN_NS_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 100000000;
24
25// Exponential bucket constants for fastpair_provider_pairing_status daily_device_histograms
26pub const FASTPAIR_PROVIDER_PAIRING_STATUS_DAILY_DEVICE_HISTOGRAMS_INT_BUCKETS_FLOOR: i64 = 0;
27pub const FASTPAIR_PROVIDER_PAIRING_STATUS_DAILY_DEVICE_HISTOGRAMS_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
28pub const FASTPAIR_PROVIDER_PAIRING_STATUS_DAILY_DEVICE_HISTOGRAMS_INT_BUCKETS_INITIAL_STEP: u32 = 1;
29pub const FASTPAIR_PROVIDER_PAIRING_STATUS_DAILY_DEVICE_HISTOGRAMS_INT_BUCKETS_STEP_MULTIPLIER: u32 = 0;
30pub const FASTPAIR_PROVIDER_PAIRING_STATUS_DAILY_DEVICE_HISTOGRAMS_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
31
32// Exponential bucket constants for fastpair_provider_peer_request daily_request_histogram
33pub const FASTPAIR_PROVIDER_PEER_REQUEST_DAILY_REQUEST_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
34pub const FASTPAIR_PROVIDER_PEER_REQUEST_DAILY_REQUEST_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 10;
35pub const FASTPAIR_PROVIDER_PEER_REQUEST_DAILY_REQUEST_HISTOGRAM_INT_BUCKETS_INITIAL_STEP: u32 = 1;
36pub const FASTPAIR_PROVIDER_PEER_REQUEST_DAILY_REQUEST_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER: u32 = 0;
37pub const FASTPAIR_PROVIDER_PEER_REQUEST_DAILY_REQUEST_HISTOGRAM_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
38
39// Linear bucket constants for fastpair_provider_pairing_time_seconds daily_pairing_time_histogram
40pub const FASTPAIR_PROVIDER_PAIRING_TIME_SECONDS_DAILY_PAIRING_TIME_HISTOGRAM_INT_BUCKETS_FLOOR: i64 = 0;
41pub const FASTPAIR_PROVIDER_PAIRING_TIME_SECONDS_DAILY_PAIRING_TIME_HISTOGRAM_INT_BUCKETS_NUM_BUCKETS: u32 = 20;
42pub const FASTPAIR_PROVIDER_PAIRING_TIME_SECONDS_DAILY_PAIRING_TIME_HISTOGRAM_INT_BUCKETS_STEP_SIZE: u32 = 1;
43
44// Exponential bucket constants for a2dp_stream_duration_in_seconds_migrated a2dp_stream_duration_in_seconds_per_connection
45pub const A2DP_STREAM_DURATION_IN_SECONDS_MIGRATED_A2DP_STREAM_DURATION_IN_SECONDS_PER_CONNECTION_INT_BUCKETS_FLOOR: i64 = 0;
46pub const A2DP_STREAM_DURATION_IN_SECONDS_MIGRATED_A2DP_STREAM_DURATION_IN_SECONDS_PER_CONNECTION_INT_BUCKETS_NUM_BUCKETS: u32 = 17;
47pub const A2DP_STREAM_DURATION_IN_SECONDS_MIGRATED_A2DP_STREAM_DURATION_IN_SECONDS_PER_CONNECTION_INT_BUCKETS_INITIAL_STEP: u32 = 2;
48pub const A2DP_STREAM_DURATION_IN_SECONDS_MIGRATED_A2DP_STREAM_DURATION_IN_SECONDS_PER_CONNECTION_INT_BUCKETS_STEP_MULTIPLIER: u32 = 0;
49pub const A2DP_STREAM_DURATION_IN_SECONDS_MIGRATED_A2DP_STREAM_DURATION_IN_SECONDS_PER_CONNECTION_INT_BUCKETS_STEP_MULTIPLIER_FLOAT: f32 = 2.00f32;
50
51// Metric ID Constants
52// bt_host_adapter_event
53pub const BT_HOST_ADAPTER_EVENT_METRIC_ID: u32 = 9;
54// bt_host_peer_bonding_event
55pub const BT_HOST_PEER_BONDING_EVENT_METRIC_ID: u32 = 10;
56// bt_host_peer_connection_event
57pub const BT_HOST_PEER_CONNECTION_EVENT_METRIC_ID: u32 = 11;
58// avrcp_new_peers
59pub const AVRCP_NEW_PEERS_METRIC_ID: u32 = 12;
60// avrcp_connections
61pub const AVRCP_CONNECTIONS_METRIC_ID: u32 = 13;
62// avrcp_channel_errors
63pub const AVRCP_CHANNEL_ERRORS_METRIC_ID: u32 = 14;
64// avrcp_remote_peer_capabilities
65pub const AVRCP_REMOTE_PEER_CAPABILITIES_METRIC_ID: u32 = 15;
66// avrcp_distinct_remote_peer_capabilities
67pub const AVRCP_DISTINCT_REMOTE_PEER_CAPABILITIES_METRIC_ID: u32 = 16;
68// paired_devices_total
69pub const PAIRED_DEVICES_TOTAL_METRIC_ID: u32 = 17;
70// bt_host_le_peer_disconnection_event
71pub const BT_HOST_LE_PEER_DISCONNECTION_EVENT_METRIC_ID: u32 = 18;
72// bt_host_bredr_peer_disconnection_event
73pub const BT_HOST_BREDR_PEER_DISCONNECTION_EVENT_METRIC_ID: u32 = 19;
74// a2dp_remote_peer_capabilities
75pub const A2DP_REMOTE_PEER_CAPABILITIES_METRIC_ID: u32 = 20;
76// avdtp_delay_report_in_nanoseconds
77pub const AVDTP_DELAY_REPORT_IN_NANOSECONDS_METRIC_ID: u32 = 21;
78// avrcp_target_distinct_peer_player_capabilities
79pub const AVRCP_TARGET_DISTINCT_PEER_PLAYER_CAPABILITIES_METRIC_ID: u32 = 22;
80// fastpair_provider_pairing_status
81pub const FASTPAIR_PROVIDER_PAIRING_STATUS_METRIC_ID: u32 = 23;
82// fastpair_provider_peer_request
83pub const FASTPAIR_PROVIDER_PEER_REQUEST_METRIC_ID: u32 = 24;
84// fastpair_provider_pairing_time_seconds
85pub const FASTPAIR_PROVIDER_PAIRING_TIME_SECONDS_METRIC_ID: u32 = 25;
86// a2dp_codec_availability_migrated
87pub const A2DP_CODEC_AVAILABILITY_MIGRATED_METRIC_ID: u32 = 103;
88// pairing_method_migrated
89pub const PAIRING_METHOD_MIGRATED_METRIC_ID: u32 = 104;
90// pairing_result_migrated
91pub const PAIRING_RESULT_MIGRATED_METRIC_ID: u32 = 105;
92// l2cap_open_channel_migrated
93pub const L2CAP_OPEN_CHANNEL_MIGRATED_METRIC_ID: u32 = 106;
94// a2dp_stream_duration_in_seconds_migrated
95pub const A2DP_STREAM_DURATION_IN_SECONDS_MIGRATED_METRIC_ID: u32 = 108;
96
97// Enum for bluetooth (Metric Dimension mode)
98#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
99pub enum BluetoothMetricDimensionMode {
100  Le = 0,
101  BrEdr = 1,
102}
103
104impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionMode {
105  fn as_event_code(&self) -> u32 {
106    *self as u32
107  }
108}
109// Alias for bt_host_adapter_event (Metric Dimension mode) which has the same event codes
110pub use BluetoothMetricDimensionMode as BtHostAdapterEventMetricDimensionMode;
111
112// Alias for bt_host_peer_bonding_event (Metric Dimension mode) which has the same event codes
113pub use BluetoothMetricDimensionMode as BtHostPeerBondingEventMetricDimensionMode;
114
115// Alias for bt_host_peer_connection_event (Metric Dimension mode) which has the same event codes
116pub use BluetoothMetricDimensionMode as BtHostPeerConnectionEventMetricDimensionMode;
117
118// Enum for bt_host_adapter_event (Metric Dimension event)
119#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
120pub enum BtHostAdapterEventMetricDimensionEvent {
121  OpenL2capChannelRequest = 0,
122  OutgoingConnectionRequest = 1,
123  PairRequest = 2,
124  RequestDiscoverable = 3,
125  RequestDiscovery = 4,
126  SetConnectableTrue = 5,
127  SetConnectableFalse = 6,
128  StartAdvertising = 7,
129  StopAdvertising = 8,
130  StartDiscovery = 9,
131}
132
133impl cobalt_client::traits::AsEventCode for BtHostAdapterEventMetricDimensionEvent {
134  fn as_event_code(&self) -> u32 {
135    *self as u32
136  }
137}
138
139// Enum for bt_host_peer_bonding_event (Metric Dimension event)
140#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
141pub enum BtHostPeerBondingEventMetricDimensionEvent {
142  Success = 0,
143  Failure = 1,
144}
145
146impl cobalt_client::traits::AsEventCode for BtHostPeerBondingEventMetricDimensionEvent {
147  fn as_event_code(&self) -> u32 {
148    *self as u32
149  }
150}
151
152// Enum for bt_host_peer_connection_event (Metric Dimension event)
153#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
154pub enum BtHostPeerConnectionEventMetricDimensionEvent {
155  Success = 0,
156  Failure = 1,
157  InterrogationComplete = 2,
158  PageTimeout = 3,
159}
160
161impl cobalt_client::traits::AsEventCode for BtHostPeerConnectionEventMetricDimensionEvent {
162  fn as_event_code(&self) -> u32 {
163    *self as u32
164  }
165}
166
167// Enum for bluetooth (Metric Dimension direction)
168#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
169pub enum BluetoothMetricDimensionDirection {
170  Unspecified = 0,
171  Incoming = 1,
172  Outgoing = 2,
173}
174
175impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionDirection {
176  fn as_event_code(&self) -> u32 {
177    *self as u32
178  }
179}
180// Alias for bt_host_peer_connection_event (Metric Dimension direction) which has the same event codes
181pub use BluetoothMetricDimensionDirection as BtHostPeerConnectionEventMetricDimensionDirection;
182
183// Enum for bluetooth (Metric Dimension channel)
184#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
185pub enum BluetoothMetricDimensionChannel {
186  Control = 0,
187  Browse = 1,
188}
189
190impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionChannel {
191  fn as_event_code(&self) -> u32 {
192    *self as u32
193  }
194}
195// Alias for avrcp_connections (Metric Dimension channel) which has the same event codes
196pub use BluetoothMetricDimensionChannel as AvrcpConnectionsMetricDimensionChannel;
197
198// Enum for bluetooth (Metric Dimension type)
199#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
200pub enum BluetoothMetricDimensionType {
201  ConnectionError = 0,
202  ControlChannelCollision = 1,
203}
204
205impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionType {
206  fn as_event_code(&self) -> u32 {
207    *self as u32
208  }
209}
210// Alias for avrcp_channel_errors (Metric Dimension type) which has the same event codes
211pub use BluetoothMetricDimensionType as AvrcpChannelErrorsMetricDimensionType;
212
213// Enum for bluetooth (Metric Dimension remote_role)
214#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
215pub enum BluetoothMetricDimensionRemoteRole {
216  Target = 0,
217  Controller = 1,
218}
219
220impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionRemoteRole {
221  fn as_event_code(&self) -> u32 {
222    *self as u32
223  }
224}
225// Alias for avrcp_remote_peer_capabilities (Metric Dimension remote_role) which has the same event codes
226pub use BluetoothMetricDimensionRemoteRole as AvrcpRemotePeerCapabilitiesMetricDimensionRemoteRole;
227
228// Alias for avrcp_distinct_remote_peer_capabilities (Metric Dimension remote_role) which has the same event codes
229pub use BluetoothMetricDimensionRemoteRole as AvrcpDistinctRemotePeerCapabilitiesMetricDimensionRemoteRole;
230
231// Enum for bluetooth (Metric Dimension feature)
232#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
233pub enum BluetoothMetricDimensionFeature {
234  SupportsBrowsing = 0,
235  SupportsCoverArt = 1,
236}
237
238impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionFeature {
239  fn as_event_code(&self) -> u32 {
240    *self as u32
241  }
242}
243// Alias for avrcp_remote_peer_capabilities (Metric Dimension feature) which has the same event codes
244pub use BluetoothMetricDimensionFeature as AvrcpRemotePeerCapabilitiesMetricDimensionFeature;
245
246// Alias for avrcp_distinct_remote_peer_capabilities (Metric Dimension feature) which has the same event codes
247pub use BluetoothMetricDimensionFeature as AvrcpDistinctRemotePeerCapabilitiesMetricDimensionFeature;
248
249// Enum for bt_host_le_peer_disconnection_event (Metric Dimension reason)
250#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
251pub enum BtHostLePeerDisconnectionEventMetricDimensionReason {
252  Unknown = 0,
253  ExplictDisconnect = 1,
254  LinkError = 2,
255  ZeroRef = 3,
256  RemoteDisconnection = 4,
257}
258
259impl cobalt_client::traits::AsEventCode for BtHostLePeerDisconnectionEventMetricDimensionReason {
260  fn as_event_code(&self) -> u32 {
261    *self as u32
262  }
263}
264
265// Enum for bt_host_bredr_peer_disconnection_event (Metric Dimension reason)
266#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
267pub enum BtHostBredrPeerDisconnectionEventMetricDimensionReason {
268  Unknown = 0,
269  ApiRequest = 1,
270  InterrogationFailed = 2,
271  PairingFailed = 3,
272  AclLinkError = 4,
273  PeerDisconnection = 5,
274}
275
276impl cobalt_client::traits::AsEventCode for BtHostBredrPeerDisconnectionEventMetricDimensionReason {
277  fn as_event_code(&self) -> u32 {
278    *self as u32
279  }
280}
281
282// Enum for bluetooth (Metric Dimension capability)
283#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
284pub enum BluetoothMetricDimensionCapability {
285  Unknown = 0,
286  Basic = 1,
287  DelayReport = 2,
288  Reporting = 3,
289  Recovery = 4,
290  ContentProtection = 5,
291  HeaderCompression = 6,
292  Multiplexing = 7,
293}
294
295impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionCapability {
296  fn as_event_code(&self) -> u32 {
297    *self as u32
298  }
299}
300// Alias for a2dp_remote_peer_capabilities (Metric Dimension capability) which has the same event codes
301pub use BluetoothMetricDimensionCapability as A2dpRemotePeerCapabilitiesMetricDimensionCapability;
302
303// Enum for avrcp_target_distinct_peer_player_capabilities (Metric Dimension browsing)
304#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
305pub enum AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionBrowsing {
306  Unknown = 0,
307  Unsupported = 1,
308  Supported = 2,
309  SupportedWhenAddressed = 3,
310}
311
312impl cobalt_client::traits::AsEventCode for AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionBrowsing {
313  fn as_event_code(&self) -> u32 {
314    *self as u32
315  }
316}
317
318// Alias for avrcp_target_distinct_peer_player_capabilities (Metric Dimension searching) which has the same event codes
319pub use AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionBrowsing as AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionSearching;
320
321// Enum for bluetooth (Metric Dimension now_playing)
322#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
323pub enum BluetoothMetricDimensionNowPlaying {
324  Unknown = 0,
325  Unsupported = 1,
326  Supported = 2,
327}
328
329impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionNowPlaying {
330  fn as_event_code(&self) -> u32 {
331    *self as u32
332  }
333}
334// Alias for avrcp_target_distinct_peer_player_capabilities (Metric Dimension now_playing) which has the same event codes
335pub use BluetoothMetricDimensionNowPlaying as AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionNowPlaying;
336
337// Enum for fastpair_provider_pairing_status (Metric Dimension result)
338#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
339pub enum FastpairProviderPairingStatusMetricDimensionResult {
340  Success = 1,
341  Failure = 2,
342}
343
344impl cobalt_client::traits::AsEventCode for FastpairProviderPairingStatusMetricDimensionResult {
345  fn as_event_code(&self) -> u32 {
346    *self as u32
347  }
348}
349
350// Enum for bluetooth (Metric Dimension request_type)
351#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
352pub enum BluetoothMetricDimensionRequestType {
353  RetroactivePairing = 1,
354  PersonalizedNameWrite = 2,
355  ProviderInitiatesPairing = 3,
356  DeviceAction = 4,
357}
358
359impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionRequestType {
360  fn as_event_code(&self) -> u32 {
361    *self as u32
362  }
363}
364// Alias for fastpair_provider_peer_request (Metric Dimension request_type) which has the same event codes
365pub use BluetoothMetricDimensionRequestType as FastpairProviderPeerRequestMetricDimensionRequestType;
366
367// Enum for bluetooth (Metric Dimension codec)
368#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
369pub enum BluetoothMetricDimensionCodec {
370  Unknown = 0,
371  Sbc = 1,
372  Mpeg12 = 2,
373  Aac = 3,
374  Atrac = 4,
375  VendorSpecific = 5,
376}
377
378impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionCodec {
379  fn as_event_code(&self) -> u32 {
380    *self as u32
381  }
382}
383// Alias for a2dp_codec_availability_migrated (Metric Dimension codec) which has the same event codes
384pub use BluetoothMetricDimensionCodec as A2dpCodecAvailabilityMigratedMetricDimensionCodec;
385
386// Alias for a2dp_stream_duration_in_seconds_migrated (Metric Dimension codec) which has the same event codes
387pub use BluetoothMetricDimensionCodec as A2dpStreamDurationInSecondsMigratedMetricDimensionCodec;
388
389// Enum for bluetooth (Metric Dimension method)
390#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
391pub enum BluetoothMetricDimensionMethod {
392  Consent = 0,
393  PasskeyDisplay = 1,
394  PasskeyComparison = 2,
395  PasskeyEntry = 3,
396}
397
398impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionMethod {
399  fn as_event_code(&self) -> u32 {
400    *self as u32
401  }
402}
403// Alias for pairing_method_migrated (Metric Dimension method) which has the same event codes
404pub use BluetoothMetricDimensionMethod as PairingMethodMigratedMetricDimensionMethod;
405
406// Enum for pairing_result_migrated (Metric Dimension result)
407#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
408pub enum PairingResultMigratedMetricDimensionResult {
409  Success = 0,
410  ErrorUnknown = 1,
411  ErrorCanceled = 2,
412  ErrorInProgress = 3,
413  ErrorTimedOut = 4,
414  ErrorNotFound = 5,
415  ErrorNotSupported = 6,
416  ErrorBluetoothNotAvailable = 7,
417  ErrorBadState = 8,
418  ErrorInvalidArguments = 9,
419  ErrorAlready = 10,
420  ErrorProtocolError = 11,
421}
422
423impl cobalt_client::traits::AsEventCode for PairingResultMigratedMetricDimensionResult {
424  fn as_event_code(&self) -> u32 {
425    *self as u32
426  }
427}
428
429// Enum for bluetooth (Metric Dimension link_layer_type)
430#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
431pub enum BluetoothMetricDimensionLinkLayerType {
432  Acl = 0,
433  Le = 1,
434}
435
436impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionLinkLayerType {
437  fn as_event_code(&self) -> u32 {
438    *self as u32
439  }
440}
441// Alias for l2cap_open_channel_migrated (Metric Dimension link_layer_type) which has the same event codes
442pub use BluetoothMetricDimensionLinkLayerType as L2capOpenChannelMigratedMetricDimensionLinkLayerType;
443
444// Enum for bluetooth (Metric Dimension initiator)
445#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
446pub enum BluetoothMetricDimensionInitiator {
447  True = 0,
448  False = 1,
449}
450
451impl cobalt_client::traits::AsEventCode for BluetoothMetricDimensionInitiator {
452  fn as_event_code(&self) -> u32 {
453    *self as u32
454  }
455}
456// Alias for l2cap_open_channel_migrated (Metric Dimension initiator) which has the same event codes
457pub use BluetoothMetricDimensionInitiator as L2capOpenChannelMigratedMetricDimensionInitiator;
458
459#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
460pub struct BtHostAdapterEventEventCodes {
461  pub mode: BtHostAdapterEventMetricDimensionMode,
462  pub event: BtHostAdapterEventMetricDimensionEvent,
463}
464
465impl cobalt_client::traits::AsEventCodes for BtHostAdapterEventEventCodes {
466  fn as_event_codes(&self) -> Vec<u32> {
467    use cobalt_client::traits::AsEventCode;
468    vec![
469      self.mode.as_event_code(),
470      self.event.as_event_code(),
471    ]
472  }
473}
474
475#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
476pub struct BtHostPeerBondingEventEventCodes {
477  pub mode: BtHostPeerBondingEventMetricDimensionMode,
478  pub event: BtHostPeerBondingEventMetricDimensionEvent,
479}
480
481impl cobalt_client::traits::AsEventCodes for BtHostPeerBondingEventEventCodes {
482  fn as_event_codes(&self) -> Vec<u32> {
483    use cobalt_client::traits::AsEventCode;
484    vec![
485      self.mode.as_event_code(),
486      self.event.as_event_code(),
487    ]
488  }
489}
490
491#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
492pub struct BtHostPeerConnectionEventEventCodes {
493  pub mode: BtHostPeerConnectionEventMetricDimensionMode,
494  pub event: BtHostPeerConnectionEventMetricDimensionEvent,
495  pub direction: BtHostPeerConnectionEventMetricDimensionDirection,
496}
497
498impl cobalt_client::traits::AsEventCodes for BtHostPeerConnectionEventEventCodes {
499  fn as_event_codes(&self) -> Vec<u32> {
500    use cobalt_client::traits::AsEventCode;
501    vec![
502      self.mode.as_event_code(),
503      self.event.as_event_code(),
504      self.direction.as_event_code(),
505    ]
506  }
507}
508
509#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
510pub struct AvrcpRemotePeerCapabilitiesEventCodes {
511  pub remote_role: AvrcpRemotePeerCapabilitiesMetricDimensionRemoteRole,
512  pub feature: AvrcpRemotePeerCapabilitiesMetricDimensionFeature,
513}
514
515impl cobalt_client::traits::AsEventCodes for AvrcpRemotePeerCapabilitiesEventCodes {
516  fn as_event_codes(&self) -> Vec<u32> {
517    use cobalt_client::traits::AsEventCode;
518    vec![
519      self.remote_role.as_event_code(),
520      self.feature.as_event_code(),
521    ]
522  }
523}
524
525#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
526pub struct AvrcpDistinctRemotePeerCapabilitiesEventCodes {
527  pub remote_role: AvrcpDistinctRemotePeerCapabilitiesMetricDimensionRemoteRole,
528  pub feature: AvrcpDistinctRemotePeerCapabilitiesMetricDimensionFeature,
529}
530
531impl cobalt_client::traits::AsEventCodes for AvrcpDistinctRemotePeerCapabilitiesEventCodes {
532  fn as_event_codes(&self) -> Vec<u32> {
533    use cobalt_client::traits::AsEventCode;
534    vec![
535      self.remote_role.as_event_code(),
536      self.feature.as_event_code(),
537    ]
538  }
539}
540
541#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
542pub struct AvrcpTargetDistinctPeerPlayerCapabilitiesEventCodes {
543  pub browsing: AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionBrowsing,
544  pub searching: AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionSearching,
545  pub now_playing: AvrcpTargetDistinctPeerPlayerCapabilitiesMetricDimensionNowPlaying,
546}
547
548impl cobalt_client::traits::AsEventCodes for AvrcpTargetDistinctPeerPlayerCapabilitiesEventCodes {
549  fn as_event_codes(&self) -> Vec<u32> {
550    use cobalt_client::traits::AsEventCode;
551    vec![
552      self.browsing.as_event_code(),
553      self.searching.as_event_code(),
554      self.now_playing.as_event_code(),
555    ]
556  }
557}
558
559#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
560pub struct L2capOpenChannelMigratedEventCodes {
561  pub link_layer_type: L2capOpenChannelMigratedMetricDimensionLinkLayerType,
562  pub initiator: L2capOpenChannelMigratedMetricDimensionInitiator,
563}
564
565impl cobalt_client::traits::AsEventCodes for L2capOpenChannelMigratedEventCodes {
566  fn as_event_codes(&self) -> Vec<u32> {
567    use cobalt_client::traits::AsEventCode;
568    vec![
569      self.link_layer_type.as_event_code(),
570      self.initiator.as_event_code(),
571    ]
572  }
573}
574