QtZeroConf
 All Classes Functions Variables Pages
Signals | Public Member Functions | Protected Slots | List of all members
ZConfServiceBrowser Class Reference

AvahiServiceBrowser wrapper that lets you browse for services available on the local network. This class can be used to handle Zeroconf service discovery in a Qt-based client application. More...

Signals

void serviceEntryAdded (QString)
void serviceEntryRemoved (QString)

Public Member Functions

 ZConfServiceBrowser (QObject *parent=0)
 ~ZConfServiceBrowser ()
void browse (QString serviceType="_http._tcp")
ZConfServiceEntry serviceEntry (QString name)

Protected Slots

void createServiceBrowser ()

Detailed Description

AvahiServiceBrowser wrapper that lets you browse for services available on the local network. This class can be used to handle Zeroconf service discovery in a Qt-based client application.

Instantiate a ZConfServiceBrowser object and call browse() with the desired service type as argument (e.g., "_http._tcp" or "_ipp._tcp").

ZConfServiceBrowser will emit serviceEntryAdded() when a new service is discovered and serviceEntryRemoved() when a service is removed from the network.

Constructor & Destructor Documentation

ZConfServiceBrowser::ZConfServiceBrowser ( QObject *  parent = 0)
explicit

Creates a Zeroconf service browser. Call browse() to start browsing for services.

ZConfServiceBrowser::~ZConfServiceBrowser ( )

Destroys the browser object and releases all resources associated with it.

Member Function Documentation

void ZConfServiceBrowser::browse ( QString  serviceType = "_http._tcp")

Browses for Zeroconf services on the LAN. This is a non-blocking call. ZConfServiceBrowser will emit serviceEntryAdded() when a new service is discovered and serviceEntryRemoved() when a service is removed from the network.

ZConfServiceEntry ZConfServiceBrowser::serviceEntry ( QString  name)

Returns a ZConfServiceEntry struct with detailed information about the Zeroconf service associated with the name.


The documentation for this class was generated from the following files: