gpg:: EndpointDiscoveryListenerHelper
#include <endpoint_discovery_listener_helper.h>
Definiert einen Helper, mit dem IEndpointDiscoveryListener-Rückrufe für das SDK bereitgestellt werden können, ohne die vollständige IEndpointDiscoveryListener-Schnittstelle zu definieren.
Zusammenfassung
Für dieses Objekt konfigurierte Callbacks werden wie in der Nearby Connections API beschrieben aufgerufen. Callbacks, die nicht explizit festgelegt sind, haben keine Wirkung.
Konstruktoren und Zerstörer |
|
---|---|
EndpointDiscoveryListenerHelper()
|
|
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
Konstruiert einen EndpointDiscoveryListenerHelper aus einem
shared_ptr zu einem EndpointDiscoveryListenerHelperImpl . |
Öffentliche Typen |
|
---|---|
OnEndpointFoundCallback
|
typedefstd::function< void(int64_t client_id, const EndpointDetails &endpoint_details)>
OnEndpointFoundCallback wird aufgerufen, wenn ein Remote-Endpunkt gefunden wird. |
OnEndpointLostCallback
|
typedefstd::function< void(int64_t client_id, const std::string &remote_endpoint_id)>
OnEndpointLostCallback wird aufgerufen, wenn ein Remote-Endpunkt nicht mehr sichtbar ist. |
Öffentliche Funktionen |
|
---|---|
SetOnEndpointFoundCallback(OnEndpointFoundCallback callback)
|
Legt OnEndpointFoundCallback fest.
|
SetOnEndpointLostCallback(OnEndpointLostCallback callback)
|
Legen Sie OnEndpointLostCallback fest.
|
Öffentliche Typen
OnEndpointFoundCallback
std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)> OnEndpointFoundCallback
OnEndpointFoundCallback
wird aufgerufen, wenn ein Remote-Endpunkt gefunden wird.
client_id
ist die ID der NearbyConnections-Instanz, die den Endpunkt erkannt hat. endpoint_details
enthält die Details des erkannten Remote-Endpunkts.
OnEndpointLostCallback
std::function< void(int64_t client_id, const std::string &remote_endpoint_id)> OnEndpointLostCallback
OnEndpointLostCallback
wird aufgerufen, wenn ein Remote-Endpunkt nicht mehr sichtbar ist.
Öffentliche Funktionen
EndpointDiscoveryListenerHelper
EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper
EndpointDiscoveryListenerHelper( std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl )
Konstruiert einen EndpointDiscoveryListenerHelper aus einem shared_ptr
zu einem EndpointDiscoveryListenerHelperImpl
.
Vorgesehen für die interne Verwendung durch die API.
SetOnEndpointFoundCallback
EndpointDiscoveryListenerHelper & SetOnEndpointFoundCallback( OnEndpointFoundCallback callback )
Legt OnEndpointFoundCallback fest.
SetOnEndpointLostCallback
EndpointDiscoveryListenerHelper & SetOnEndpointLostCallback( OnEndpointLostCallback callback )
Legen Sie OnEndpointLostCallback fest.