42 #ifndef QDBUSARGUMENT_H 43 #define QDBUSARGUMENT_H 45 #include <QtCore/qbytearray.h> 46 #include <QtCore/qhash.h> 47 #include <QtCore/qglobal.h> 48 #include <QtCore/qlist.h> 49 #include <QtCore/qmap.h> 50 #include <QtCore/qstring.h> 51 #include <QtCore/qstringlist.h> 52 #include <QtCore/qvariant.h> 53 #include <QtDBus/qdbusextratypes.h> 54 #include <QtDBus/qdbusmacros.h> 105 void beginStructure();
107 void beginArray(
int elementMetaTypeId);
109 void beginMap(
int keyMetaTypeId,
int valueMetaTypeId);
111 void beginMapEntry();
114 void appendVariant(
const QVariant &v);
117 QString currentSignature()
const;
137 void beginStructure()
const;
138 void endStructure()
const;
139 void beginArray()
const;
140 void endArray()
const;
141 void beginMap()
const;
143 void beginMapEntry()
const;
144 void endMapEntry()
const;
172 int id = v.userType();
173 if (
id == qMetaTypeId<QDBusArgument>())
194 #ifndef QDBUS_NO_SPECIALTYPES 230 template<
template <
typename>
class Container,
typename T>
231 inline QDBusArgument &operator<<(QDBusArgument &arg, const Container<T> &list)
233 int id = qMetaTypeId<T>();
235 typename Container<T>::const_iterator
it = list.begin();
236 typename Container<T>::const_iterator
end = list.end();
237 for ( ; it !=
end; ++
it)
243 template<
template <
typename>
class Container,
typename T>
248 while (!arg.
atEnd()) {
251 list.push_back(item);
262 int id = qMetaTypeId<T>();
266 for ( ; it !=
end; ++
it)
277 while (!arg.
atEnd()) {
289 int id = qMetaTypeId<QDBusVariant>();
293 for ( ; it !=
end; ++
it)
300 template<
typename Key,
typename T>
303 int kid = qMetaTypeId<Key>();
304 int vid = qMetaTypeId<T>();
305 arg.beginMap(kid, vid);
308 for ( ; it !=
end; ++
it) {
317 template<
typename Key,
typename T>
322 while (!arg.
atEnd()) {
339 for ( ; it !=
end; ++
it) {
349 template<
typename Key,
typename T>
352 int kid = qMetaTypeId<Key>();
353 int vid = qMetaTypeId<T>();
354 arg.beginMap(kid, vid);
357 for ( ; it !=
end; ++
it) {
366 template<
typename Key,
typename T>
371 while (!arg.
atEnd()) {
388 for ( ; it !=
end; ++
it) {
The QVariant class acts like a union for the most common Qt data types.
void beginMapEntry()
Opens a D-Bus map entry suitable for appending the key and value entries.
Q_DBUS_EXPORT QDBusArgument & operator<<(QDBusArgument &a, const QDate &date)
The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
void push_back(const T &t)
This function is provided for STL compatibility.
void endArray()
Closes a D-Bus array opened with beginArray().
#define QT_END_NAMESPACE
This macro expands to.
void clear()
Removes all items from the hash.
The QLine class provides a two-dimensional vector using integer precision.
T qdbus_cast(const QDBusArgument &arg)
#define it(className, varName)
The QDBusArgument class is used to marshall and demarshall D-Bus arguments.
void beginArray(int elementMetaTypeId)
Opens a new D-Bus array suitable for appending elements of meta-type id.
The QByteArray class provides an array of bytes.
The QPointF class defines a point in the plane using floating point precision.
const_iterator ConstIterator
Qt-style synonym for QHash::const_iterator.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
The QDBusSignature class enables the programmer to identify the SIGNATURE type provided by the D-Bus ...
The QList::const_iterator class provides an STL-style const iterator for QList and QQueue...
The QDate class provides date functions.
const Key & key() const
Returns the current item's key.
long ASN1_INTEGER_get ASN1_INTEGER * a
void beginMap(int keyMetaTypeId, int valueMetaTypeId)
Opens a new D-Bus map suitable for appending elements.
The QString class provides a Unicode character string.
The QHash class is a template class that provides a hash-table-based dictionary.
The QSizeF class defines the size of a two-dimensional object using floating point precision...
Q_DBUS_EXPORT const QDBusArgument & operator>>(const QDBusArgument &a, QVariant &v)
The QLineF class provides a two-dimensional vector using floating point precision.
The QDBusUnixFileDescriptor class holds one Unix file descriptor.
const Key & key() const
Returns the current item's key.
iterator insertMulti(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
The QTime class provides clock time functions.
QFuture< void > map(Sequence &sequence, MapFunction function)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
const_iterator ConstIterator
Qt-style synonym for QMap::const_iterator.
bool atEnd() const
Returns true if there are no more elements to be extracted from this QDBusArgument.
The QStringList class provides a list of strings.
const T & value() const
Returns the current item's value.
void clear()
Removes all items from the list.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the map.
ElementType
This enum describes the type of element held by the argument.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
The QMap::const_iterator class provides an STL-style const iterator for QMap and QMultiMap.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the map...
void endMapEntry()
Closes a D-Bus map entry opened with beginMapEntry().
void endMap()
Closes a D-Bus map opened with beginMap().
The QDateTime class provides date and time functions.
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
The QPoint class defines a point in the plane using integer precision.
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...
QVariant variant() const
Returns this D-Bus variant as a QVariant object.
The QRect class defines a rectangle in the plane using integer precision.
const T & value() const
Returns the current item's value.
T qvariant_cast(const QVariant &)
The QSize class defines the size of a two-dimensional object using integer point precision.
iterator insertMulti(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
static const KeyPair *const end
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...
void clear()
Removes all items from the map.
The QMap class is a template class that provides a skip-list-based dictionary.
The QList class is a template class that provides lists.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...