Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusconnectioninterface.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QDBUSCONNECTIONINTERFACE_H
5#define QDBUSCONNECTIONINTERFACE_H
6
7#include <QtDBus/qtdbusglobal.h>
8#include <QtCore/qstringlist.h>
9
10#include <QtDBus/qdbusabstractinterface.h>
11#include <QtDBus/qdbusreply.h>
12
13#ifndef QT_NO_DBUS
14
16
17
18class QDBusConnection;
19class QString;
20class QByteArray;
21
22/*
23 * Proxy class for interface org.freedesktop.DBus
24 */
26{
29 static inline const char *staticInterfaceName();
30
33
34 Q_PROPERTY(QDBusReply<QStringList> registeredServiceNames READ registeredServiceNames)
35 Q_PROPERTY(QDBusReply<QStringList> activatableServiceNames READ activatableServiceNames)
36
37public:
41 ReplaceExistingService
42 };
43 Q_ENUM(ServiceQueueOptions)
48 Q_ENUM(ServiceReplacementOptions)
50 ServiceNotRegistered = 0,
52 ServiceQueued
53 };
54 Q_ENUM(RegisterServiceReply)
55
56public Q_SLOTS:
57 QDBusReply<QStringList> registeredServiceNames() const;
58 QDBusReply<QStringList> activatableServiceNames() const;
59 QDBusReply<bool> isServiceRegistered(const QString &serviceName) const;
60 QDBusReply<QString> serviceOwner(const QString &name) const;
61 QDBusReply<bool> unregisterService(const QString &serviceName);
62 QDBusReply<QDBusConnectionInterface::RegisterServiceReply> registerService(const QString &serviceName,
63 ServiceQueueOptions qoption = DontQueueService,
64 ServiceReplacementOptions roption = DontAllowReplacement);
65
66 QDBusReply<uint> servicePid(const QString &serviceName) const;
67 QDBusReply<uint> serviceUid(const QString &serviceName) const;
68
69 QDBusReply<void> startService(const QString &name);
70
72 void serviceRegistered(const QString &service);
73 void serviceUnregistered(const QString &service);
74 void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
76
77#ifndef Q_QDOC
78 // internal signals
79 // do not use
80 void NameAcquired(const QString &);
81 void NameLost(const QString &);
82 void NameOwnerChanged(const QString &, const QString &, const QString &);
83protected:
84 void connectNotify(const QMetaMethod &) override;
85 void disconnectNotify(const QMetaMethod &) override;
86#endif
87};
88
90
92
93#endif // QT_NO_DBUS
94#endif
\inmodule QtCore
Definition qbytearray.h:57
void serviceRegistered(const QString &service)
This signal is emitted by the D-Bus server when the bus service name (unique connection name or well-...
void NameAcquired(const QString &)
void callWithCallbackFailed(const QDBusError &error, const QDBusMessage &call)
This signal is emitted when there is an error during a QDBusConnection::callWithCallback().
ServiceQueueOptions
Flags for determining how a service registration should behave, in case the service name is already r...
ServiceReplacementOptions
Flags for determining if the D-Bus server should allow another application to replace a name that thi...
void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
void serviceUnregistered(const QString &service)
This signal is emitted by the D-Bus server when this application loses ownership of the bus service n...
void NameOwnerChanged(const QString &, const QString &, const QString &)
RegisterServiceReply
The possible return values from registerService():
void NameLost(const QString &)
\inmodule QtDBus
\inmodule QtDBus
Definition qdbuserror.h:21
\inmodule QtDBus
\inmodule QtDBus
Definition qdbusreply.h:24
\inmodule QtCore
Definition qmetaobject.h:19
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
DBusConnection * connection
#define Q_DECLARE_BUILTIN_METATYPE(TYPE, METATYPEID, NAME)
Definition qmetatype.h:1553
GLuint name
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS