QMdnsEngine
0.1.0
Multicast DNS library for Qt applications
|
Browser for local services More...
#include <qmdnsengine/browser.h>
Signals | |
void | serviceAdded (const Service &service) |
Indicate that a new service has been added. More... | |
void | serviceRemoved (const Service &service) |
Indicate that the specified service was removed. More... | |
void | serviceUpdated (const Service &service) |
Indicate that the specified service was updated. More... | |
Public Member Functions | |
Browser (AbstractServer *server, const QByteArray &type, Cache *cache=0, QObject *parent=0) | |
Create a new browser instance. More... | |
This class provides a simple way to discover services on the local network. A cache may be provided in the constructor to store records for future queries.
To browse for services of any type:
To browse for services of a specific type:
When a service is found, the serviceAdded() signal is emitted:
The serviceUpdated() and serviceRemoved() signals are emitted when services are updated (their properties change) or are removed, respectively.
QMdnsEngine::Browser::Browser | ( | AbstractServer * | server, |
const QByteArray & | type, | ||
Cache * | cache = 0 , |
||
QObject * | parent = 0 |
||
) |
server | server to use for receiving and sending mDNS messages |
type | service type to browse for |
cache | DNS cache to use or null to create one |
parent | QObject |
|
signal |
This signal is emitted when the PTR and SRV records for a service are received. If TXT records are received later, the serviceUpdated() signal will be emitted.
|
signal |
This signal is emitted when an essential record (PTR or SRV) is expiring from the cache. This will also occur when an updated PTR or SRV record is received with a TTL of 0.
|
signal |
This signal is emitted when the SRV record for a service (identified by its name and type) or a TXT record has changed.