Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qdbusargument_p.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 QDBUSARGUMENT_P_H
5#define QDBUSARGUMENT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of the QLibrary class. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtDBus/private/qtdbusglobal_p.h>
19#include <qdbusargument.h>
21#include "qdbus_symbols_p.h"
22
23#ifndef QT_NO_DBUS
24
25#ifndef DBUS_TYPE_UNIX_FD
26# define DBUS_TYPE_UNIX_FD int('h')
27# define DBUS_TYPE_UNIX_FD_AS_STRING "h"
28#endif
29
31
32class QDBusMarshaller;
35{
36public:
39 { }
40 virtual ~QDBusArgumentPrivate();
41
42 static bool checkRead(QDBusArgumentPrivate *d);
44 static bool checkWrite(QDBusArgumentPrivate *&d);
45
48
49 static QByteArray createSignature(int id);
51 {
53 return q;
54 }
56 { return q.d; }
57
58public:
59 DBusMessage *message;
62 enum Direction {
66};
67
69{
70public:
74
76
77 void append(uchar arg);
78 void append(bool arg);
79 void append(short arg);
80 void append(ushort arg);
81 void append(int arg);
82 void append(uint arg);
83 void append(qlonglong arg);
84 void append(qulonglong arg);
85 void append(double arg);
86 void append(const QString &arg);
87 void append(const QDBusObjectPath &arg);
88 void append(const QDBusSignature &arg);
90 void append(const QStringList &arg);
91 void append(const QByteArray &arg);
92 bool append(const QDBusVariant &arg); // this one can fail
93
102 QDBusMarshaller *beginCommon(int code, const char *signature);
104 void open(QDBusMarshaller &sub, int code, const char *signature);
105 void close();
106 void error(const QString &message);
107
109 bool appendRegisteredType(const QVariant &arg);
111
112public:
118 bool ok;
120
121private:
122 Q_DECL_COLD_FUNCTION void unregisteredTypeError(QMetaType t);
123 Q_DISABLE_COPY_MOVE(QDBusMarshaller)
124};
125
127{
128public:
132
134
135 uchar toByte();
136 bool toBool();
138 short toShort();
139 int toInt();
140 uint toUInt();
143 double toDouble();
151
163 inline void close() { }
164
165 bool atEnd();
166
170
171public:
174
175private:
176 Q_DISABLE_COPY_MOVE(QDBusDemarshaller)
177 QString toStringUnchecked();
178 QDBusObjectPath toObjectPathUnchecked();
179 QDBusSignature toSignatureUnchecked();
180 QStringList toStringListUnchecked();
181 QByteArray toByteArrayUnchecked();
182};
183
185{ return static_cast<QDBusMarshaller *>(this); }
186
188{ return static_cast<QDBusDemarshaller *>(this); }
189
191
192#endif // QT_NO_DBUS
193#endif
\inmodule QtCore
Definition qatomic.h:112
\inmodule QtCore
Definition qbytearray.h:57
static QDBusArgument create(QDBusArgumentPrivate *d)
QDBusDemarshaller * demarshaller()
static bool checkReadAndDetach(QDBusArgumentPrivate *&d)
static QByteArray createSignature(int id)
virtual ~QDBusArgumentPrivate()
enum QDBusArgumentPrivate::Direction direction
static QDBusArgumentPrivate * d(QDBusArgument &q)
QDBusMarshaller * marshaller()
static bool checkRead(QDBusArgumentPrivate *d)
QDBusArgumentPrivate(int flags=0)
static bool checkWrite(QDBusArgumentPrivate *&d)
\inmodule QtDBus
QDBusDemarshaller * beginArray()
QDBusArgument duplicate()
QDBusDemarshaller * endArray()
QDBusDemarshaller * endStructure()
QDBusDemarshaller * endMapEntry()
QDBusSignature toSignature()
QDBusUnixFileDescriptor toUnixFileDescriptor()
QDBusObjectPath toObjectPath()
QDBusDemarshaller * beginStructure()
QDBusDemarshaller * endCommon()
QDBusDemarshaller * beginMapEntry()
QDBusDemarshaller * beginCommon()
DBusMessageIter iterator
QDBusDemarshaller * endMap()
QDBusDemarshaller(int flags)
QDBusDemarshaller * beginMap()
QDBusDemarshaller * parent
QDBusArgument::ElementType currentType()
void append(uchar arg)
QDBusMarshaller * parent
QDBusMarshaller * endMapEntry()
QDBusMarshaller * endCommon()
QDBusMarshaller * endStructure()
void open(QDBusMarshaller &sub, int code, const char *signature)
QString currentSignature()
bool appendVariantInternal(const QVariant &arg)
QDBusMarshaller * beginMap(QMetaType kid, QMetaType vid)
QDBusMarshaller(int flags)
QDBusMarshaller * endMap()
QDBusMarshaller * beginCommon(int code, const char *signature)
QDBusMarshaller * beginMapEntry()
bool appendRegisteredType(const QVariant &arg)
QDBusMarshaller * beginStructure()
QDBusMarshaller * beginArray(QMetaType id)
bool appendCrossMarshalling(QDBusDemarshaller *arg)
DBusMessageIter iterator
QDBusMarshaller * endArray()
\inmodule QtDBus
\inmodule QtDBus
\inmodule QtDBus
\inmodule QtCore
Definition qmetatype.h:320
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qvariant.h:64
Combined button and popup list for selecting options.
#define Q_DECL_COLD_FUNCTION
DBusConnection const char DBusError * error
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter * sub
GLbitfield flags
GLuint GLsizei const GLchar * message
GLint ref
GLdouble GLdouble t
Definition qopenglext.h:243
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
SSL_CTX int(*) void arg)
unsigned char uchar
Definition qtypes.h:27
quint64 qulonglong
Definition qtypes.h:59
unsigned int uint
Definition qtypes.h:29
unsigned short ushort
Definition qtypes.h:28
qint64 qlonglong
Definition qtypes.h:58
QObject::connect nullptr