gpg::EndpointDiscoveryListenerHelper

#include <endpoint_discovery_listener_helper.h>

यह एक हेल्पर की जानकारी देता है, जिसका इस्तेमाल पूरे IEndpointDiscoveryListener के इंटरफ़ेस को तय किए बिना SDK को IEndpointDiscoveryListener कॉलबैक देने के लिए किया जा सकता है. इसके लिए ज़रूरी नहीं है.

खास जानकारी

इस ऑब्जेक्ट पर कॉन्फ़िगर किए गए कॉलबैक को, आस-पास के कनेक्शन एपीआई में बताए गए तरीके से शुरू किया जाएगा. साफ़ तौर पर सेट नहीं किए गए कॉलबैक से कुछ नहीं होगा.

कंस्ट्रक्टर और डिस्ट्रक्टर

EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
shared_ptr से EndpointDiscoveryListenerHelperImpl में EndpointDiscoveryListenerHelper बनाता है.

सार्वजनिक टाइप

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 इंस्टेंस का आईडी है, जिसने एंडपॉइंट का पता लगाया. 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 बनाता है.

एपीआई के अंदरूनी इस्तेमाल के लिए है.

SetOnEndpointFoundCallback

EndpointDiscoveryListenerHelper & SetOnEndpointFoundCallback(
  OnEndpointFoundCallback callback
)

OnEndpointFoundCallback सेट करें.

SetOnEndpointLostCallback

EndpointDiscoveryListenerHelper & SetOnEndpointLostCallback(
  OnEndpointLostCallback callback
)

OnEndpointLostCallback सेट करें.