DNSSD
servicebrowser.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DNSSDSERVICEBROWSER_H
00022 #define DNSSDSERVICEBROWSER_H
00023
00024 #include <QtCore/QObject>
00025
00026 #include <dnssd/remoteservice.h>
00027
00028
00029 namespace DNSSD
00030 {
00031 class DomainBrowser;
00032 class ServiceBrowserPrivate;
00033
00055 class KDNSSD_EXPORT ServiceBrowser : public QObject
00056 {
00057 Q_OBJECT
00058 public:
00065 enum State { Working, Stopped, Unsupported };
00066
00067
00078 explicit ServiceBrowser(const QString& type, bool autoResolve=false, const QString& domain=QString(),
00079 const QString& subtype=QString());
00080
00081 ~ServiceBrowser();
00082
00086 QList<RemoteService::Ptr> services() const;
00087
00092 virtual void startBrowse();
00093
00122 static State isAvailable();
00123
00128 bool isAutoResolving() const;
00129
00130 Q_SIGNALS:
00135 void serviceAdded(DNSSD::RemoteService::Ptr);
00141 void serviceRemoved(DNSSD::RemoteService::Ptr);
00142
00152 void finished();
00153
00154 protected:
00155 virtual void virtual_hook(int, void*);
00156 private:
00157 friend class ServiceBrowserPrivate;
00158 ServiceBrowserPrivate* const d;
00159
00160 };
00161
00162 }
00163
00164 #endif