bt_hf.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. #pragma once
  17. namespace bluetooth {
  18. namespace headset {
  19. /* AT response code - OK/Error */
  20. typedef enum {
  21. BTHF_AT_RESPONSE_ERROR = 0,
  22. BTHF_AT_RESPONSE_OK
  23. } bthf_at_response_t;
  24. typedef enum {
  25. BTHF_CONNECTION_STATE_DISCONNECTED = 0,
  26. BTHF_CONNECTION_STATE_CONNECTING,
  27. BTHF_CONNECTION_STATE_CONNECTED,
  28. BTHF_CONNECTION_STATE_SLC_CONNECTED,
  29. BTHF_CONNECTION_STATE_DISCONNECTING
  30. } bthf_connection_state_t;
  31. typedef enum {
  32. BTHF_AUDIO_STATE_DISCONNECTED = 0,
  33. BTHF_AUDIO_STATE_CONNECTING,
  34. BTHF_AUDIO_STATE_CONNECTED,
  35. BTHF_AUDIO_STATE_DISCONNECTING
  36. } bthf_audio_state_t;
  37. typedef enum {
  38. BTHF_VR_STATE_STOPPED = 0,
  39. BTHF_VR_STATE_STARTED
  40. } bthf_vr_state_t;
  41. typedef enum {
  42. BTHF_VOLUME_TYPE_SPK = 0,
  43. BTHF_VOLUME_TYPE_MIC
  44. } bthf_volume_type_t;
  45. /* Noise Reduction and Echo Cancellation */
  46. typedef enum { BTHF_NREC_STOP, BTHF_NREC_START } bthf_nrec_t;
  47. /* WBS codec setting */
  48. typedef enum { BTHF_WBS_NONE, BTHF_WBS_NO, BTHF_WBS_YES } bthf_wbs_config_t;
  49. /* CHLD - Call held handling */
  50. typedef enum {
  51. BTHF_CHLD_TYPE_RELEASEHELD, // Terminate all held or set UDUB("busy") to a
  52. // waiting call
  53. BTHF_CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD, // Terminate all active calls and
  54. // accepts a waiting/held call
  55. BTHF_CHLD_TYPE_HOLDACTIVE_ACCEPTHELD, // Hold all active calls and accepts a
  56. // waiting/held call
  57. BTHF_CHLD_TYPE_ADDHELDTOCONF, // Add all held calls to a conference
  58. } bthf_chld_type_t;
  59. /* HF Indicators HFP 1.7 */
  60. typedef enum {
  61. BTHF_HF_IND_ENHANCED_DRIVER_SAFETY = 1,
  62. BTHF_HF_IND_BATTERY_LEVEL_STATUS = 2,
  63. } bthf_hf_ind_type_t;
  64. typedef enum {
  65. BTHF_HF_IND_DISABLED = 0,
  66. BTHF_HF_IND_ENABLED,
  67. } bthf_hf_ind_status_t;
  68. /** Network Status */
  69. typedef enum {
  70. BTHF_NETWORK_STATE_NOT_AVAILABLE = 0,
  71. BTHF_NETWORK_STATE_AVAILABLE
  72. } bthf_network_state_t;
  73. /** Service type */
  74. typedef enum {
  75. BTHF_SERVICE_TYPE_HOME = 0,
  76. BTHF_SERVICE_TYPE_ROAMING
  77. } bthf_service_type_t;
  78. typedef enum {
  79. BTHF_CALL_STATE_ACTIVE = 0,
  80. BTHF_CALL_STATE_HELD,
  81. BTHF_CALL_STATE_DIALING,
  82. BTHF_CALL_STATE_ALERTING,
  83. BTHF_CALL_STATE_INCOMING,
  84. BTHF_CALL_STATE_WAITING,
  85. BTHF_CALL_STATE_IDLE,
  86. BTHF_CALL_STATE_DISCONNECTED
  87. } bthf_call_state_t;
  88. typedef enum {
  89. BTHF_CALL_DIRECTION_OUTGOING = 0,
  90. BTHF_CALL_DIRECTION_INCOMING
  91. } bthf_call_direction_t;
  92. typedef enum {
  93. BTHF_CALL_TYPE_VOICE = 0,
  94. BTHF_CALL_TYPE_DATA,
  95. BTHF_CALL_TYPE_FAX
  96. } bthf_call_mode_t;
  97. typedef enum {
  98. BTHF_CALL_MPTY_TYPE_SINGLE = 0,
  99. BTHF_CALL_MPTY_TYPE_MULTI
  100. } bthf_call_mpty_type_t;
  101. typedef enum {
  102. BTHF_CALL_ADDRTYPE_UNKNOWN = 0x81,
  103. BTHF_CALL_ADDRTYPE_INTERNATIONAL = 0x91
  104. } bthf_call_addrtype_t;
  105. } // namespace headset
  106. } // namespace bluetooth