gpg::EndpointDiscoveryListenerHelper

#include <endpoint_discovery_listener_helper.h>

Definiuje element pomocniczy, którego można używać 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 mają żadnego efektu.

Konstruktorzy i niszczyciele

EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
Konstruuje obiekt EndpointDiscoveryListenerHelper z obiektu shared_ptr na EndpointDiscoveryListenerHelperImpl.

Typy publiczne

OnEndpointFoundCallback typedef
std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)>
OnEndpointFoundCallback jest wywoływane w przypadku znalezienia zdalnego punktu końcowego.
OnEndpointLostCallback typedef
std::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ż wykrywany.

Funkcje publiczne

SetOnEndpointFoundCallback(OnEndpointFoundCallback callback)
Skonfiguruj funkcję OnEndpointFoundCallback.
SetOnEndpointLostCallback(OnEndpointLostCallback callback)
Skonfiguruj ustawienie OnEndpointLostCallback.

Typy publiczne

OnEndpointFoundCallback

std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)> OnEndpointFoundCallback

OnEndpointFoundCallback jest wywoływane w przypadku znalezienia zdalnego punktu końcowego.

client_id to identyfikator instancji NearbyConnections, która odkrył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 obiekt EndpointDiscoveryListenerHelper z obiektu shared_ptr na EndpointDiscoveryListenerHelperImpl.

Przeznaczona do użytku wewnętrznego przez interfejs API.

SetOnEndpointFoundCallback

EndpointDiscoveryListenerHelper & SetOnEndpointFoundCallback(
  OnEndpointFoundCallback callback
)

Skonfiguruj funkcję OnEndpointFoundCallback.

SetOnEndpointLostCallback

EndpointDiscoveryListenerHelper & SetOnEndpointLostCallback(
  OnEndpointLostCallback callback
)

Skonfiguruj ustawienie OnEndpointLostCallback.