KDNSSD

servicebase.h
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2004 Jakub Stachowski <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KDNSSDSERVICEBASE_H
10 #define KDNSSDSERVICEBASE_H
11 
12 #include <QMap>
13 #include <QString>
14 #include <QExplicitlySharedDataPointer>
15 #include <dnssd/kdnssd_export.h>
16 
17 namespace KDNSSD
18 {
19 class ServiceBasePrivate;
20 
39 class KDNSSD_EXPORT ServiceBase : public QSharedData //krazy:exclude=dpointer (protected)
40 {
41 public:
43 
61  explicit ServiceBase(const QString &name = QString(),
62  const QString &type = QString(),
63  const QString &domain = QString(),
64  const QString &host = QString(),
65  unsigned short port = 0);
66 
67  virtual ~ServiceBase();
68 
72  QString serviceName() const;
73 
82  QString type() const;
83 
89  QString domain() const;
90 
101  QString hostName() const;
102 
113  unsigned short port() const;
114 
145  QMap<QString, QByteArray> textData() const;
146 
159  bool operator==(const ServiceBase &o) const;
172  bool operator!=(const ServiceBase &o) const;
173 
174 protected:
175  ServiceBase(ServiceBasePrivate *const d);
176  virtual void virtual_hook(int, void *);
177  ServiceBasePrivate *const d;
178 
179 };
180 
181 /* Utility functions */
182 
188 bool domainIsLocal(const QString &domain);
189 
190 }
191 
192 #endif
Describes a service.
Definition: servicebase.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:40:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.