KIO

connectionserver.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2000 Stephan Kulow <coolo@kde.org>
4 SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KIO_CONNECTIONSERVER_H
10#define KIO_CONNECTIONSERVER_H
11
12#include <QObject>
13#include <QUrl>
14
15#include "connectionbackend_p.h"
16
17namespace KIO
18{
19class ConnectionServerPrivate;
20class Connection;
21
22/*
23 * This class provides a way to obtaining KIO::Connection connections.
24 */
25class ConnectionServer : public QObject
26{
28public:
29 explicit ConnectionServer(QObject *parent = nullptr);
30 ~ConnectionServer() override;
31
32 /**
33 * Sets this connection to listen mode. Use address() to obtain the
34 * address this is listening on.
35 */
36 void listenForRemote();
37 bool isListening() const;
38
39 /**
40 * Returns the address for this connection if it is listening, an empty
41 * address if not.
42 */
43 QUrl address() const;
44
45 void setNextPendingConnection(Connection *conn);
46
48 void newConnection();
49
50private:
51 ConnectionBackend *backend = nullptr;
52};
53
54} // namespace KIO
55
56#endif
A namespace for KIO globals.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:56:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.