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
QDBusMarshaller Class Referencefinal

#include <qdbusargument_p.h>

+ Inheritance diagram for QDBusMarshaller:
+ Collaboration diagram for QDBusMarshaller:

Public Member Functions

 QDBusMarshaller (QDBusConnection::ConnectionCapabilities flags={})
 
 ~QDBusMarshaller ()
 
QString currentSignature ()
 
void append (uchar arg)
 
void append (bool arg)
 
void append (short arg)
 
void append (ushort arg)
 
void append (int arg)
 
void append (uint arg)
 
void append (qlonglong arg)
 
void append (qulonglong arg)
 
void append (double arg)
 
void append (const QString &arg)
 
void append (const QDBusObjectPath &arg)
 
void append (const QDBusSignature &arg)
 
void append (const QDBusUnixFileDescriptor &arg)
 
void append (const QStringList &arg)
 
void append (const QByteArray &arg)
 
bool append (const QDBusVariant &arg)
 
QDBusMarshallerbeginStructure ()
 
QDBusMarshallerendStructure ()
 
QDBusMarshallerbeginArray (QMetaType id)
 
QDBusMarshallerendArray ()
 
QDBusMarshallerbeginMap (QMetaType kid, QMetaType vid)
 
QDBusMarshallerendMap ()
 
QDBusMarshallerbeginMapEntry ()
 
QDBusMarshallerendMapEntry ()
 
QDBusMarshallerbeginCommon (int code, const char *signature)
 
QDBusMarshallerendCommon ()
 
void open (QDBusMarshaller &sub, int code, const char *signature)
 
void close ()
 
void error (const QString &message)
 
bool appendVariantInternal (const QVariant &arg)
 
bool appendRegisteredType (const QVariant &arg)
 
bool appendCrossMarshalling (QDBusDemarshaller *arg)
 
- Public Member Functions inherited from QDBusArgumentPrivate
virtual ~QDBusArgumentPrivate ()
 
QDBusMarshallermarshaller ()
 
QDBusDemarshallerdemarshaller ()
 

Public Attributes

DBusMessageIter iterator
 
QDBusMarshallerparent = nullptr
 
QByteArrayba = nullptr
 
QString errorString
 
char closeCode = 0
 
bool ok = true
 
bool skipSignature = false
 
- Public Attributes inherited from QDBusArgumentPrivate
DBusMessage * message = nullptr
 
QAtomicInt ref = 1
 
QDBusConnection::ConnectionCapabilities capabilities
 
Direction direction
 

Additional Inherited Members

- Public Types inherited from QDBusArgumentPrivate
enum class  Direction { Marshalling , Demarshalling }
 
- Static Public Member Functions inherited from QDBusArgumentPrivate
static bool checkRead (QDBusArgumentPrivate *d)
 
static bool checkReadAndDetach (QDBusArgumentPrivate *&d)
 
static bool checkWrite (QDBusArgumentPrivate *&d)
 
static QByteArray createSignature (QMetaType type)
 
static QDBusArgument create (QDBusArgumentPrivate *d)
 
static QDBusArgumentPrivated (QDBusArgument &q)
 
- Protected Member Functions inherited from QDBusArgumentPrivate
 QDBusArgumentPrivate (Direction direction, QDBusConnection::ConnectionCapabilities flags={})
 

Detailed Description

Definition at line 72 of file qdbusargument_p.h.

Constructor & Destructor Documentation

◆ QDBusMarshaller()

QDBusMarshaller::QDBusMarshaller ( QDBusConnection::ConnectionCapabilities flags = {})
inlineexplicit

Definition at line 75 of file qdbusargument_p.h.

Referenced by beginCommon().

+ Here is the caller graph for this function:

◆ ~QDBusMarshaller()

QDBusMarshaller::~QDBusMarshaller ( )

Definition at line 23 of file qdbusmarshaller.cpp.

References close().

+ Here is the call graph for this function:

Member Function Documentation

◆ append() [1/16]

void QDBusMarshaller::append ( bool arg)
inline

Definition at line 51 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_BOOLEAN, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [2/16]

void QDBusMarshaller::append ( const QByteArray & arg)
inline

◆ append() [3/16]

void QDBusMarshaller::append ( const QDBusObjectPath & arg)
inline

Definition at line 108 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_OBJECT_PATH, error, QByteArray::isEmpty(), iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [4/16]

