• 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
32class KURL;
33namespace DNSSD
34{
35class PublicServicePrivate;
36
60
61class TDEDNSSD_EXPORT PublicService : public TQObject, public ServiceBase
62{
63 TQ_OBJECT
64public:
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
137signals:
142 void published(bool);
143private:
144 PublicServicePrivate *d;
145 bool fillEntryGroup();
146 void tryApply();
147private slots:
148 void clientState(AvahiClientState);
149
150protected:
151 virtual void customEvent(TQCustomEvent* event);
152 virtual void virtual_hook(int, void*);
153};
154
155
156}
157
158#endif
DNSSD::PublicService::setType
void setType(const TQString &type)
Sets type of service.
Definition publicservice.cpp:134
DNSSD::PublicService::isPublished
bool isPublished() const
Returns true is currently published.
Definition publicservice.cpp:167
DNSSD::PublicService::setTextData
void setTextData(const TQMap< TQString, TQString > &textData)
Sets new text properties.
Definition publicservice.cpp:156
DNSSD::PublicService::published
void published(bool)
Emitted when publishing is complete - parameter is set to true if it was successfull.
DNSSD::PublicService::setPort
void setPort(unsigned short port)
Sets port.
Definition publicservice.cpp:145
DNSSD::PublicService::toInvitation
const KURL toInvitation(const TQString &host=TQString::null)
Translates service into URL that can be sent to another user.
Definition publicservice.cpp:265
DNSSD::PublicService::publishAsync
void publishAsync()
Asynchronous version of publish().
Definition publicservice.cpp:237
DNSSD::PublicService::PublicService
PublicService(const TQString &name=TQString::null, const TQString &type=TQString::null, unsigned int port=0, const TQString &domain=TQString::null)
Definition publicservice.cpp:77
DNSSD::PublicService::publish
bool publish()
Synchrounous publish.
Definition publicservice.cpp:172
DNSSD::PublicService::setServiceName
void setServiceName(const TQString &serviceName)
Sets name of the service.
Definition publicservice.cpp:111
DNSSD::PublicService::stop
void stop()
Stops publishing or abort incomplete publish request.
Definition publicservice.cpp:179
DNSSD::PublicService::setDomain
void setDomain(const TQString &domain)
Sets domain where service is published.
Definition publicservice.cpp:122
DNSSD::ServiceBase::domain
const TQString & domain() const
Returns domain that given service belongs to.
Definition servicebase.cpp:79
DNSSD::ServiceBase::type
const TQString & type() const
Returns type of service.
Definition servicebase.cpp:74
DNSSD::ServiceBase::textData
const TQMap< TQString, TQString > & textData() const
Returns read only map of text properties.
Definition servicebase.cpp:93
DNSSD::ServiceBase::port
unsigned short port() const
Returns port number.
Definition servicebase.cpp:89
DNSSD::ServiceBase::ServiceBase
ServiceBase(const TQString &name=TQString::null, const TQString &type=TQString::null, const TQString &domain=TQString::null, const TQString &host=TQString::null, unsigned short port=0)
Definition servicebase.cpp:27
DNSSD::ServiceBase::serviceName
const TQString & serviceName() const
Returns name of service.
Definition servicebase.cpp:69

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.15.0
This website is maintained by Timothy Pearson.