gpg::EndpointDiscoveryListenerHelper

#include <endpoint_discovery_listener_helper.h>

전체 IEndpointDiscoveryListener 인터페이스를 정의하지 않고 SDK에 IEndpointDiscoveryListener 콜백을 제공하는 데 사용할 수 있는 도우미를 정의합니다.

요약

이 객체에 구성된 콜백은 Nearby Connection API에 설명된 대로 호출됩니다. 명시적으로 설정되지 않은 콜백은 아무 작업도 하지 않습니다.

생성자 및 소멸자

EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
shared_ptr에서 EndpointDiscoveryListenerHelperImplEndpointDiscoveryListenerHelper를 구성합니다.

공개 유형

OnEndpointFoundCallback typedef
std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)>
OnEndpointFoundCallback는 원격 엔드포인트가 발견되면 호출됩니다.
OnEndpointLostCallback typedef
std::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에서 EndpointDiscoveryListenerHelperImplEndpointDiscoveryListenerHelper를 구성합니다.

API의 내부용으로 사용됩니다.

SetOnEndpointFoundCallback

EndpointDiscoveryListenerHelper & SetOnEndpointFoundCallback(
  OnEndpointFoundCallback callback
)

OnEndpointFoundCallback을 설정합니다.

SetOnEndpointLostCallback

EndpointDiscoveryListenerHelper & SetOnEndpointLostCallback(
  OnEndpointLostCallback callback
)

OnEndpointLostCallback을 설정합니다.