مرجع بنية bthf_interface_t

مرجع بنية bthf_interface_t

#include < bt_hf.h >

حقول البيانات

size_t  size
 
bt_status_t (*  init )( bthf_callbacks_t *callbacks, int max_hf_clients)
 
bt_status_t (*  connect )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  disconnect )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  connect_audio )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  disconnect_audio )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  start_voice_recognition )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  stop_voice_recognition )(bt_bdaddr_t *bd_addr)
 
bt_status_t (*  volume_control )( bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  device_status_notification )( bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal, int batt_chg)
 
bt_status_t (*  cops_response )(const char *cops, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  cind_response )(int svc, int num_active, int num_held, bthf_call_state_t call_setup_state, int signal, int roam, int batt_chg, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  formatted_at_response )(const char *rsp, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  at_response )( bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  clcc_response )(int index, bthf_call_direction_t dir, bthf_call_state_t state, bthf_call_mode_t mode, bthf_call_mpty_type_t mpty, const char *number, bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr)
 
bt_status_t (*  phone_state_change )(int num_active, int num_held, bthf_call_state_t call_setup_state, const char *number, bthf_call_addrtype_t type)
 
void(*  cleanup )(void)
 
bt_status_t (*  configure_wbs )(bt_bdaddr_t *bd_addr, bthf_wbs_config_t config)
 

وصف مفصّل

يمثّل واجهة BT-HF العادية.

التعريف في السطر 223 من الملف bt_hf.h .

مستندات الحقل

bt_status_t (* at_response)( bthf_at_response_t response_code, int error_code, bt_bdaddr_t *bd_addr)

استجابة ok/error ERROR (0) OK (1)

التعريف في السطر 271 من الملف bt_hf.h .

bt_status_t (* cind_response)(int svc, int num_active, int num_held, bthf_call_state_t call_setup_state, int signal, int roam, int batt_chg, bt_bdaddr_t *bd_addr)

استجابة الأمر CIND

التعريف في السطر 261 من الملف bt_hf.h .

bt_status_t (* clcc_response)(int index, bthf_call_direction_t dir, bthf_call_state_t state, bthf_call_mode_t mode, bthf_call_mpty_type_t mpty, const char *number, bthf_call_addrtype_t type, bt_bdaddr_t *bd_addr)

يمكن استدعاء الاستجابة لأمر CLCC بشكل متكرر لكل فهرس مكالمة. سيتم التعامل مع فهرس المكالمة 0 على أنّه إنهاء NULL (يكمل الاستجابة).

التعريف في السطر 277 من الملف bt_hf.h .

void(* cleanup)(void)

إغلاق الواجهة

التعريف في السطر 293 من الملف bt_hf.h .

bt_status_t (* configure_wbs)(bt_bdaddr_t *bd_addr, bthf_wbs_config_t config)

إعداد ترميز SCO

التعريف في السطر 296 من الملف bt_hf.h .

bt_status_t (* connect)(bt_bdaddr_t *bd_addr)

الاتصال بسماعات الرأس

التعريف في السطر 233 من الملف bt_hf.h .

bt_status_t (* connect_audio)(bt_bdaddr_t *bd_addr)

إنشاء اتصال صوتي

التعريف في السطر 239 من الملف bt_hf.h .

bt_status_t (* cops_response)(const char *cops, bt_bdaddr_t *bd_addr)

استجابة للأمر COPS

التعريف في السطر 258 من الملف bt_hf.h .

bt_status_t (* device_status_notification)( bthf_network_state_t ntk_state, bthf_service_type_t svc_type, int signal, int batt_chg)

إشعار مُدمَج بتغيير حالة الجهاز

التعريف في السطر 254 من الملف bt_hf.h .

bt_status_t (* disconnect)(bt_bdaddr_t *bd_addr)

إلغاء الربط بسماعات الرأس

التعريف في السطر 236 من الملف bt_hf.h .

bt_status_t (* disconnect_audio)(bt_bdaddr_t *bd_addr)

إغلاق اتصال الصوت

التعريف في السطر 242 من الملف bt_hf.h .

bt_status_t (* formatted_at_response)(const char *rsp, bt_bdaddr_t *bd_addr)

استجابة AT منسقة مسبقًا، عادةً استجابةً لأمر AT غير معروف

التعريف في السطر 265 من الملف bt_hf.h .

bt_status_t (* init)( bthf_callbacks_t *callbacks, int max_hf_clients)

تسجيل عمليات استدعاء BtHf

التعريف في السطر 230 من الملف bt_hf.h .

bt_status_t (* phone_state_change)(int num_active, int num_held, bthf_call_state_t call_setup_state, const char *number, bthf_call_addrtype_t type)

إرسال إشعارات عند تغيير حالة الاتصال

  1. عدد المكالمات النشطة/المتوقفة مؤقتًا/المرنّنة
  2. ‫call_state: يشير ذلك إلى تغيير الحالة الذي أدّى إلى ظهور هذه الرسالة. سيستخدِم هذا الحقل إحدى القيم من BtHfCallState.
  3. الرقم والنوع: صالحان فقط للمكالمات الواردة والمكالمات في انتظار الرد

التعريف في السطر 289 من الملف bt_hf.h .

الحجم size_t

تم ضبطه على sizeof(BtHfInterface)

التعريف في السطر 226 من الملف bt_hf.h .

bt_status_t (* start_voice_recognition)(bt_bdaddr_t *bd_addr)

بدء ميزة "التعرّف على الصوت"

التعريف في السطر 245 من الملف bt_hf.h .

bt_status_t (* stop_voice_recognition)(bt_bdaddr_t *bd_addr)

إيقاف ميزة "التعرّف على الصوت"

التعريف في السطر 248 من الملف bt_hf.h .

bt_status_t (* volume_control)( bthf_volume_type_t type, int volume, bt_bdaddr_t *bd_addr)

التحكم في مستوى الصوت

التعريف في السطر 251 من الملف bt_hf.h .


تم إنشاء مستندات هذه البنية من الملف التالي:
  • hardware/libhardware/include/hardware/ bt_hf.h