60 #ifndef DBUS_TYPE_UNIX_FD 61 # define DBUS_TYPE_UNIX_FD int('h') 62 # define DBUS_TYPE_UNIX_FD_AS_STRING "h" 92 void (*mf)(
QDBusArgument &,
const T *) = qDBusMarshallHelper<T>;
93 void (*df)(
const QDBusArgument &, T *) = qDBusDemarshallHelper<T>;
95 reinterpret_cast<QDBusMetaType::MarshallFunction>(mf),
96 reinterpret_cast<QDBusMetaType::DemarshallFunction>(df));
109 static volatile bool initialized =
false;
115 message = qRegisterMetaType<QDBusMessage>(
"QDBusMessage");
116 argument = qRegisterMetaType<QDBusArgument>(
"QDBusArgument");
117 variant = qRegisterMetaType<QDBusVariant>(
"QDBusVariant");
118 objectpath = qRegisterMetaType<QDBusObjectPath>(
"QDBusObjectPath");
119 signature = qRegisterMetaType<QDBusSignature>(
"QDBusSignature");
120 error = qRegisterMetaType<QDBusError>(
"QDBusError");
121 unixfd = qRegisterMetaType<QDBusUnixFileDescriptor>(
"QDBusUnixFileDescriptor");
123 #ifndef QDBUS_NO_SPECIALTYPES 125 registerHelper<QDate>();
126 registerHelper<QTime>();
127 registerHelper<QDateTime>();
128 registerHelper<QRect>();
129 registerHelper<QRectF>();
130 registerHelper<QSize>();
131 registerHelper<QSizeF>();
132 registerHelper<QPoint>();
133 registerHelper<QPointF>();
134 registerHelper<QLine>();
135 registerHelper<QLineF>();
136 registerHelper<QVariantList>();
137 registerHelper<QVariantMap>();
138 registerHelper<QVariantHash>();
140 qDBusRegisterMetaType<QList<bool> >();
141 qDBusRegisterMetaType<QList<short> >();
142 qDBusRegisterMetaType<QList<ushort> >();
143 qDBusRegisterMetaType<QList<int> >();
144 qDBusRegisterMetaType<QList<uint> >();
145 qDBusRegisterMetaType<QList<qlonglong> >();
146 qDBusRegisterMetaType<QList<qulonglong> >();
147 qDBusRegisterMetaType<QList<double> >();
148 qDBusRegisterMetaType<QList<QDBusObjectPath> >();
149 qDBusRegisterMetaType<QList<QDBusSignature> >();
150 qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
231 DemarshallFunction df)
235 if (
id < 0 || !mf || !df || !ct)
239 if (
id >= ct->
size())
263 if (
id >= ct->
size())
291 DemarshallFunction df;
295 if (
id >= ct->
size())
329 switch (signature[0])
331 case DBUS_TYPE_BOOLEAN:
337 case DBUS_TYPE_INT16:
340 case DBUS_TYPE_UINT16:
343 case DBUS_TYPE_INT32:
346 case DBUS_TYPE_UINT32:
349 case DBUS_TYPE_INT64:
352 case DBUS_TYPE_UINT64:
355 case DBUS_TYPE_DOUBLE:
358 case DBUS_TYPE_STRING:
361 case DBUS_TYPE_OBJECT_PATH:
364 case DBUS_TYPE_SIGNATURE:
370 case DBUS_TYPE_VARIANT:
373 case DBUS_TYPE_ARRAY:
374 switch (signature[1]) {
378 case DBUS_TYPE_STRING:
381 case DBUS_TYPE_VARIANT:
384 case DBUS_TYPE_OBJECT_PATH:
385 return qMetaTypeId<QList<QDBusObjectPath> >();
387 case DBUS_TYPE_SIGNATURE:
388 return qMetaTypeId<QList<QDBusSignature> >();
417 return DBUS_TYPE_BYTE_AS_STRING;
420 return DBUS_TYPE_BOOLEAN_AS_STRING;
423 return DBUS_TYPE_INT16_AS_STRING;
426 return DBUS_TYPE_UINT16_AS_STRING;
429 return DBUS_TYPE_INT32_AS_STRING;
432 return DBUS_TYPE_UINT32_AS_STRING;
435 return DBUS_TYPE_INT64_AS_STRING;
438 return DBUS_TYPE_UINT64_AS_STRING;
441 return DBUS_TYPE_DOUBLE_AS_STRING;
444 return DBUS_TYPE_STRING_AS_STRING;
447 return DBUS_TYPE_ARRAY_AS_STRING
448 DBUS_TYPE_STRING_AS_STRING;
451 return DBUS_TYPE_ARRAY_AS_STRING
452 DBUS_TYPE_BYTE_AS_STRING;
457 return DBUS_TYPE_VARIANT_AS_STRING;
459 return DBUS_TYPE_OBJECT_PATH_AS_STRING;
461 return DBUS_TYPE_SIGNATURE_AS_STRING;
469 if (type >= ct->
size())
const QStringList & customTypes
static mach_timebase_info_data_t info
#define QT_END_NAMESPACE
This macro expands to.
The QDBusArgument class is used to marshall and demarshall D-Bus arguments.
The QByteArray class provides an array of bytes.
#define DBUS_TYPE_UNIX_FD
QDBusMetaType::DemarshallFunction demarshall
The QVector class is a template class that provides a dynamic array.
void resize(int size)
Sets the size of the vector to size.
#define QT_BEGIN_NAMESPACE
This macro expands to.
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
static const char * data(const QByteArray &arr)
The QReadLocker class is a convenience class that simplifies locking and unlocking read-write locks f...
bool isNull() const
Returns true if this byte array is null; otherwise returns false.
The QWriteLocker class is a convenience class that simplifies locking and unlocking read-write locks ...
The QReadWriteLock class provides read-write locking.
#define DBUS_TYPE_UNIX_FD_AS_STRING
if(void) toggleToolbarShown
QDBusMetaType::MarshallFunction marshall
static QByteArray createSignature(int id)
int size() const
Returns the number of items in the vector.