KDNSSD 5.109.0
remoteservice.h
1/*
2 This file is part of the KDE project
3
4 SPDX-FileCopyrightText: 2004, 2005 Jakub Stachowski <qbast@go2.pl>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KDNSSDREMOTESERVICE_H
10#define KDNSSDREMOTESERVICE_H
11
12#include "servicebase.h"
13#include <QMetaType>
14#include <QObject>
15
16namespace KDNSSD
17{
18class RemoteServicePrivate;
19
38class KDNSSD_EXPORT RemoteService : public QObject, public ServiceBase
39{
40 Q_OBJECT
41
42public:
43 typedef QExplicitlySharedDataPointer<RemoteService> Ptr;
44
55 RemoteService(const QString &name, const QString &type, const QString &domain);
56
57 ~RemoteService() override;
58
78
94 bool resolve();
95
102 bool isResolved() const;
103
104Q_SIGNALS:
115 void resolved(bool successful);
116
117protected:
118 void virtual_hook(int id, void *data) override;
119
120private:
121 friend class RemoteServicePrivate;
122};
123
124}
125
126Q_DECLARE_METATYPE(KDNSSD::RemoteService::Ptr)
127
128#endif
Describes a service published over DNS-SD, typically on a remote machine.
Definition remoteservice.h:39
RemoteService(const QString &name, const QString &type, const QString &domain)
Creates an unresolved RemoteService representing the service with the given name, type and domain.
void resolveAsync()
Resolves the host name and port of service asynchronously.
bool isResolved() const
Whether the service has been successfully resolved.
void resolved(bool successful)
Emitted when resolving is complete.
bool resolve()
Resolves the host name and port of service synchronously.
Describes a service.
Definition servicebase.h:41