void QDBusMarshaller::append ( const QDBusSignature & arg)
inline

Definition at line 120 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_SIGNATURE, error, QByteArray::isNull(), iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [5/16]

void QDBusMarshaller::append ( const QDBusUnixFileDescriptor & arg)
inline

Definition at line 132 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_UNIX_FD, error, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [6/16]

bool QDBusMarshaller::append ( const QDBusVariant & arg)
inline

Definition at line 159 of file qdbusmarshaller.cpp.

References arg, QDBusMetaTypeId::argument(), ba, QDBusArgumentPrivate::capabilities, DBUS_TYPE_VARIANT, DBUS_TYPE_VARIANT_AS_STRING, error, open(), qWarning, skipSignature, sub, and QDBusMetaType::typeToSignature().

+ Here is the call graph for this function:

◆ append() [7/16]

void QDBusMarshaller::append ( const QString & arg)

Definition at line 100 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_STRING, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [8/16]

void QDBusMarshaller::append ( const QStringList & arg)
inline

Definition at line 199 of file qdbusmarshaller.cpp.

References arg, ba, QDBusArgumentPrivate::capabilities, DBUS_TYPE_ARRAY, DBUS_TYPE_ARRAY_AS_STRING, DBUS_TYPE_STRING_AS_STRING, open(), skipSignature, and sub.

+ Here is the call graph for this function:

◆ append() [9/16]

void QDBusMarshaller::append ( double arg)
inline

Definition at line 94 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_DOUBLE, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [10/16]

void QDBusMarshaller::append ( int arg)
inline

Definition at line 70 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_INT32, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [11/16]

void QDBusMarshaller::append ( qlonglong arg)
inline

Definition at line 82 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_INT64, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [12/16]

void QDBusMarshaller::append ( qulonglong arg)
inline

Definition at line 88 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_UINT64, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [13/16]

void QDBusMarshaller::append ( short arg)
inline

Definition at line 58 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_INT16, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [14/16]

void QDBusMarshaller::append ( uchar arg)
inline

Definition at line 45 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_BYTE, iterator, qIterAppend(), and skipSignature.

Referenced by appendVariantInternal(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), QDBusArgument::operator<<(), and QDBusMessagePrivate::toDBusMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ append() [15/16]

void QDBusMarshaller::append ( uint arg)
inline

Definition at line 76 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_UINT32, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ append() [16/16]

void QDBusMarshaller::append ( ushort arg)
inline

Definition at line 64 of file qdbusmarshaller.cpp.

References arg, ba, DBUS_TYPE_UINT16, iterator, qIterAppend(), and skipSignature.

+ Here is the call graph for this function:

◆ appendCrossMarshalling()

bool QDBusMarshaller::appendCrossMarshalling ( QDBusDemarshaller * arg)

Definition at line 490 of file qdbusmarshaller.cpp.

References QDBusDemarshaller::beginCommon(), QDBusArgumentPrivate::capabilities, DBUS_TYPE_ARRAY, DBUS_TYPE_UNIX_FD, DBUS_TYPE_VARIANT, QDBusArgumentPrivate::demarshaller(), QDBusUtil::isValidBasicType(), QDBusUtil::isValidFixedType(), iterator, QDBusDemarshaller::iterator, open(), and sub.

Referenced by appendVariantInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ appendRegisteredType()

bool QDBusMarshaller::appendRegisteredType ( const QVariant & arg)

Definition at line 483 of file qdbusmarshaller.cpp.

References arg, QDBusArgumentPrivate::create(), and QDBusMetaType::marshall().

Referenced by appendVariantInternal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ appendVariantInternal()

◆ beginArray()

QDBusMarshaller * QDBusMarshaller::beginArray ( QMetaType id)
inline

Definition at line 219 of file qdbusmarshaller.cpp.

References beginCommon(), DBUS_TYPE_ARRAY, and QDBusMetaType::typeToSignature().

Referenced by QDBusArgument::beginArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beginCommon()

QDBusMarshaller * QDBusMarshaller::beginCommon ( int code,
const char * signature )

Definition at line 299 of file qdbusmarshaller.cpp.

References QDBusMarshaller(), QDBusArgumentPrivate::capabilities, d, and open().

Referenced by beginArray(), beginMap(), beginMapEntry(), and beginStructure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beginMap()

