1 //! Various libraries to access the profile interfaces.
2 use num_derive::{FromPrimitive, ToPrimitive};
3 
4 /// Generic type for keeping track of profile connections.
5 #[derive(Clone, Debug, FromPrimitive, PartialEq, ToPrimitive)]
6 #[repr(u32)]
7 pub enum ProfileConnectionState {
8     /// The profile is completely disconnected.
9     Disconnected = 0,
10 
11     /// The profile is in the process of disconnecting everything.
12     Disconnecting = 1,
13 
14     /// The profile is in the process of connecting at least 1 device.
15     Connecting = 2,
16 
17     /// The profile has at least 1 device connected but not active.
18     Connected = 3,
19 
20     /// The profile has at least 1 device connected and active. For some apis which don't
21     /// distinguish between |Connected| and |Active|, the state should always be |Active|.
22     Active = 4,
23 
24     /// Invalid connection state which can be used to identify error states. Use a value that is
25     /// efficiently representable via protobuf (equivalent of i32::MAX - 1).
26     Invalid = 0x7fff_fffe,
27 }
28 
29 pub mod a2dp;
30 pub mod avrcp;
31 pub mod csis;
32 pub mod gatt;
33 pub mod hf_client;
34 pub mod hfp;
35 pub mod hid_host;
36 pub mod le_audio;
37 pub mod sdp;
38 pub mod socket;
39 pub mod vc;
40