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