gpg:: EndpointDiscoveryListenerHelper
#include <endpoint_discovery_listener_helper.h>
Definiuje element pomocniczy, który może służyć do dostarczania wywołań zwrotnych IEndpointDiscoveryListener do pakietu SDK bez definiowania pełnego interfejsu IEndpointDiscoveryListener.
Podsumowanie
Wywołania zwrotne skonfigurowane w tym obiekcie będą wywoływane w sposób opisany w interfejsie API połączeń w pobliżu. Wywołania zwrotne, które nie są wyraźnie ustawione, nie będą działać.
Konstruktory i niszczyciele |
|
---|---|
EndpointDiscoveryListenerHelper()
|
|
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
Konstruuje funkcję EndpointDiscoveryListenerHelper z
shared_ptr do EndpointDiscoveryListenerHelperImpl . |
Typy publiczne |
|
---|---|
OnEndpointFoundCallback
|
typedefstd::function< void(int64_t client_id, const EndpointDetails &endpoint_details)>
Funkcja OnEndpointFoundCallback jest wywoływana po znalezieniu zdalnego punktu końcowego. |
OnEndpointLostCallback
|
typedefstd::function< void(int64_t client_id, const std::string &remote_endpoint_id)>
Funkcja OnEndpointLostCallback jest wywoływana, gdy zdalny punkt końcowy nie jest już wykrywalny. |
Funkcje publiczne |
|
---|---|
SetOnEndpointFoundCallback(OnEndpointFoundCallback callback)
|
Ustaw wartość OnEndpointFoundCallback.
|
SetOnEndpointLostCallback(OnEndpointLostCallback callback)
|
Ustaw wartość OnEndpointLostCallback.
|
Typy publiczne
OnEndpointFoundCallback
std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)> OnEndpointFoundCallback
Funkcja OnEndpointFoundCallback
jest wywoływana po znalezieniu zdalnego punktu końcowego.
client_id
to identyfikator instancji NearbyConnections, która wykryła punkt końcowy. endpoint_details
zawiera szczegóły wykrytego zdalnego punktu końcowego.
OnEndpointLostCallback
std::function< void(int64_t client_id, const std::string &remote_endpoint_id)> OnEndpointLostCallback
Funkcja OnEndpointLostCallback
jest wywoływana, gdy zdalny punkt końcowy nie jest już wykrywalny.
Funkcje publiczne
EndpointDiscoveryListenerHelper
EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper
EndpointDiscoveryListenerHelper( std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl )
Konstruuje funkcję EndpointDiscoveryListenerHelper z shared_ptr
do EndpointDiscoveryListenerHelperImpl
.
Przeznaczony do użytku wewnętrznego w interfejsie API.
SetOnEndpointFoundCallback
EndpointDiscoveryListenerHelper & SetOnEndpointFoundCallback( OnEndpointFoundCallback callback )
Ustaw wartość OnEndpointFoundCallback.
SetOnEndpointLostCallback
EndpointDiscoveryListenerHelper & SetOnEndpointLostCallback( OnEndpointLostCallback callback )
Ustaw wartość OnEndpointLostCallback.