gpg:: EndpointDiscoveryListenerHelper
#include <endpoint_discovery_listener_helper.h>
전체 IEndpointDiscoveryListener 인터페이스를 정의하지 않고 SDK에 IEndpointDiscoveryListener 콜백을 제공하는 데 사용할 수 있는 도우미를 정의합니다.
요약
이 객체에 구성된 콜백은 Nearby 연결 API에 설명된 대로 호출됩니다. 명시적으로 설정되지 않은 콜백은 아무 작업도 하지 않습니다.
생성자 및 소멸자 |
|
---|---|
EndpointDiscoveryListenerHelper()
|
|
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
|
공개 유형 |
|
---|---|
OnEndpointFoundCallback
|
typedefstd::function< void(int64_t client_id, const EndpointDetails &endpoint_details)>
원격 엔드포인트가 발견되면 OnEndpointFoundCallback 가 호출됩니다. |
OnEndpointLostCallback
|
typedefstd::function< void(int64_t client_id, const std::string &remote_endpoint_id)>
OnEndpointLostCallback 는 원격 엔드포인트를 더 이상 검색할 수 없을 때 호출됩니다. |
공개 함수 |
|
---|---|
SetOnEndpointFoundCallback(OnEndpointFoundCallback callback)
|
OnEndpointFoundCallback을 설정합니다.
|
SetOnEndpointLostCallback(OnEndpointLostCallback callback)
|
OnEndpointLostCallback을 설정합니다.
|
공개 유형
OnEndpointFoundCallback
std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)> OnEndpointFoundCallback
원격 엔드포인트가 발견되면 OnEndpointFoundCallback
가 호출됩니다.
client_id
는 엔드포인트를 검색한 NearbyConnections 인스턴스의 ID입니다. endpoint_details
에는 검색된 원격 엔드포인트의 세부정보가 포함되어 있습니다.
OnEndpointLostCallback
std::function< void(int64_t client_id, const std::string &remote_endpoint_id)> OnEndpointLostCallback
OnEndpointLostCallback
는 원격 엔드포인트를 더 이상 검색할 수 없을 때 호출됩니다.
공개 함수
EndpointDiscoveryListenerHelper
EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper
EndpointDiscoveryListenerHelper( std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl )
shared_ptr
에서 EndpointDiscoveryListenerHelperImpl
로의 EndpointDiscoveryListenerHelper를 구성합니다.
API에서 내부적으로 사용하기 위한 용도입니다.
SetOnEndpointFoundCallback
EndpointDiscoveryListenerHelper & SetOnEndpointFoundCallback( OnEndpointFoundCallback callback )
OnEndpointFoundCallback을 설정합니다.
SetOnEndpointLostCallback
EndpointDiscoveryListenerHelper & SetOnEndpointLostCallback( OnEndpointLostCallback callback )
OnEndpointLostCallback을 설정합니다.