29#include <tqstringlist.h>
48 d->
type = simpleItemType;
77 if (other.isEmpty())
return;
82 d->
type = (*it).type();
84 TQCString elementSignature;
91 for (++it; it != endIt; ++it)
93 if (
d->
type != (*it).type())
102 if ((*it).buildDBusSignature() != elementSignature)
119 if (other.isEmpty())
return;
123 for (; it != endIt; ++it)
133 if (other.isEmpty())
return;
137 for (; it != endIt; ++it)
147 if (other.isEmpty())
return;
151 for (; it != endIt; ++it)
161 if (other.isEmpty())
return;
165 for (; it != endIt; ++it)
175 if (other.isEmpty())
return;
179 for (; it != endIt; ++it)
189 if (other.isEmpty())
return;
193 for (; it != endIt; ++it)
203 if (other.isEmpty())
return;
207 for (; it != endIt; ++it)
217 if (other.isEmpty())
return;
221 for (; it != endIt; ++it)
231 if (other.isEmpty())
return;
235 for (; it != endIt; ++it)
246 if (other.isEmpty())
return;
250 for (; it != endIt; ++it)
260 if (other.isEmpty())
return;
262 TQStringList::const_iterator it = other.begin();
263 TQStringList::const_iterator endIt = other.end();
264 for (; it != endIt; ++it)
275 if (other.isEmpty())
return;
279 for (; it != endIt; ++it)
290 if (other.isEmpty())
return;
294 for (; it != endIt; ++it)
307 if (&other ==
this)
return *
this;
322 if (other.isEmpty())
return *
this;
327 d->
type = (*it).type();
329 TQCString elementSignature;
337 for (++it; it != endIt; ++it)
339 if (
d->
type != (*it).type())
348 if ((*it).buildDBusSignature() != elementSignature)
369 TQStringList::const_iterator it = other.begin();
370 TQStringList::const_iterator endIt = other.end();
371 for (; it != endIt; ++it)
397 return d->
list.isEmpty();
402 return d->
list.count();
407 if (&other ==
this)
return true;
408 if (
d == other.
d)
return true;
410 bool containerEqual =
true;
419 containerEqual =
false;
422 containerEqual =
false;
429 if (&other ==
this)
return false;
430 if (
d == other.
d)
return false;
432 bool containerEqual =
true;
441 containerEqual =
false;
444 containerEqual =
false;
469 tqWarning(
"TQT_DBusDataList: trying to add data of type %s to list of type %s",
477 if (ourSignature != dataSignature)
479 tqWarning(
"TQT_DBusDataList: trying to add data with signature %s "
480 "to list with item signature %s",
481 dataSignature.data(), ourSignature.data());
501 if (ok != 0) *ok =
false;
502 return TQStringList();
509 for (; it != endIt; ++it)
511 result << (*it).toString();
514 if (ok != 0) *ok =
true;
523 if (ok != 0) *ok =
false;
531 for (; it != endIt; ++it)
533 result << (*it).toBool();
536 if (ok != 0) *ok =
true;
545 if (ok != 0) *ok =
false;
553 for (; it != endIt; ++it)
555 result << (*it).toByte();
558 if (ok != 0) *ok =
true;
567 if (ok != 0) *ok =
false;
575 for (; it != endIt; ++it)
577 result << (*it).toInt16();
580 if (ok != 0) *ok =
true;
589 if (ok != 0) *ok =
false;
597 for (; it != endIt; ++it)
599 result << (*it).toUInt16();
602 if (ok != 0) *ok =
true;
611 if (ok != 0) *ok =
false;
619 for (; it != endIt; ++it)
621 result << (*it).toInt32();
624 if (ok != 0) *ok =
true;
633 if (ok != 0) *ok =
false;
641 for (; it != endIt; ++it)
643 result << (*it).toUInt32();
646 if (ok != 0) *ok =
true;
655 if (ok != 0) *ok =
false;
663 for (; it != endIt; ++it)
665 result << (*it).toInt64();
668 if (ok != 0) *ok =
true;
677 if (ok != 0) *ok =
false;
685 for (; it != endIt; ++it)
687 result << (*it).toUInt64();
690 if (ok != 0) *ok =
true;
699 if (ok != 0) *ok =
false;
707 for (; it != endIt; ++it)
709 result << (*it).toDouble();
712 if (ok != 0) *ok =
true;
726 if (ok != 0) *ok =
false;
734 for (; it != endIt; ++it)
736 result << (*it).toObjectPath();
739 if (ok != 0) *ok =
true;
748 if (ok != 0) *ok =
false;
756 for (; it != endIt; ++it)
758 result << (*it).toUnixFd();
761 if (ok != 0) *ok =
true;
770 if (ok != 0) *ok =
false;
778 for (; it != endIt; ++it)
780 result << (*it).toVariant();
783 if (ok != 0) *ok =
true;
Class for accurately representing D-Bus data types.
Type type() const
Returns the Type of the data object.
static TQT_DBusData fromBool(bool value)
Creates a data object for the given boolean value.
static TQT_DBusData fromUInt64(TQ_UINT64 value)
Creates a data object for the given unsigned 64-bit integer value.
static TQT_DBusData fromInt16(TQ_INT16 value)
Creates a data object for the given signed 16-bit integer value.
static TQT_DBusData fromByte(TQ_UINT8 value)
Creates a data object for the given byte (unsigned char) value.
const char * typeName() const
Returns the string representation of the object's Type.
static TQT_DBusData fromUInt32(TQ_UINT32 value)
Creates a data object for the given unsigned 32-bit integer value.
static TQT_DBusData fromDouble(double value)
Creates a data object for the given double value.
TQCString buildDBusSignature() const
Creates the data objects D-Bus signature.
static TQT_DBusData fromObjectPath(const TQT_DBusObjectPath &value)
Creates a data object for the given object path value.
static TQT_DBusData fromUnixFd(const TQT_DBusUnixFd &value)
Creates a data object for the given unix file handle value.
static TQT_DBusData fromInt32(TQ_INT32 value)
Creates a data object for the given signed 32-bit integer value.
Type
Enum for the data types used in D-Bus messages.
static TQT_DBusData fromString(const TQString &value)
Creates a data object for the given string value.
static TQT_DBusData fromInt64(TQ_INT64 value)
Creates a data object for the given signed 64-bit integer value.
static TQT_DBusData fromVariant(const TQT_DBusVariant &value)
Creates a data object for the given variant value.
static TQT_DBusData fromUInt16(TQ_UINT16 value)
Creates a data object for the given unsigned 16-bit integer value.
TQValueList< TQT_DBusData > list
TQT_DBusData containerItem
Class to transport lists of D-Bus data types.
void clear()
Clears the list.
TQT_DBusDataList()
Creates an empty and invalid list.
TQValueList< TQT_DBusData > toTQValueList() const
Converts the list object into a TQValueList with TQT_DBusData elements.
TQValueList< TQ_UINT64 > toUInt64List(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_UINT64.
TQValueList< TQT_DBusObjectPath > toObjectPathList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of object paths.
TQT_DBusDataList & operator=(const TQT_DBusDataList &other)
Copies from the given other list.
TQT_DBusData containerItemType() const
Returns a container prototype for the list's element type.
TQValueList< TQ_INT64 > toInt64List(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_INT64.
TQValueList< double > toDoubleList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of double.
bool hasContainerItemType() const
Checks whether the element type is a data container itself.
TQValueList< TQT_DBusVariant > toVariantList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQT_DBusVariant.
TQStringList toTQStringList(bool *ok=0) const
Tries to get the list object's elements as a TQStringList.
TQValueList< TQ_UINT8 > toByteList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_UINT8.
bool operator!=(const TQT_DBusDataList &other) const
Checks whether the given other list is different from this one.
TQValueList< TQ_UINT32 > toUInt32List(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_UINT32.
TQT_DBusData::Type type() const
Returns the element type of the list object.
~TQT_DBusDataList()
Destroys the list object.
bool operator==(const TQT_DBusDataList &other) const
Checks whether the given other list is equal to this one.
bool isEmpty() const
Checks whether this list object has any elements.
TQValueList< TQT_DBusUnixFd > toUnixFdList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQT_DBusUnixFd.
TQValueList< TQString > toStringList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQString.
uint count() const
Returns the number of elements of this list object.
TQValueList< TQ_UINT16 > toUInt16List(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_UINT16.
TQValueList< bool > toBoolList(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of bool.
TQValueList< TQ_INT32 > toInt32List(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_INT32.
TQT_DBusDataList & operator<<(const TQT_DBusData &data)
Appends a given value to the list.
TQValueList< TQ_INT16 > toInt16List(bool *ok=0) const
Tries to get the list object's elements as a TQValueList of TQ_INT16.