Poco::Zeroconf

class LocalServiceListener

Library: Zeroconf
Package: ZeroCore
Header: Poco/Zeroconf/LocalServiceListener.h

Description

A LocalServiceListener handles all events of a LocalService object

Member Summary

Member Functions: disable, enable, mutex, onDomainChanged, onRegistrationFailed, onServiceRenamed

Constructors

LocalServiceListener

LocalServiceListener();

Creates the LocalServiceListener.

Destructor

~LocalServiceListener virtual

virtual ~LocalServiceListener();

Destroys the LocalServiceListener.

Member Functions

disable inline

void disable(
    LocalService & aService
);

Unregisters from all events of the service.

disable

void disable();

Unregisters from all events for each service we previously registered. This method must be called before the LocalServiceListener gets destroyed.

enable

void enable(
    LocalService & aService
);

Registers for all events of the service. Never forget to unregister from a LocalService via disable(...)

onDomainChanged virtual

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.

onRegistrationFailed virtual

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.

onServiceRenamed virtual

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.

mutex protected inline

Poco::FastMutex & mutex();

Variables

_mutex protected

Poco::FastMutex _mutex;