1#![allow(dead_code)]
2
3use num_enum::IntoPrimitive;
4use num_enum::TryFromPrimitive;
5
6#[repr(u8)]
9#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
10pub enum CreateConnectionChannelError {
11 NoError,
12 MaxPendingConnectionsReached,
13}
14
15#[repr(u8)]
16#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
17pub enum ConnectionStatus {
18 Disconnected,
19 Connected,
20 Ready,
21}
22
23#[repr(u8)]
24#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
25pub enum DisconnectReason {
26 Unspecified,
27 ConnectionEstablishmentFailed,
28 TimedOut,
29 BondingKeysMismatch,
30}
31
32#[repr(u8)]
33#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
34pub enum RemovedReason {
35 RemovedByThisClient,
36 ForceDisconnectedByThisClient,
37 ForceDisconnectedByOtherClient,
38
39 ButtonIsPrivate,
40 VerifyTimeout,
41 InternetBackendError,
42 InvalidData,
43
44 CouldntLoadDevice,
45
46 DeletedByThisClient,
47 DeletedByOtherClient,
48 ButtonBelongsToOtherPartner,
49 DeletedFromButton,
50}
51
52#[repr(u8)]
53#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
54pub enum ClickType {
55 ButtonDown,
56 ButtonUp,
57 ButtonClick,
58 ButtonSingleClick,
59 ButtonDoubleClick,
60 ButtonHold,
61}
62
63#[repr(u8)]
64#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
65pub enum BdAddrType {
66 PublicBdAddrType,
67 RandomBdAddrType,
68}
69
70#[repr(u8)]
71#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
72pub enum LatencyMode {
73 NormalLatency,
74 LowLatency,
75 HighLatency,
76}
77
78#[repr(u8)]
79#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
80pub enum ScanWizardResult {
81 WizardSuccess,
82 WizardCancelledByUser,
83 WizardFailedTimeout,
84 WizardButtonIsPrivate,
85 WizardBluetoothUnavailable,
86 WizardInternetBackendError,
87 WizardInvalidData,
88 WizardButtonBelongsToOtherPartner,
89 WizardButtonAlreadyConnectedToOtherDevice,
90}
91
92#[repr(u8)]
93#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, IntoPrimitive, TryFromPrimitive)]
94pub enum BluetoothControllerState {
95 Detached,
96 Resetting,
97 Attached,
98}