1 #ifndef __BLUETOOTH_HANDSFREE_H__ 2 #define __BLUETOOTH_HANDSFREE_H__ 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 typedef enum { 9 BT_SCO_CODEC_CVSD = 1, 10 BT_SCO_CODEC_MSBC, 11 } RK_BT_SCO_CODEC_TYPE; 12 13 typedef enum { 14 RK_BT_HFP_CONNECT_EVT, /* HFP connection open */ 15 RK_BT_HFP_DISCONNECT_EVT, /* HFP connection closed */ 16 RK_BT_HFP_RING_EVT, /* RING alert from AG */ 17 RK_BT_HFP_AUDIO_OPEN_EVT, /* Audio connection open */ 18 RK_BT_HFP_AUDIO_CLOSE_EVT, /* Audio connection closed */ 19 RK_BT_HFP_PICKUP_EVT, /* Call has been picked up */ 20 RK_BT_HFP_HANGUP_EVT, /* Call has been hung up */ 21 RK_BT_HFP_VOLUME_EVT, /* Speaker volume change */ 22 RK_BT_HFP_BCS_EVT, /* Codec selection from AG */ 23 RK_BT_HFP_CLIP_EVT, /* Calling subscriber information from AG */ 24 RK_BT_HFP_OUTGOING_CALL_DIAL_EVT, /* Outgoing call setup in dialing state */ 25 RK_BT_HFP_OUTGOING_CALL_RING_EVT, /* Outgoing call setup in alerting state */ 26 RK_BT_HFP_CLCC_EVT, /* Current active call list info */ 27 } RK_BT_HFP_EVENT; 28 29 typedef int (*RK_BT_HFP_CALLBACK)(const char *bd_addr, RK_BT_HFP_EVENT event, void *data); 30 31 void rk_bt_hfp_register_callback(RK_BT_HFP_CALLBACK cb); 32 int rk_bt_hfp_sink_open(void); 33 int rk_bt_hfp_open(void); 34 int rk_bt_hfp_close(void); 35 int rk_bt_hfp_pickup(void); 36 int rk_bt_hfp_hangup(void); 37 int rk_bt_hfp_redial(void); 38 int rk_bt_hfp_dial_number(char *number); 39 int rk_bt_hfp_report_battery(int value); 40 int rk_bt_hfp_set_volume(int volume); 41 void rk_bt_hfp_enable_cvsd(void); 42 void rk_bt_hfp_disable_cvsd(void); 43 int rk_bt_hfp_disconnect(void); 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* __BLUETOOTH_HANDSFREE_H__ */ 50