45 #include <QtCore/qpointer.h> 46 #include <QtCore/qstringlist.h> 61 *
reinterpret_cast<bool *
>(to) = arg.
toBool();
69 *
reinterpret_cast<short *
>(to) = arg.
value<
short>();
77 *
reinterpret_cast<int *
>(to) = arg.
toInt();
93 *
reinterpret_cast<double *
>(to) = arg.
toDouble();
122 qFatal(
"Found a decoded basic type in a D-Bus reply that shouldn't be there");
134 if (!userSignature || !*userSignature) {
257 if (!_clname)
return 0;
258 if (!strcmp(_clname,
"QDBusInterface"))
260 if (d_func()->interface.toLatin1() == _clname)
261 return static_cast<void*>(const_cast<QDBusInterface*>(
this));
262 return QDBusAbstractInterface::qt_metacast(_clname);
274 _id = QDBusAbstractInterface::qt_metacall(_c, _id, _a);
277 return d_func()->metacall(_c, _id, _a);
296 const int *inputTypes =
metaObject->inputTypesForMethod(
id);
297 int inputTypesCount = *inputTypes;
302 for ( ; i <= inputTypesCount; ++i)
303 args <<
QVariant(inputTypes[i], argv[i]);
312 const int *outputTypes =
metaObject->outputTypesForMethod(
id);
313 int outputTypesCount = *outputTypes++;
317 if (argv[0] && it != args.
constEnd())
325 for (
int j = 0; j < outputTypesCount && it != args.
constEnd(); ++i, ++j, ++
it) {
The QVariant class acts like a union for the most common Qt data types.
#define QT_END_NAMESPACE
This macro expands to.
bool isValid() const
Returns true if this is a valid error condition (i.e., if there was an error), otherwise false...
#define it(className, varName)
The QDBusArgument class is used to marshall and demarshall D-Bus arguments.
bool isValid() const
Returns true if this is a valid reference to a remote object.
The QByteArray class provides an array of bytes.
static void copyArgument(void *to, int id, const QVariant &arg)
virtual const QMetaObject * metaObject() const
Overrides QObject::metaObject to return our own copy.
The QDBusError class represents an error received from the D-Bus bus or from remote applications foun...
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
QString currentSignature() const
Returns the type signature of the D-Bus type this QDBusArgument object is currently pointing to...
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
The QDBusSignature class enables the programmer to identify the SIGNATURE type provided by the D-Bus ...
The QDBusInterface class is a proxy for interfaces on remote objects.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
~QDBusInterface()
Destroy the object interface and frees up any resource used.
QDBusError lastError() const
Returns the error the last operation produced, or an invalid error if the last operation did not prod...
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
QStringList toStringList() const
Returns the variant as a QStringList if the variant has type() StringList, String ...
The QDBusAbstractInterface class is the base class for all D-Bus interfaces in the QtDBus binding...
#define QT_BEGIN_NAMESPACE
This macro expands to.
qlonglong toLongLong(bool *ok=0) const
Returns the variant as a long long int if the variant has type() LongLong , Bool , ByteArray , Char , Double , Int , String , UInt , or ULongLong ; otherwise returns 0.
QList< QVariant > arguments() const
Returns the list of arguments that are going to be sent or were received from D-Bus.
QDBusMetaObject * findMetaObject(const QString &service, const QString &path, const QString &interface, QDBusError &error)
The QStringList class provides a list of strings.
qulonglong toULongLong(bool *ok=0) const
Returns the variant as as an unsigned long long int if the variant has type() ULongLong ...
QDBusMetaObject * metaObject
Q_CORE_EXPORT void qFatal(const char *,...)
int userType() const
Returns the storage type of the value stored in the variant.
QDBusConnection connection
The QDBusConnection class represents a connection to the D-Bus bus daemon.
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
uint toUInt(bool *ok=0) const
Returns the variant as an unsigned int if the variant has type() UInt , Bool , ByteArray ...
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...
static QByteArray methodName(const char *signature, int nameLength)
Makes a deep copy of the first nameLength characters of the given method signature and returns the co...
QDBusInterfacePrivate(const QString &serv, const QString &p, const QString &iface, const QDBusConnection &con)
double toDouble(bool *ok=0) const
Returns the variant as a double if the variant has type() Double , QMetaType::Float ...
int metacall(QMetaObject::Call c, int id, void **argv)
The QDBusMessage class represents one message sent or received over the D-Bus bus.
MessageType type() const
Returns the message type.
virtual void * qt_metacast(const char *)
Override QObject::qt_metacast to catch the interface name too.
bool isConnected() const
Returns true if this QDBusConnection object is connected.
T value() const
Returns the stored value converted to the template type T.
virtual int qt_metacall(QMetaObject::Call, int, void **)
Dispatch the call through the private.
QDBusInterface(QDBusInterfacePrivate *p)
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
QDBusConnectionPrivate * connectionPrivate() const