1 /*
2  * Copyright (C) 2012 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 namespace bluetooth {
20 namespace headset {
21 
22 /* AT response code - OK/Error */
23 typedef enum {
24   BTHF_AT_RESPONSE_ERROR = 0,
25   BTHF_AT_RESPONSE_OK
26 } bthf_at_response_t;
27 
28 typedef enum {
29   BTHF_CONNECTION_STATE_DISCONNECTED = 0,
30   BTHF_CONNECTION_STATE_CONNECTING,
31   BTHF_CONNECTION_STATE_CONNECTED,
32   BTHF_CONNECTION_STATE_SLC_CONNECTED,
33   BTHF_CONNECTION_STATE_DISCONNECTING
34 } bthf_connection_state_t;
35 
36 typedef enum {
37   BTHF_AUDIO_STATE_DISCONNECTED = 0,
38   BTHF_AUDIO_STATE_CONNECTING,
39   BTHF_AUDIO_STATE_CONNECTED,
40   BTHF_AUDIO_STATE_DISCONNECTING
41 } bthf_audio_state_t;
42 
43 typedef enum {
44   BTHF_VR_STATE_STOPPED = 0,
45   BTHF_VR_STATE_STARTED
46 } bthf_vr_state_t;
47 
48 typedef enum {
49   BTHF_VOLUME_TYPE_SPK = 0,
50   BTHF_VOLUME_TYPE_MIC
51 } bthf_volume_type_t;
52 
53 /* Noise Reduction and Echo Cancellation */
54 typedef enum { BTHF_NREC_STOP, BTHF_NREC_START } bthf_nrec_t;
55 
56 /* WBS codec setting */
57 typedef enum { BTHF_WBS_NONE, BTHF_WBS_NO, BTHF_WBS_YES } bthf_wbs_config_t;
58 
59 /* CHLD - Call held handling */
60 typedef enum {
61   BTHF_CHLD_TYPE_RELEASEHELD,  // Terminate all held or set UDUB("busy") to a
62                                // waiting call
63   BTHF_CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD,  // Terminate all active calls and
64                                             // accepts a waiting/held call
65   BTHF_CHLD_TYPE_HOLDACTIVE_ACCEPTHELD,  // Hold all active calls and accepts a
66                                          // waiting/held call
67   BTHF_CHLD_TYPE_ADDHELDTOCONF,          // Add all held calls to a conference
68 } bthf_chld_type_t;
69 
70 /* HF Indicators HFP 1.7 */
71 typedef enum {
72   BTHF_HF_IND_ENHANCED_DRIVER_SAFETY = 1,
73   BTHF_HF_IND_BATTERY_LEVEL_STATUS = 2,
74 } bthf_hf_ind_type_t;
75 
76 typedef enum {
77   BTHF_HF_IND_DISABLED = 0,
78   BTHF_HF_IND_ENABLED,
79 } bthf_hf_ind_status_t;
80 
81 /** Network Status */
82 typedef enum {
83   BTHF_NETWORK_STATE_NOT_AVAILABLE = 0,
84   BTHF_NETWORK_STATE_AVAILABLE
85 } bthf_network_state_t;
86 
87 /** Service type */
88 typedef enum {
89   BTHF_SERVICE_TYPE_HOME = 0,
90   BTHF_SERVICE_TYPE_ROAMING
91 } bthf_service_type_t;
92 
93 typedef enum {
94   BTHF_CALL_STATE_ACTIVE = 0,
95   BTHF_CALL_STATE_HELD,
96   BTHF_CALL_STATE_DIALING,
97   BTHF_CALL_STATE_ALERTING,
98   BTHF_CALL_STATE_INCOMING,
99   BTHF_CALL_STATE_WAITING,
100   BTHF_CALL_STATE_IDLE,
101   BTHF_CALL_STATE_DISCONNECTED
102 } bthf_call_state_t;
103 
104 typedef enum {
105   BTHF_CALL_DIRECTION_OUTGOING = 0,
106   BTHF_CALL_DIRECTION_INCOMING
107 } bthf_call_direction_t;
108 
109 typedef enum {
110   BTHF_CALL_TYPE_VOICE = 0,
111   BTHF_CALL_TYPE_DATA,
112   BTHF_CALL_TYPE_FAX
113 } bthf_call_mode_t;
114 
115 typedef enum {
116   BTHF_CALL_MPTY_TYPE_SINGLE = 0,
117   BTHF_CALL_MPTY_TYPE_MULTI
118 } bthf_call_mpty_type_t;
119 
120 typedef enum {
121   BTHF_CALL_ADDRTYPE_UNKNOWN = 0x81,
122   BTHF_CALL_ADDRTYPE_INTERNATIONAL = 0x91
123 } bthf_call_addrtype_t;
124 
125 }  // namespace headset
126 }  // namespace bluetooth