gpg::IEndpointDiscoveryListener

這是抽象類別。

#include <i_endpoint_discovery_listener.h>

定義可以傳遞與遠端端點探索相關的事件的介面。

摘要

建構函式和解構函式

~IEndpointDiscoveryListener()

公開函式

OnEndpointFound(int64_t client_id, const EndpointDetails & endpoint_details)=0
virtual void
在找到遠端端點時叫用;就會叫用一次。
OnEndpointLost(int64_t client_id, const std::string & remote_endpoint_id)=0
virtual void
遠端端點不再被發現時叫用;才會使用先前傳遞至 OnEndpointFound 的 ID 呼叫。

公開函式

OnEndpointFound

virtual void OnEndpointFound(
  int64_t client_id,
  const EndpointDetails & endpoint_details
)=0

在找到遠端端點時叫用;就會叫用一次。

請注意,這個方法可能會在短時間內重複叫用;您可能要等到叫用方法後一段時間,才會更新 UI,以反映新的端點。

OnEndpointLost

virtual void OnEndpointLost(
  int64_t client_id,
  const std::string & remote_endpoint_id
)=0

遠端端點不再被發現時叫用;才會使用先前傳遞至 OnEndpointFound 的 ID 呼叫。

請注意,這個方法可能會在短時間內重複叫用;可以延遲更新 UI,反映呼叫方法後短時間內消失的端點。

~IEndpointDiscoveryListener

virtual  ~IEndpointDiscoveryListener()