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

dnssd

  • dnssd
publicservice.h
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2004, 2005 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 DNSSDPUBLICSERVICE_H
22 #define DNSSDPUBLICSERVICE_H
23 
24 #include <tqobject.h>
25 #include <dnssd/servicebase.h>
26 #ifdef HAVE_DNSSD
27 #include <avahi-client/client.h>
28 #else
29 #define AvahiClientState void*
30 #endif
31 
32 class KURL;
33 namespace DNSSD
34 {
35 class PublicServicePrivate;
36 
61 class TDEDNSSD_EXPORT PublicService : public TQObject, public ServiceBase
62 {
63  Q_OBJECT
64 public:
73  PublicService(const TQString& name=TQString::null,const TQString& type=TQString::null,
74  unsigned int port=0,const TQString& domain=TQString::null);
75 
76  ~PublicService();
77 
82  void stop();
83 
88  bool publish();
89 
93  bool isPublished() const;
94 
100  void publishAsync();
101 
105  void setTextData(const TQMap<TQString,TQString>& textData);
106 
110  void setServiceName(const TQString& serviceName);
111 
116  void setType(const TQString& type);
117 
121  void setPort(unsigned short port);
122 
127  void setDomain(const TQString& domain);
128 
135  const KURL toInvitation(const TQString& host=TQString::null);
136 
137 signals:
142  void published(bool);
143 private:
144  PublicServicePrivate *d;
145  bool fillEntryGroup();
146  void tryApply();
147 private slots:
148  void clientState(AvahiClientState);
149 
150 protected:
151  virtual void customEvent(TQCustomEvent* event);
152  virtual void virtual_hook(int, void*);
153 };
154 
155 
156 }
157 
158 #endif
DNSSD::ServiceBase
This class is used to carry information about service.
Definition: servicebase.h:40
DNSSD::PublicService
This class is most important for application that wants to announce its service on network...
Definition: publicservice.h:61
DNSSD
Definition: domainbrowser.cpp:36

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for dnssd by doxygen 1.8.8
This website is maintained by Timothy Pearson.