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