A partir de 27 de março de 2025, recomendamos usar android-latest-release
em vez de aosp-main
para criar e contribuir com o AOSP. Para mais informações, consulte Mudanças no AOSP.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Referência da estrutura btgatt_interface_t
#include <
bt_gatt.h
>
Representa a interface padrão do Bluetooth GATT.
Definição na linha
40
do arquivo
bt_gatt.h
.
Fecha a interface
Definição na linha
50
do arquivo
bt_gatt.h
.
Ponteiro para os métodos da interface do cliente GATT.
Definição na linha
53
do arquivo
bt_gatt.h
.
Inicializa a interface e fornece rotinas de callback
Definição na linha
47
do arquivo
bt_gatt.h
.
Ponteiro para os métodos da interface do servidor GATT.
Definição na linha
56
do arquivo
bt_gatt.h
.
Definido como sizeof(btgatt_interface_t)
Definição na linha
42
do arquivo
bt_gatt.h
.
A documentação desse struct foi gerada com base no seguinte arquivo:
-
hardware/libhardware/include/hardware/
bt_gatt.h
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: btgatt_interface_t Struct Reference\n\nbtgatt_interface_t Struct Reference\n===================================\n\n[Data Fields](#pub-attribs) \nbtgatt_interface_t Struct Reference \n\n`\n#include \u003c\n`[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)`\n\u003e\n`\n\n|-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/structbtgatt__interface__t#a854352f53b148adc24983a58a1866d66) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [init](/reference/hal/structbtgatt__interface__t#a15fca7a0f2a74810223a31f3e1b234b2) )(const [btgatt_callbacks_t](/reference/hal/structbtgatt__callbacks__t) \\*callbacks) |\n| ||\n| void(\\* | [cleanup](/reference/hal/structbtgatt__interface__t#a8e1ba7348775abcd3cd56ec6f718bea0) )(void) |\n| ||\n| const [btgatt_client_interface_t](/reference/hal/structbtgatt__client__interface__t) \\* | [client](/reference/hal/structbtgatt__interface__t#ad376dedbfa9df97ca8eaad22cb074cd7) |\n| ||\n| const [btgatt_server_interface_t](/reference/hal/structbtgatt__server__interface__t) \\* | [server](/reference/hal/structbtgatt__interface__t#a782f6b6e9804f4f5a802a9d74094a782) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nRepresents the standard Bluetooth GATT interface.\n\n\nDefinition at line\n[40](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\nof file\n[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\n.\n\nField Documentation\n-------------------\n\n\n|------------------------|\n| void(\\* cleanup)(void) |\n\n\nCloses the interface\n\n\nDefinition at line\n[50](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\nof file\n[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\n.\n\n|------------------------------------------------------------------------------------------------|\n| const [btgatt_client_interface_t](/reference/hal/structbtgatt__client__interface__t) \\* client |\n\n\nPointer to the GATT client interface methods.\n\n\nDefinition at line\n[53](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\nof file\n[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\n.\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* init)(const [btgatt_callbacks_t](/reference/hal/structbtgatt__callbacks__t) \\*callbacks) |\n\n\nInitializes the interface and provides callback routines\n\n\nDefinition at line\n[47](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\nof file\n[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\n.\n\n|------------------------------------------------------------------------------------------------|\n| const [btgatt_server_interface_t](/reference/hal/structbtgatt__server__interface__t) \\* server |\n\n\nPointer to the GATT server interface methods.\n\n\nDefinition at line\n[56](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\nof file\n[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\n.\n\n|-------------|\n| size_t size |\n\n\nSet to sizeof(btgatt_interface_t)\n\n\nDefinition at line\n[42](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\nof file\n[bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [bt_gatt.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_gatt.h)"]]