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 AVAHI_REMOTESERVICE_P_H
22#define AVAHI_REMOTESERVICE_P_H
23
24#include <QtCore/QString>
25#include <QtCore/QList>
26#include <QtCore/QMap>
27#include "servicebase_p.h"
28#include "remoteservice.h"
29#include "avahi_serviceresolver_interface.h"
30
31
32#define K_D RemoteServicePrivate* d=static_cast<RemoteServicePrivate*>(this->d)
33
34namespace DNSSD
35{
36
37class RemoteServicePrivate : public QObject, public ServiceBasePrivate
38{
39Q_OBJECT
40public:
41 RemoteServicePrivate(RemoteService* parent, const QString& name, const QString& type, const QString& domain) : QObject(),
42 ServiceBasePrivate(name, type, domain, QString(), 0), m_resolved(false), m_running(false), m_resolver(0), m_parent(parent)
43 {}
44 ~RemoteServicePrivate() { if (m_resolver) m_resolver->Free(); delete m_resolver; }
45 bool m_resolved;
46 bool m_running;
47 org::freedesktop::Avahi::ServiceResolver* m_resolver;
48 RemoteService* m_parent;
49 void stop();
50
51private Q_SLOTS:
52 void gotFound(int, int, const QString &name, const QString &type, const QString &domain, const QString &host, int aprotocol, const QString &address, ushort port, const QList<QByteArray> &txt, uint flags);
53 void gotError();
54};
55
56}
57
58#endif
59