1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // Copyright (C) 2016 Intel Corporation. |
3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
4 | #ifndef QDBUSSERVER_H |
5 | #define QDBUSSERVER_H |
6 | |
7 | #include <QtDBus/qtdbusglobal.h> |
8 | #include <QtCore/qobject.h> |
9 | #include <QtCore/qstring.h> |
10 | |
11 | #ifndef QT_NO_DBUS |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | |
16 | class QDBusConnectionPrivate; |
17 | class QDBusError; |
18 | class QDBusConnection; |
19 | |
20 | class Q_DBUS_EXPORT QDBusServer: public QObject |
21 | { |
22 | Q_OBJECT |
23 | public: |
24 | explicit QDBusServer(const QString &address, QObject *parent = nullptr); |
25 | explicit QDBusServer(QObject *parent = nullptr); |
26 | virtual ~QDBusServer(); |
27 | |
28 | bool isConnected() const; |
29 | QDBusError lastError() const; |
30 | QString address() const; |
31 | |
32 | void setAnonymousAuthenticationAllowed(bool value); |
33 | bool isAnonymousAuthenticationAllowed() const; |
34 | |
35 | Q_SIGNALS: |
36 | void newConnection(const QDBusConnection &connection); |
37 | |
38 | private: |
39 | Q_DISABLE_COPY(QDBusServer) |
40 | Q_PRIVATE_SLOT(d, void _q_newConnection(QDBusConnectionPrivate*)) |
41 | QDBusConnectionPrivate *d; |
42 | friend class QDBusConnectionPrivate; |
43 | }; |
44 | |
45 | QT_END_NAMESPACE |
46 | |
47 | #endif // QT_NO_DBUS |
48 | #endif |
49 | |