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

在找到远程端点时调用;对于已发现的每个端点,系统都会调用一次。

请注意,此方法可在短时间内重复调用;您可能希望在调用该方法后延迟一小段时间来延迟对界面的更新,以反映新端点。

OnEndpointLost

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

在远程端点不再可检测到时调用;只能使用之前传递给 OnEndpointFound 的 ID 进行调用。

请注意,此方法可在短时间内重复调用;您可以延迟对界面的更新,以反映端点在调用方法后短时间内消失。

~IEndpointDiscoveryListener

virtual  ~IEndpointDiscoveryListener()