23#ifndef QT_BOOTSTRAPPED
29#ifndef DBUS_TYPE_UNIX_FD
30# define DBUS_TYPE_UNIX_FD int('h')
31# define DBUS_TYPE_UNIX_FD_AS_STRING "h"
55 if (!initialized.loadRelaxed()) {
62 error().registerType();
65#ifndef QDBUS_NO_SPECIALTYPES
67 qDBusRegisterMetaType<QDate>();
68 qDBusRegisterMetaType<QTime>();
69 qDBusRegisterMetaType<QDateTime>();
70 qDBusRegisterMetaType<QRect>();
71 qDBusRegisterMetaType<QRectF>();
72 qDBusRegisterMetaType<QSize>();
73 qDBusRegisterMetaType<QSizeF>();
74 qDBusRegisterMetaType<QPoint>();
75 qDBusRegisterMetaType<QPointF>();
76 qDBusRegisterMetaType<QLine>();
77 qDBusRegisterMetaType<QLineF>();
78 qDBusRegisterMetaType<QVariantList>();
79 qDBusRegisterMetaType<QVariantMap>();
80 qDBusRegisterMetaType<QVariantHash>();
82 qDBusRegisterMetaType<QList<bool> >();
83 qDBusRegisterMetaType<QList<short> >();
84 qDBusRegisterMetaType<QList<ushort> >();
85 qDBusRegisterMetaType<QList<int> >();
86 qDBusRegisterMetaType<QList<uint> >();
87 qDBusRegisterMetaType<QList<qlonglong> >();
88 qDBusRegisterMetaType<QList<qulonglong> >();
89 qDBusRegisterMetaType<QList<double> >();
92 qDBusRegisterMetaType<QList<QDBusVariant> >();
93 qDBusRegisterMetaType<QList<QDBusObjectPath> >();
94 qDBusRegisterMetaType<QList<QDBusSignature> >();
95 qDBusRegisterMetaType<QList<QDBusUnixFileDescriptor> >();
98 initialized.storeRelaxed(
true);
105 QHash<int, QDBusCustomTypeInfo>
hash;
186 DemarshallFunction df)
188 int id = metaType.id();
189 if (
id < 0 || !mf || !df)
192 auto *ct = customTypes();
199 info.demarshall = df;
210 auto *ct = customTypes();
214 int id = metaType.
id();
222 if (
it == ct->hash.
cend())
226 if (!
info.marshall) {
245 auto *ct = customTypes();
249 int id = metaType.
id();
257 if (
it == ct->hash.
cend())
261 if (!
info.demarshall) {
265 df =
info.demarshall;
267#ifndef QT_BOOTSTRAPPED
296 switch (signature[0])
341 switch (signature[1]) {
346 return QMetaType(QMetaType::QStringList);
349 return QMetaType(QMetaType::QVariantList);
352 return QMetaType::fromType<QList<QDBusObjectPath> >();
355 return QMetaType::fromType<QList<QDBusSignature> >();
374 auto *ct = customTypes();
380 info.signature = signature;
400 case QMetaType::UChar:
403 case QMetaType::Bool:
406 case QMetaType::Short:
409 case QMetaType::UShort:
415 case QMetaType::UInt:
418 case QMetaType::LongLong:
421 case QMetaType::ULongLong:
424 case QMetaType::Double:
427 case QMetaType::QString:
430 case QMetaType::QStringList:
434 case QMetaType::QByteArray:
450 auto *ct = customTypes();
457 if (
it == ct->hash.
end())
462 if (!
info.signature.isNull())
463 return info.signature;
479 info->signature = signature;
481 return info->signature;
static QByteArray createSignature(QMetaType type)
QDBusMetaType::DemarshallFunction demarshall
QDBusMetaType::MarshallFunction marshall
const_iterator cend() const noexcept
const_iterator constFind(const T &value) const
#define DBUS_TYPE_UINT64_AS_STRING
#define DBUS_TYPE_UNIX_FD_AS_STRING
#define DBUS_TYPE_BOOLEAN_AS_STRING
#define DBUS_TYPE_INT16_AS_STRING
#define DBUS_TYPE_SIGNATURE
#define DBUS_TYPE_BYTE_AS_STRING
#define DBUS_TYPE_OBJECT_PATH
#define DBUS_TYPE_INT64_AS_STRING
#define DBUS_TYPE_DOUBLE_AS_STRING
#define DBUS_TYPE_VARIANT
#define DBUS_TYPE_UNIX_FD
#define DBUS_TYPE_INT32_AS_STRING
#define DBUS_TYPE_BOOLEAN
#define DBUS_TYPE_SIGNATURE_AS_STRING
#define DBUS_TYPE_OBJECT_PATH_AS_STRING
#define DBUS_TYPE_ARRAY_AS_STRING
#define DBUS_TYPE_STRING_AS_STRING
#define DBUS_TYPE_VARIANT_AS_STRING
#define DBUS_TYPE_UINT32_AS_STRING
#define DBUS_TYPE_UINT16_AS_STRING
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
#define Q_BASIC_ATOMIC_INITIALIZER(a)
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 return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError * error
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLsizei const GLchar * message
QHash< int, QDBusCustomTypeInfo > hash