bt_interface_t مرجع الهيكل
#include < bluetooth.h >
حقول البيانات | |
size_t | بحجم |
int (* | init ) ( bt_callbacks_t * callbacks) |
int (* | تمكين ) (bool guest_mode) |
int (* | تعطيل ) (باطل) |
فارغ(* | تنظيف ) (باطل) |
int (* | get_adapter_properties ) (باطل) |
int (* | get_adapter_property ) ( نوع_العنصر_الخاص_النوع_النوع_النمط ) |
int (* | set_adapter_property ) (الخاصية const bt_property_t *) |
int (* | get_remote_device_properties ) (bt_bdaddr_t * remote_addr) |
int (* | get_remote_device_property ) (bt_bdaddr_t * remote_addr، bt_property_type_t type) |
int (* | set_remote_device_property ) (bt_bdaddr_t * remote_addr، const bt_property_t * property) |
int (* | get_remote_service_record ) (bt_bdaddr_t * remote_addr، bt_uuid_t * uuid) |
int (* | get_remote_services ) (bt_bdaddr_t * remote_addr) |
int (* | start_discovery ) (باطل) |
int (* | Cancel_discovery ) (باطل) |
int (* | create_bond ) (const bt_bdaddr_t * bd_addr ، int transport) |
int (* | create_bond_out_of_band ) (const bt_bdaddr_t * bd_addr ، int transport ، const bt_out_of_band_data_t * oob_data) |
int (* | remove_bond ) (const bt_bdaddr_t * bd_addr) |
int (* | Cancel_bond ) (const bt_bdaddr_t * bd_addr) |
int (* | get_connection_state ) (const bt_bdaddr_t * bd_addr) |
int (* | pin_reply ) (const bt_bdaddr_t * bd_addr ، uint8_t Accept ، uint8_t pin_len ، bt_pin_code_t * pin_code) |
int (* | ssp_reply ) (const bt_bdaddr_t * bd_addr ، bt_ssp_variant_t variant ، uint8_t Accept ، uint32_t passkey) |
كونست باطل * (* | get_profile_interface ) (const char * profile_id) |
int (* | dut_mode_configure ) (uint8_t تمكين ) |
int (* | dut_mode_send ) (uint16_t opcode، uint8_t * buf، uint8_t len) |
int (* | le_test_mode ) (uint16_t opcode، uint8_t * buf، uint8_t len) |
int (* | config_hci_snoop_log ) (uint8_t تمكين ) |
int (* | set_os_callouts ) ( bt_os_callouts_t * وسائل الشرح) |
int (* | read_energy_info ) () |
فارغ(* | dump ) (int fd، const char ** arguments) |
int (* | config_clear ) (باطل) |
فارغ(* | interop_database_clear ) (باطل) |
فارغ(* | interop_database_add ) (uint16_t feature ، const bt_bdaddr_t * addr ، size_t len) |
وصف مفصل
ملاحظة: افتراضيًا ، لا تتم تهيئة أي ملفات تعريف في وقت البدء / التمكين. عندما يستدعي التطبيق واجهة برمجة التطبيقات "init" لملف تعريف ، يجب أن يحدث أحد ما يلي:
1.) إذا لم يتم تمكين Bluetooth ، فيجب أن يقوم قلب Bluetooth بتحديد ملف التعريف على أنه ممكّن. بعد ذلك ، عندما يستدعي التطبيق "تمكين" Bluetooth ، كجزء من تسلسل التمكين ، يجب تمكين ملف التعريف الذي تم تمييزه عن طريق استدعاء واجهات برمجة التطبيقات المكدسة المناسبة. يجب أن يقوم "adapt_properties_cb" بإرجاع قائمة UUIDs للتوصيفات الممكّنة.
2.) إذا تم تمكين Bluetooth ، فيجب أن يستدعي نواة Bluetooth واجهة برمجة تطبيقات ملف تعريف المكدس لتهيئة ملف التعريف وتشغيل "adapt_properties_cb" مع القائمة الحالية لمعرفات UUID بما في ذلك UUID الخاص بالملف الشخصي المضاف حديثًا.
يجب أن يحدث العكس عندما يتم استدعاء واجهات برمجة تطبيقات "تنظيف" الملف الشخصي ، ويمثل واجهة Bluetooth DM القياسية.
تعريف في السطر 456 لملف bluetooth.h .
التوثيق الميداني
int (* can_bond) (const bt_bdaddr_t * bd_addr) |
إلغاء السندات
التعريف في السطر 521 لملف bluetooth.h .
int (* إلغاء_الاكتشاف) (باطل) |
إلغاء الاكتشاف
تعريف في السطر 508 لملف bluetooth.h .
باطل (* تنظيف) (باطل) |
يغلق الواجهة.
التعريف في السطر 472 لملف bluetooth.h .
int (* config_clear) (باطل) |
امسح /data/misc/bt_config.conf وامسح جميع الاتصالات المخزنة
تعريف في السطر 580 لملف bluetooth.h .
int (* config_hci_snoop_log) (uint8_t تمكين ) |
تعريف في السطر 557 لملف bluetooth.h .
int (* create_bond) (const bt_bdaddr_t * bd_addr ، int transport) |
إنشاء ارتباط بلوتوث
تعريف في السطر 511 لملف bluetooth.h .
int (* create_bond_out_of_band) (const bt_bdaddr_t * bd_addr ، int transport ، const bt_out_of_band_data_t * oob_data) |
قم بإنشاء Bluetooth Bond باستخدام بيانات خارج النطاق
التعريف في السطر 514 لملف bluetooth.h .
int (* تعطيل) (باطل) |
قم بتعطيل البلوتوث.
تعريف في السطر 469 لملف bluetooth.h .
void (* dump) (int fd، const char ** arguments) |
الدعم الأصلي لوظيفة dumpsys وظيفة متزامنة و | fd | مملوكة للمتصل. | الحجج | هي الوسائط التي قد تؤثر على الإخراج ، تم ترميزها كسلاسل UTF-8.
تعريف في السطر 575 لملف bluetooth.h .
int (* dut_mode_configure) (uint8_t تمكين ) |
واجهات برمجة تطبيقات وضع اختبار Bluetooth - يجب تمكين Bluetooth لواجهات برمجة التطبيقات هذه
تعريف في السطر 548 لملف bluetooth.h .
int (* dut_mode_send) (uint16_t opcode، uint8_t * buf، uint8_t len) |
تعريف في السطر 551 لملف bluetooth.h .
int (* تمكين) (bool guest_mode) |
قم بتمكين البلوتوث.
التعريف في السطر 466 لملف bluetooth.h .
int (* get_adapter_properties) (باطل) |
احصل على جميع خصائص محول Bluetooth في init
التعريف في السطر 475 لملف bluetooth.h .
int (* get_adapter_property) ( bt_property_type_t type) |
احصل على خاصية محول Bluetooth من "النوع"
التعريف في السطر 478 لملف bluetooth.h .
int (* get_connection_state) (const bt_bdaddr_t * bd_addr) |
احصل على حالة الاتصال لجهاز بعيد محدد. القيمة المرجعة 0 تعني أن الجهاز غير متصل ، وحالة الإرجاع غير الصفرية تشير إلى اتصال نشط.
التعريف في السطر 528 لملف bluetooth.h .
const باطل * (* get_profile_interface) (حرف ثابت * profile_id) |
احصل على واجهة ملف تعريف Bluetooth
تعريف في السطر 544 لملف bluetooth.h .
int (* get_remote_device_properties) (bt_bdaddr_t * remote_addr) |
احصل على جميع خصائص الجهاز البعيد
تعريف في السطر 487 لملف bluetooth.h .
int (* get_remote_device_property) (bt_bdaddr_t * remote_addr ، bt_property_type_t type) |
الحصول على خاصية "الجهاز البعيد" من "النوع"
التعريف في السطر 490 لملف bluetooth.h .
int (* get_remote_service_record) (bt_bdaddr_t * remote_addr، bt_uuid_t * uuid) |
احصل على سجل خدمة الجهاز البعيد لـ UUID المحدد
تعريف في السطر 498 لملف bluetooth.h .
int (* get_remote_services) (bt_bdaddr_t * remote_addr) |
ابدأ SDP للحصول على الخدمات عن بعد
التعريف في السطر 502 لملف bluetooth.h .
int (* init) ( bt_callbacks_t * callbacks) |
يفتح الواجهة ويوفر إجراءات رد الاتصال لتنفيذ هذه الواجهة.
تعريف في السطر 463 لملف bluetooth.h .
باطل (* interop_database_add) (uint16_t feature ، const bt_bdaddr_t * addr ، size_t len) |
قم بإضافة حل جديد لقابلية التشغيل المتداخل للجهاز لجهاز بعيد يكون | len | الأول الخاص به تتطابق بايتات عنوان الجهاز مع | addr |. ملاحظة: | ميزة | يجب أن يتطابق مع عنصر محدد في interop_feature_t (interop.h).
تعريف في السطر 592 لملف bluetooth.h .
باطل (* interop_database_clear) (باطل) |
امسح (إعادة تعيين) الجزء الديناميكي من قاعدة بيانات إمكانية التشغيل البيني للجهاز.
تعريف في السطر 585 لملف bluetooth.h .
int (* le_test_mode) (uint16_t opcode، uint8_t * buf، uint8_t len) |
واجهات برمجة تطبيقات وضع اختبار BLE
تعريف في السطر 554 لملف bluetooth.h .
int (* pin_reply) (const bt_bdaddr_t * bd_addr ، uint8_t Accept ، uint8_t pin_len ، bt_pin_code_t * pin_code) |
BT Legacy PinKey Reply في حالة القبول == FALSE ، يجب أن يكون pin_len و pin_code 0x0
تعريف في السطر 532 لملف bluetooth.h .
int (* read_energy_info) () |
قراءة تفاصيل معلومات الطاقة - تشير قيمة الإرجاع إلى BT_STATUS_SUCCESS أو BT_STATUS_NOT_READY يشير النجاح إلى إرسال أمر VSC إلى وحدة التحكم
تعريف في السطر 567 لملف bluetooth.h .
int (* remove_bond) (const bt_bdaddr_t * bd_addr) |
إزالة بوند
التعريف في السطر 518 لملف bluetooth.h .
int (* set_adapter_property) (الخاصية const bt_property_t *) |
تعيين خاصية محول Bluetooth من "النوع"
تعريف في السطر 484 لملف bluetooth.h .
int (* set_os_callouts) ( bt_os_callouts_t * وسائل الشرح) |
يضبط وظائف استدعاء نظام التشغيل التي يحتاجها bluedroid للتنبيهات وأقفال التنبيه. يجب استدعاء هذا فورًا بعد نجاح | init |.
التعريف في السطر 562 لملف bluetooth.h .
int (* set_remote_device_property) (bt_bdaddr_t * remote_addr، const bt_property_t * property) |
تعيين خاصية "الجهاز البعيد" من "النوع"
تعريف في السطر 494 لملف bluetooth.h .
size_t size |
ضبط على sizeof (bt_interface_t)
تعريف في السطر 458 لملف bluetooth.h .
int (* ssp_reply) (const bt_bdaddr_t * bd_addr ، bt_ssp_variant_t variant ، uint8_t Accept ، uint32_t passkey) |
رد BT SSP - يجب أن تكون قيمة Just Works والمقارنة الرقمية ومفتاح المرور صفرًا لـ BT_SSP_VARIANT_PASSKEY_COMPARISON & BT_SSP_VARIANT_CONSENT بالنسبة إلى BT_SSP_VARIANT_PASSKEY_ENTRY ، إذا كان القبول == FALSE ، فسيكون مفتاح المرور صفرًا
تعريف في السطر 540 لملف bluetooth.h .
int (* start_discovery) (باطل) |
ابدأ الاكتشاف
تعريف في السطر 505 لملف bluetooth.h .
تم إنشاء وثائق هذه البنية من الملف التالي:
- الأجهزة / libhardware / تشمل / الأجهزة / bluetooth.h