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()