fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / dnssd / mdnsd-sdevent.h
blobd20b0de52f413bc15e31ffe25b60d3b3161f0fca
1 /* This file is part of the KDE project
3 * Copyright (C) 2004 Jakub Stachowski <qbast@go2.pl>
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.
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.
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.
21 #ifndef MDNSD_SDEVENT_H
22 #define MDNSD_SDEVENT_H
24 #include <QtCore/QEvent>
25 #include <QtCore/QString>
26 #include <QtCore/QMap>
28 namespace DNSSD
31 enum Operation { SD_ERROR = 101,SD_ADDREMOVE, SD_PUBLISH, SD_RESOLVE};
33 class ErrorEvent : public QEvent
35 public:
36 ErrorEvent() : QEvent((QEvent::Type)(QEvent::User+SD_ERROR))
39 class AddRemoveEvent : public QEvent
41 public:
42 enum Operation { Add, Remove };
43 AddRemoveEvent(Operation op,const QString& name,const QString& type,
44 const QString& domain, bool last) : QEvent((QEvent::Type)(QEvent::User+SD_ADDREMOVE)),
45 m_op(op), m_name(name), m_type(type), m_domain(domain), m_last(last)
48 const Operation m_op;
49 const QString m_name;
50 const QString m_type;
51 const QString m_domain;
52 const bool m_last;
55 class PublishEvent : public QEvent
57 public:
58 PublishEvent(const QString& name) : QEvent((QEvent::Type)(QEvent::User+SD_PUBLISH)), m_name(name)
61 const QString m_name;
64 class ResolveEvent : public QEvent
66 public:
67 ResolveEvent(const QString& hostname, unsigned short port,
68 const QMap<QString,QByteArray>& txtdata)
69 : QEvent((QEvent::Type)(QEvent::User+SD_RESOLVE)), m_hostname(hostname),
70 m_port(port), m_txtdata(txtdata)
73 const QString m_hostname;
74 const unsigned short m_port;
75 const QMap<QString,QByteArray> m_txtdata;
81 #endif