gpg::EndpointDiscoveryListenerHelper

#include <endpoint_discovery_listener_helper.h>

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

खास जानकारी

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

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

EndpointDiscoveryListenerHelper()
EndpointDiscoveryListenerHelper(std::shared_ptr< EndpointDiscoveryListenerHelperImpl > impl)
यह shared_ptr से EndpointDiscoveryListenerHelperImpl तक, EndpointDiscoveryListenerHelper बनाता है.

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

OnEndpointFoundCallback टाइपडिफ़
std::function< void(int64_t client_id, const EndpointDetails &endpoint_details)>
रिमोट एंडपॉइंट मिलने पर, OnEndpointFoundCallback को कॉल किया जाता है.
OnEndpointLostCallback टाइपडिफ़
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 सेट करें.