DNSSD::PublicService Class Reference
#include <publicservice.h>
Inheritance diagram for DNSSD::PublicService:

Detailed Description
This class is most important for application that wants to announce its service on network.This class represents local service being published.Suppose that you want to make your web server public - this is simplest way:
DNSSD::PublicService *service = new DNSSD::PublicService("My files","_http._tcp",80); bool isOK = service->publish();
In this example publish() is synchronous - it will not return until publishing is complete. This is usually not too long but it can freeze application's GUI for a moment. Asynchronous publishing is better for responsiveness. Example:
DNSSD::PublicService *service = new DNSSD::PublicService("My files","_http._tcp",80); connect(service,SIGNAL(published(bool)),this,SLOT(wasPublished(bool))); service->publishAsync();
- Author:
- Jakub Stachowski
Definition at line 57 of file publicservice.h.
Signals | |
void | published (bool) |
Public Member Functions | |
PublicService (const QString &name=QString::null, const QString &type=QString::null, unsigned int port=0, const QString &domain=QString::null) | |
~PublicService () | |
void | stop () |
bool | publish () |
bool | isPublished () const |
void | publishAsync () |
void | setTextData (const QMap< QString, QString > &textData) |
void | setServiceName (const QString &serviceName) |
void | setType (const QString &type) |
void | setPort (unsigned short port) |
void | setDomain (const QString &domain) |
const KURL | toInvitation (const QString &host=QString::null) |
Protected Member Functions | |
virtual void | customEvent (QCustomEvent *event) |
virtual void | virtual_hook (int, void *) |
Constructor & Destructor Documentation
|
Definition at line 66 of file publicservice.cpp. |
Member Function Documentation
|
Returns true is currently published.
Definition at line 142 of file publicservice.cpp. |
|
Synchrounous publish. Application will be freezed until publishing is complete.
Definition at line 147 of file publicservice.cpp. |
|
Asynchronous version of publish(). It return immediately and emits signal published(bool) when completed. Note that in case of early detected error (like bad service type) signal may be emitted before return of this function. Definition at line 204 of file publicservice.cpp. |
|
Emitted when publishing is complete - parameter is set to true if it was successfull. It will also emitted when name, port or type of already published service is changed. |
|
Sets domain where service is published. "local." means local LAN. If service is currently published, it will be re-announced with new data. Definition at line 105 of file publicservice.cpp. |
|
Sets port. If service is currently published, it will be re-announced with new data. Definition at line 124 of file publicservice.cpp. |
|
Sets name of the service. If service is currently published, it will be re-announced with new data. Definition at line 96 of file publicservice.cpp. |
|
Sets new text properties. If services is already published, it will be re-announced with new data. Definition at line 133 of file publicservice.cpp. |
|
Sets type of service. It has to in form of _type._udp or _type._tcp. If service is currently published, it will be re-announced with new data. Definition at line 115 of file publicservice.cpp. |
|
Stops publishing or abort incomplete publish request. Useful when you want to disable service for some time. Definition at line 154 of file publicservice.cpp. |
|
Translates service into URL that can be sent to another user.
Definition at line 226 of file publicservice.cpp. |
The documentation for this class was generated from the following files: