Library: Zeroconf
Package: ZeroCore
Header: Poco/Zeroconf/LocalServiceListener.h
A LocalServiceListener handles all events of a LocalService object
Member Functions: disable, enable, mutex, onDomainChanged, onRegistrationFailed, onServiceRenamed
Creates the LocalServiceListener.
virtual ~LocalServiceListener();
Destroys the LocalServiceListener.
void disable(
LocalService & aService
);
Unregisters from all events of the service.
void disable();
Unregisters from all events for each service we previously registered. This method must be called before the LocalServiceListener gets destroyed.
void enable(
LocalService & aService
);
Registers for all events of the service. Never forget to unregister from a LocalService via disable(...)
virtual void onDomainChanged(
const void * pSender,
std::string & newDomainName
) = 0;
Invoked whenever the domain changes of the LocalService. Called at least once for successful registration.
virtual void onRegistrationFailed(
const void * pSender,
Poco::Int32 & errorCode
) = 0;
Invoked whenever an error occurred in registering your LocalService. Note that the LocalService members will already be cleared when this method is invoked. Also LocalService is already unregistered.
virtual void onServiceRenamed(
const void * pSender,
std::string & newServiceName
) = 0;
Invoked whenever the service name changes of the LocalService. Called at least once for successful registration.
Poco::FastMutex & mutex();
Poco::FastMutex _mutex;