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
qdbuscontext.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 QDBUSCONTEXT_H
5#define QDBUSCONTEXT_H
6
7#include <QtDBus/qtdbusglobal.h>
8#include <QtCore/qstring.h>
9#include <QtDBus/qdbuserror.h>
10
11#ifndef QT_NO_DBUS
12
14
15
16class QDBusConnection;
17class QDBusMessage;
18
20class Q_DBUS_EXPORT QDBusContext
21{
22public:
25
26 bool calledFromDBus() const;
28 const QDBusMessage &message() const;
29
30 // convenience methods
31 bool isDelayedReply() const;
32 // yes, they are const, so that you can use them even from const methods
33 void setDelayedReply(bool enable) const;
34 void sendErrorReply(const QString &name, const QString &msg = QString()) const;
35 void sendErrorReply(QDBusError::ErrorType type, const QString &msg = QString()) const;
36
37private:
39 friend class QDBusContextPrivate;
40};
41
43
44#endif // QT_NO_DBUS
45#endif
\inmodule QtDBus
The QDBusContext class allows slots to determine the D-Bus context of the calls.
ErrorType
In order to facilitate verification of the most common D-Bus errors generated by the D-Bus implementa...
Definition qdbuserror.h:24
\inmodule QtDBus
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection * connection
GLenum type
GLboolean enable
GLuint GLsizei const GLchar * message
GLuint name