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 /* SWB codec setting */ 60 typedef enum { BTHF_SWB_NONE, BTHF_SWB_NO, BTHF_SWB_YES } bthf_swb_config_t; 61 62 /* CHLD - Call held handling */ 63 typedef enum { 64 BTHF_CHLD_TYPE_RELEASEHELD, // Terminate all held or set UDUB("busy") to a 65 // waiting call 66 BTHF_CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD, // Terminate all active calls and 67 // accepts a waiting/held call 68 BTHF_CHLD_TYPE_HOLDACTIVE_ACCEPTHELD, // Hold all active calls and accepts a 69 // waiting/held call 70 BTHF_CHLD_TYPE_ADDHELDTOCONF, // Add all held calls to a conference 71 } bthf_chld_type_t; 72 73 /* HF Indicators HFP 1.7 */ 74 typedef enum { 75 BTHF_HF_IND_ENHANCED_DRIVER_SAFETY = 1, 76 BTHF_HF_IND_BATTERY_LEVEL_STATUS = 2, 77 } bthf_hf_ind_type_t; 78 79 typedef enum { 80 BTHF_HF_IND_DISABLED = 0, 81 BTHF_HF_IND_ENABLED, 82 } bthf_hf_ind_status_t; 83 84 /** Network Status */ 85 typedef enum { 86 BTHF_NETWORK_STATE_NOT_AVAILABLE = 0, 87 BTHF_NETWORK_STATE_AVAILABLE 88 } bthf_network_state_t; 89 90 /** Service type */ 91 typedef enum { 92 BTHF_SERVICE_TYPE_HOME = 0, 93 BTHF_SERVICE_TYPE_ROAMING 94 } bthf_service_type_t; 95 96 typedef enum { 97 BTHF_CALL_STATE_ACTIVE = 0, 98 BTHF_CALL_STATE_HELD, 99 BTHF_CALL_STATE_DIALING, 100 BTHF_CALL_STATE_ALERTING, 101 BTHF_CALL_STATE_INCOMING, 102 BTHF_CALL_STATE_WAITING, 103 BTHF_CALL_STATE_IDLE, 104 BTHF_CALL_STATE_DISCONNECTED 105 } bthf_call_state_t; 106 107 typedef enum { 108 BTHF_CALL_DIRECTION_OUTGOING = 0, 109 BTHF_CALL_DIRECTION_INCOMING 110 } bthf_call_direction_t; 111 112 typedef enum { 113 BTHF_CALL_TYPE_VOICE = 0, 114 BTHF_CALL_TYPE_DATA, 115 BTHF_CALL_TYPE_FAX 116 } bthf_call_mode_t; 117 118 typedef enum { 119 BTHF_CALL_MPTY_TYPE_SINGLE = 0, 120 BTHF_CALL_MPTY_TYPE_MULTI 121 } bthf_call_mpty_type_t; 122 123 typedef enum { 124 BTHF_CALL_ADDRTYPE_UNKNOWN = 0x81, 125 BTHF_CALL_ADDRTYPE_INTERNATIONAL = 0x91 126 } bthf_call_addrtype_t; 127 128 } // namespace headset 129 } // namespace bluetooth 130