Data type for representing a D-Bus variant. More...
#include <qdbusvariant.h>
Public Member Functions | |
QDBusVariant () | |
Creates an empty variant object. | |
QDBusVariant (const QDBusVariant &other) | |
Copies the given other variant object. | |
bool | operator== (const QDBusVariant &other) const |
Checks if the given other variant is equal to this one. | |
bool | operator!= (const QDBusVariant &other) const |
Checks if the given other variant is not equal to this one. | |
Public Attributes | |
QString | signature |
The D-Bus data signature of the data contained in value. | |
QDBusData | value |
The D-Bus data type to transport as a variant. |
Data type for representing a D-Bus variant.
When D-Bus methods or signal require that a paramater can have any of the D-Bus data types, a D-Bus variant can be used.
Basically a D-Bus variant includes the actual data and a D-Bus data signature to allow a receiver to determine the contents.
Since the QDBusVariant's value member will already be fully de-marshalled, a receiver using this bindings can savely ignore the signature if it doesn't need it for a different purpose (e.g. logging).
However, when creating a QDBusVariant object for sending, make sure the signature member is correctly setup, for example by using the value member's buildDBusSignature() method.
QDBusVariant variant; variant.value = QDBusData::fromInt32(131719); variant.signature = variant.value.buildDBusSignature();
QDBusVariant::QDBusVariant | ( | ) | [inline] |
Creates an empty variant object.
QDBusVariant::QDBusVariant | ( | const QDBusVariant & | other | ) | [inline] |
bool QDBusVariant::operator!= | ( | const QDBusVariant & | other | ) | const [inline] |
bool QDBusVariant::operator== | ( | const QDBusVariant & | other | ) | const [inline] |
QString QDBusVariant::signature |
The D-Bus data signature of the data contained in value.
Referenced by operator!=(), operator==(), and QDBusVariant().
The D-Bus data type to transport as a variant.
Referenced by operator!=(), operator==(), and QDBusVariant().