QDBusMarshaller * QDBusMarshaller::beginMap ( QMetaType kid,
QMetaType vid )
inline

Definition at line 230 of file qdbusmarshaller.cpp.

References arg, beginCommon(), DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING, DBUS_DICT_ENTRY_END_CHAR_AS_STRING, DBUS_TYPE_ARRAY, error, QDBusUtil::isValidBasicType(), QT_WARNING_DISABLE_GCC, QT_WARNING_POP, QT_WARNING_PUSH, qWarning, and QDBusMetaType::typeToSignature().

Referenced by QDBusArgument::beginMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beginMapEntry()

QDBusMarshaller * QDBusMarshaller::beginMapEntry ( )
inline

Definition at line 262 of file qdbusmarshaller.cpp.

References beginCommon(), and DBUS_TYPE_DICT_ENTRY.

Referenced by QDBusArgument::beginMapEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ beginStructure()

QDBusMarshaller * QDBusMarshaller::beginStructure ( )
inline

Definition at line 214 of file qdbusmarshaller.cpp.

References beginCommon(), and DBUS_TYPE_STRUCT.

Referenced by QDBusArgument::beginStructure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ close()

void QDBusMarshaller::close ( )

Definition at line 325 of file qdbusmarshaller.cpp.

References ba, closeCode, iterator, parent, and skipSignature.

Referenced by ~QDBusMarshaller().

+ Here is the caller graph for this function:

◆ currentSignature()

QString QDBusMarshaller::currentSignature ( )
inline

Definition at line 38 of file qdbusmarshaller.cpp.

References QString::fromUtf8().

Referenced by QDBusArgument::currentSignature().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endArray()

QDBusMarshaller * QDBusMarshaller::endArray ( )
inline

Definition at line 309 of file qdbusmarshaller.cpp.

References endCommon().

Referenced by QDBusArgument::endArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endCommon()

QDBusMarshaller * QDBusMarshaller::endCommon ( )

Definition at line 318 of file qdbusmarshaller.cpp.

References parent.

Referenced by endArray(), endMap(), endMapEntry(), and endStructure().

+ Here is the caller graph for this function:

◆ endMap()

QDBusMarshaller * QDBusMarshaller::endMap ( )
inline

Definition at line 312 of file qdbusmarshaller.cpp.

References endCommon().

Referenced by QDBusArgument::endMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endMapEntry()

QDBusMarshaller * QDBusMarshaller::endMapEntry ( )
inline

Definition at line 315 of file qdbusmarshaller.cpp.

References endCommon().

Referenced by QDBusArgument::endMapEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ endStructure()

QDBusMarshaller * QDBusMarshaller::endStructure ( )
inline

Definition at line 306 of file qdbusmarshaller.cpp.

References endCommon().

Referenced by QDBusArgument::endStructure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error()

void QDBusMarshaller::error ( const QString & message)

Definition at line 335 of file qdbusmarshaller.cpp.

References error(), errorString, ok, and parent.

Referenced by error().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ open()

void QDBusMarshaller::open ( QDBusMarshaller & sub,
int code,
const char * signature )

Definition at line 267 of file qdbusmarshaller.cpp.

References ba, QDBusArgumentPrivate::capabilities, DBUS_STRUCT_BEGIN_CHAR, DBUS_STRUCT_END_CHAR, DBUS_TYPE_ARRAY, DBUS_TYPE_DICT_ENTRY, DBUS_TYPE_STRUCT, iterator, QObject::parent(), Q_FALLTHROUGH, skipSignature, and sub.

Referenced by append(), append(), appendCrossMarshalling(), and beginCommon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ba

◆ closeCode

char QDBusMarshaller::closeCode = 0

Definition at line 122 of file qdbusargument_p.h.

Referenced by close().

◆ errorString

QString QDBusMarshaller::errorString

Definition at line 121 of file qdbusargument_p.h.

Referenced by error(), and QDBusMessagePrivate::toDBusMessage().

◆ iterator

◆ ok

bool QDBusMarshaller::ok = true

◆ parent

QDBusMarshaller* QDBusMarshaller::parent = nullptr

Definition at line 119 of file qdbusargument_p.h.

Referenced by close(), endCommon(), and error().

◆ skipSignature

bool QDBusMarshaller::skipSignature = false

The documentation for this class was generated from the following files: