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 package com.android.bluetooth.hfp;
18 
19 /*
20  * @hide
21  */
22 
23 public final class HeadsetHalConstants {
24     // Do not modify without upating the HAL bt_hf.h files.
25 
26     // match up with bthf_connection_state_t enum of bt_hf.h
27     static final int CONNECTION_STATE_DISCONNECTED = 0;
28     static final int CONNECTION_STATE_CONNECTING = 1;
29     static final int CONNECTION_STATE_CONNECTED = 2;
30     static final int CONNECTION_STATE_SLC_CONNECTED = 3;
31     static final int CONNECTION_STATE_DISCONNECTING = 4;
32 
33     // match up with bthf_audio_state_t enum of bt_hf.h
34     static final int AUDIO_STATE_DISCONNECTED = 0;
35     static final int AUDIO_STATE_CONNECTING = 1;
36     static final int AUDIO_STATE_CONNECTED = 2;
37     static final int AUDIO_STATE_DISCONNECTING = 3;
38 
39     // match up with bthf_vr_state_t enum of bt_hf.h
40     static final int VR_STATE_STOPPED = 0;
41     static final int VR_STATE_STARTED = 1;
42 
43     // match up with bthf_volume_type_t enum of bt_hf.h
44     static final int VOLUME_TYPE_SPK = 0;
45     static final int VOLUME_TYPE_MIC = 1;
46 
47     // match up with bthf_network_state_t enum of bt_hf.h
48     static final int NETWORK_STATE_NOT_AVAILABLE = 0;
49     static final int NETWORK_STATE_AVAILABLE = 1;
50 
51     // match up with bthf_service_type_t enum of bt_hf.h
52     static final int SERVICE_TYPE_HOME = 0;
53     static final int SERVICE_TYPE_ROAMING = 1;
54 
55     // match up with bthf_at_response_t of bt_hf.h
56     static final int AT_RESPONSE_ERROR = 0;
57     static final int AT_RESPONSE_OK = 1;
58 
59     // match up with bthf_call_state_t of bt_hf.h
60     static final int CALL_STATE_ACTIVE = 0;
61     static final int CALL_STATE_HELD = 1;
62     static final int CALL_STATE_DIALING = 2;
63     static final int CALL_STATE_ALERTING = 3;
64     static final int CALL_STATE_INCOMING = 4;
65     static final int CALL_STATE_WAITING = 5;
66     static final int CALL_STATE_IDLE = 6;
67     static final int CALL_STATE_DISCONNECTED = 7;
68 
69     // match up with bthf_hf_ind_type_t of bt_hf.h
70     static final int HF_INDICATOR_ENHANCED_DRIVER_SAFETY = 1;
71     public static final int HF_INDICATOR_BATTERY_LEVEL_STATUS = 2;
72 
73     // match up with bthf_wbs_config_t of bt_hf.h
74     static final int BTHF_WBS_NONE = 0;
75     static final int BTHF_WBS_NO = 1;
76     static final int BTHF_WBS_YES = 2;
77 }
78