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 btsdp_interface_t
#include <
bt_sdp.h
>
Definição na linha
120
do arquivo
bt_sdp.h
.
Use a flag "listen" na interface do socket para criar canais PSM rfcomm e/ou l2cap (sem UUID e service_name e defina a flag BTSOCK_FLAG_NO_SDP em flags). Em seguida, use createSdpRecord para criar o registro SDP associado aos canais rfcomm/l2cap.
Retorna um identificador para o registro SDP, que pode ser analisado para remove_sdp_record.
record (in) O registro SDP para criar record_handle (out). O identificador de registro correspondente será gravado neste ponteiro.
Definição na linha
143
do arquivo
bt_sdp.h
.
Cancelar o registro do SDP do Bluetooth
Definição na linha
128
do arquivo
bt_sdp.h
.
Registrar callbacks de pesquisa de SDP do BT
Definição na linha
125
do arquivo
bt_sdp.h
.
Remover um registro SDP criado por createSdpRecord
Definição na linha
146
do arquivo
bt_sdp.h
.
bt_status_t
(* sdp_search)(bt_bdaddr_t *bd_addr, const uint8_t *uuid)
|
Pesquisar registros SDP com UUID específico no dispositivo remoto
Definição na linha
131
do arquivo
bt_sdp.h
.
Definir o tamanho desta estrutura
Definição na linha
122
do arquivo
bt_sdp.h
.
A documentação desse struct foi gerada com base no seguinte arquivo:
-
hardware/libhardware/include/hardware/
bt_sdp.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: btsdp_interface_t Struct Reference\n\nbtsdp_interface_t Struct Reference\n==================================\n\n[Data Fields](#pub-attribs) \nbtsdp_interface_t Struct Reference \n\n`\n#include \u003c\n`[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)`\n\u003e\n`\n\n|-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/structbtsdp__interface__t#a854352f53b148adc24983a58a1866d66) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [init](/reference/hal/structbtsdp__interface__t#a1fc7441984c7bf89fc8bb4719b943db4) )( [btsdp_callbacks_t](/reference/hal/structbtsdp__callbacks__t) \\*callbacks) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [deinit](/reference/hal/structbtsdp__interface__t#a6d26449b7562197ad32b98495759085e) )() |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [sdp_search](/reference/hal/structbtsdp__interface__t#a58527da515be3086e14b10e1c5f13f7b) )(bt_bdaddr_t \\*bd_addr, const uint8_t \\*uuid) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [create_sdp_record](/reference/hal/structbtsdp__interface__t#a73db7398c35a3aa6fed7a67284f496d0) )( [bluetooth_sdp_record](/reference/hal/unionbluetooth__sdp__record) \\*record, int \\*record_handle) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [remove_sdp_record](/reference/hal/structbtsdp__interface__t#a5edc4376964673ce7817eb7143bc9d0f) )(int sdp_handle) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nDefinition at line\n[120](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* create_sdp_record)( [bluetooth_sdp_record](/reference/hal/unionbluetooth__sdp__record) \\*record, int \\*record_handle) |\n\n\nUse listen in the socket interface to create rfcomm and/or l2cap PSM channels, (without UUID and service_name and set the BTSOCK_FLAG_NO_SDP flag in flags). Then use createSdpRecord to create the SDP record associated with the rfcomm/l2cap channels.\n\n\nReturns a handle to the SDP record, which can be parsed to remove_sdp_record.\n\n\nrecord (in) The SDP record to create record_handle (out)The corresponding record handle will be written to this pointer.\n\n\nDefinition at line\n[143](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\n|-----------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* deinit)() |\n\n\nUnregister BT SDP\n\n\nDefinition at line\n[128](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* init)( [btsdp_callbacks_t](/reference/hal/structbtsdp__callbacks__t) \\*callbacks) |\n\n\nRegister BT SDP search callbacks\n\n\nDefinition at line\n[125](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* remove_sdp_record)(int sdp_handle) |\n\n\nRemove a SDP record created by createSdpRecord\n\n\nDefinition at line\n[146](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* sdp_search)(bt_bdaddr_t \\*bd_addr, const uint8_t \\*uuid) |\n\n\nSearch for SDP records with specific uuid on remote device\n\n\nDefinition at line\n[131](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\n|-------------|\n| size_t size |\n\n\nSet to size of this struct\n\n\nDefinition at line\n[122](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\nof file\n[bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [bt_sdp.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sdp.h)"]]