gpg::ICrossAppEndpointDiscoveryListener

这是一个抽象类。

#include <i_cross_app_endpoint_discovery_listener.h>

定义一个接口,用于传送与跨应用远程端点发现相关的事件。

摘要

构造函数和析构函数

~ICrossAppEndpointDiscoveryListener()

公共函数

OnCrossAppEndpointFound(int64_t client_id, const EndpointDetails & endpoint_details, const std::vector< AppIdentifier > & app_identifiers)=0
virtual void
在找到远程端点时调用;对于每个发现的端点,都会调用一次。
OnCrossAppEndpointLost(int64_t client_id, const std::string & instance_id)=0
virtual void
在远程端点无法再被发现时调用;仅使用之前传递给 OnEndpointFound 的 ID 调用。

公共函数

OnCrossAppEndpointFound

virtual void OnCrossAppEndpointFound(
  int64_t client_id,
  const EndpointDetails & endpoint_details,
  const std::vector< AppIdentifier > & app_identifiers
)=0

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

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

OnCrossAppEndpointLost

virtual void OnCrossAppEndpointLost(
  int64_t client_id,
  const std::string & instance_id
)=0

在远程端点无法再被发现时调用;仅使用之前传递给 OnEndpointFound 的 ID 调用。

请注意,此方法可能会在短时间内反复调用;您可能需要延迟对界面的更新,以反映在调用此方法后端点消失了一小段时间。

~ICrossAppEndpointDiscoveryListener

virtual  ~ICrossAppEndpointDiscoveryListener()