2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
btsock_interface_t 구조체 참조
#include <
bt_sock.h
>
|
size_t
|
크기
|
|
bt_status_t
(*
|
listen
)(
btsock_type_t
type, const char *service_name, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int callingUid)
|
|
bt_status_t
(*
|
connect
)(const bt_bdaddr_t *bd_addr,
btsock_type_t
type, const uint8_t *uuid, int channel, int *sock_fd, int flags, int callingUid)
|
|
bt_sock.h
파일의
49
번 라인에 정의가 있습니다.
bt_status_t
(* connect)(const bt_bdaddr_t *bd_addr,
btsock_type_t
type, const uint8_t *uuid, int channel, int *sock_fd, int flags, int callingUid)
|
원격 기기의 RFCOMM UUID 채널에 연결합니다. 연결 시 btsock_connect_signal 및 허용될 새 소켓 fd를 읽을 수 있는 소켓 fd를 반환합니다. callingUid는 소켓을 요청하는 애플리케이션의 UID입니다. 트래픽 회계 목적으로 사용됩니다.
bt_sock.h
FILE의
71
행에 정의되어 있습니다.
bt_status_t
(* listen)(
btsock_type_t
type, const char *service_name, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int callingUid)
|
RFCOMM UUID 또는 채널을 수신 대기합니다. 원격 기기가 연결되었을 때 btsock_connect_signal을 읽을 수 있는 소켓 fd를 반환합니다. UUID 또는 채널이 제공되지 않으면 채널이 할당되고 bt_sdp의 create_sdp_record(...)에 채널 번호를 제공하여 서비스 레코드를 만들 수 있습니다. callingUid는 소켓을 요청하는 애플리케이션의 UID입니다. 트래픽 회계 목적으로 사용됩니다.
bt_sock.h
파일의
62
번 줄에 정의되어 있습니다.
이 구조체에 관한 문서는 다음 파일에서 생성되었습니다.
-
hardware/libhardware/include/hardware/
bt_sock.h
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Android Hardware Abstraction Layer: btsock_interface_t Struct Reference\n\nbtsock_interface_t Struct Reference\n===================================\n\n[Data Fields](#pub-attribs) \nbtsock_interface_t Struct Reference \n\n`\n#include \u003c\n`[bt_sock.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)`\n\u003e\n`\n\n|-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| size_t | [size](/reference/hal/structbtsock__interface__t#a854352f53b148adc24983a58a1866d66) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [listen](/reference/hal/structbtsock__interface__t#a9d38d485b8f8af482153e9fda49f1d87) )( [btsock_type_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h) type, const char \\*service_name, const uint8_t \\*service_uuid, int channel, int \\*sock_fd, int flags, int callingUid) |\n| ||\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* | [connect](/reference/hal/structbtsock__interface__t#a3db005809916dd7c595f37b088c4a277) )(const bt_bdaddr_t \\*bd_addr, [btsock_type_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h) type, const uint8_t \\*uuid, int channel, int \\*sock_fd, int flags, int callingUid) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nDefinition at line\n[49](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\nof file\n[bt_sock.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.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) (\\* connect)(const bt_bdaddr_t \\*bd_addr, [btsock_type_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h) type, const uint8_t \\*uuid, int channel, int \\*sock_fd, int flags, int callingUid) |\n\n\nConnect to a RFCOMM UUID channel of remote device, It returns the socket fd from which the btsock_connect_signal and a new socket fd to be accepted can be read out when connected. The callingUid is the UID of the application which is requesting the socket. This is used for traffic accounting purposes.\n\n\nDefinition at line\n[71](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\nof file\n[bt_sock.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [bt_status_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bluetooth.h) (\\* listen)( [btsock_type_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h) type, const char \\*service_name, const uint8_t \\*service_uuid, int channel, int \\*sock_fd, int flags, int callingUid) |\n\n\nListen to a RFCOMM UUID or channel. It returns the socket fd from which btsock_connect_signal can be read out when a remote device connected. If neither a UUID nor a channel is provided, a channel will be allocated and a service record can be created providing the channel number to create_sdp_record(...) in bt_sdp. The callingUid is the UID of the application which is requesting the socket. This is used for traffic accounting purposes.\n\n\nDefinition at line\n[62](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\nof file\n[bt_sock.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\n.\n\n|-------------|\n| size_t size |\n\n\nset to size of this struct\n\n\nDefinition at line\n[51](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\nof file\n[bt_sock.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [bt_sock.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/bt_sock.h)"]]