QDBusMetaType Class

Meta-type registration system for the Qt D-Bus module. \internal. More...

Header: #include <QDBusMetaType>

Public Types

Static Public Members

bool demarshall(const QDBusArgument &arg, QMetaType metaType, void *data)
bool marshall(QDBusArgument &arg, QMetaType metaType, const void *data)
void registerCustomType(QMetaType type, const QByteArray &signature)
void registerMarshallOperators(QMetaType metaType, MarshallFunction mf, DemarshallFunction df)

Detailed Description

\inmoduleQtDBus

The QDBusMetaType class allows you to register class types for marshalling and demarshalling over D-Bus. D-Bus supports a very limited set of primitive types, but allows one to extend the type system by creating compound types, such as arrays (lists) and structs. In order to use them with Qt D-Bus, those types must be registered.

See Qt D-Bus Type System for more information on the type system and how to register additional types.

See also Qt D-Bus Type System, qDBusRegisterMetaType(), QMetaType, QVariant, and QDBusArgument.

Member Type Documentation

QDBusMetaType::DemarshallFunction

\internal

QDBusMetaType::MarshallFunction

\internal

Member Function Documentation

[static] bool QDBusMetaType::demarshall(const QDBusArgument &arg, QMetaType metaType, void *data)

\internalExecutes the demarshalling of type metaType (whose data will be placed in data) from the D-Bus marshalling argument arg. Returns true if the demarshalling succeeded, or false if an error occurred.

[static] bool QDBusMetaType::marshall(QDBusArgument &arg, QMetaType metaType, const void *data)

\internalExecutes the marshalling of type metaType (whose data is contained in data) to the D-Bus marshalling argument arg. Returns true if the marshalling succeeded, or false if an error occurred.

[static] void QDBusMetaType::registerCustomType(QMetaType type, const QByteArray &signature)

\internal

Registers the meta type type to be represeneted by the given D-Bus signature.

This is used in qdbuscpp2xml for custom types which aren't known to the C++ type system.

[static] void QDBusMetaType::registerMarshallOperators(QMetaType metaType, MarshallFunction mf, DemarshallFunction df)

\internalRegisters the marshalling and demarshalling functions for meta type metaType.