• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • dnssd
 

dnssd

  • dnssd
servicebrowser.h
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2004 Jakub Stachowski <qbast@go2.pl>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef DNSSDSERVICEBROWSER_H
22#define DNSSDSERVICEBROWSER_H
23
24#include <tqobject.h>
25#include <tqdict.h>
26#include <dnssd/remoteservice.h>
27
28
29class TQStringList;
30namespace DNSSD
31{
32class DomainBrowser;
33class ServiceBrowserPrivate;
34
54class TDEDNSSD_EXPORT ServiceBrowser : public TQObject
55{
56 TQ_OBJECT
57public:
64 enum Flags {
65 AutoDelete =1,
66 AutoResolve = 2
67 };
68
75 enum State { Working, Stopped, Unsupported };
76
91 ServiceBrowser(const TQStringList& types,DomainBrowser* domains,int flags);
92
100 ServiceBrowser(const TQString& type,DomainBrowser* domains=0,bool autoResolve=false);
101
111 ServiceBrowser(const TQString& type,const TQString& domain, int flags);
112
116 ServiceBrowser(const TQString& type,const TQString& domain, bool autoResolve=false);
117
118 ~ServiceBrowser();
119
123 const TQValueList<RemoteService::Ptr>& services() const;
124
129 virtual void startBrowse();
130
136 const DomainBrowser* browsedDomains() const;
137
142 static const TQString AllServices;
143
172 static const State isAvailable();
173
174signals:
179 void serviceAdded(DNSSD::RemoteService::Ptr);
185 void serviceRemoved(DNSSD::RemoteService::Ptr);
186
196 void finished();
197
198public slots:
202 void removeDomain(const TQString& domain);
203
207 void addDomain(const TQString& domain);
208
209protected:
210 virtual void virtual_hook(int, void*);
211private:
212 ServiceBrowserPrivate *d;
213
214 bool allFinished();
215 void init(const TQStringList&, DomainBrowser*, int);
216 TQValueList<RemoteService::Ptr>::Iterator findDuplicate(RemoteService::Ptr src);
217private slots:
218 void serviceResolved(bool success);
219 void gotNewService(DNSSD::RemoteService::Ptr);
220 void gotRemoveService(DNSSD::RemoteService::Ptr);
221 void queryFinished();
222
223};
224
225}
226
227#endif
DNSSD::DomainBrowser
Class used to provide current list of domains for browsing.
Definition: domainbrowser.h:42
DNSSD::ServiceBrowser
Most important class for applications that want to discover specific services on network.
Definition: servicebrowser.h:55
DNSSD::ServiceBrowser::serviceAdded
void serviceAdded(DNSSD::RemoteService::Ptr)
Emitted when new service is discovered (or resolved if autoresolve is set.
DNSSD::ServiceBrowser::Flags
Flags
Definition: servicebrowser.h:64
DNSSD::ServiceBrowser::finished
void finished()
Emitted when all services has been reported.
DNSSD::ServiceBrowser::serviceRemoved
void serviceRemoved(DNSSD::RemoteService::Ptr)
Emitted when service is no longer announced.
DNSSD::ServiceBrowser::AllServices
static const TQString AllServices
Special service type to search for all available service types.
Definition: servicebrowser.h:142
DNSSD::ServiceBrowser::State
State
Availability of DNS-SD services.
Definition: servicebrowser.h:75

dnssd

Skip menu "dnssd"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

dnssd

Skip menu "dnssd"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for dnssd by doxygen 1.9.4
This website is maintained by Timothy Pearson.