Library: Zeroconf
Package: ZeroCore
Header: Poco/Zeroconf/DiscoveryListener.h
A DiscoveryListener handles DNSServiceDiscovery events for browse/resolve commands
Member Functions: disable, enable, onBrowseError, onNewService, onResolveError, onServiceRemoved, onServiceResolved
Creates the DiscoveryListener.
virtual ~DiscoveryListener();
Destroys the DiscoveryListener.
void disable();
Disables event receiving. You must call this method, before your object is destroyed.
void enable();
Enables event receiving. Call this method in the code of your subclass.
virtual void onBrowseError(
const void * pSender,
ServiceError & err
) = 0;
Called whenever an error occurred.
virtual void onNewService(
const void * pSender,
std::pair < ServiceInfo,
bool > & aService
) = 0;
Called whenever a new service is discovered. ServiceInfo contains the service description, while the boolean value simply tells if more events will follow (can be used as hint for GUI applications to minimize redraws). Note that you will receive for each interface on which the service was discovered a notify.
virtual void onResolveError(
const void * pSender,
ServiceError & err
) = 0;
Called whenever an error occurred.
virtual void onServiceRemoved(
const void * pSender,
std::pair < ServiceInfo,
bool > & aService
) = 0;
A previously found service was removed. Called for each interface on which the service was removed.
virtual void onServiceResolved(
const void * pSender,
std::pair < ResolvedServiceInfo,
bool > & aService
) = 0;
Called whenever a new service is resolved. ResolvedServiceInfo contains an extended service description, while the boolean value simply tells if more events will follow (can be used as hint for GUI applications to minimize redraws). Note that you will receive for each interface on which the service was discovered a notify.