29 #include <tqstringlist.h>
39 TQValueList<TQT_DBusData>
list;
48 d->
type = simpleItemType;
77 if (other.isEmpty())
return;
79 TQValueList<TQT_DBusData>::const_iterator it = other.begin();
80 TQValueList<TQT_DBusData>::const_iterator endIt = other.end();
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;
121 TQValueList<bool>::const_iterator it = other.begin();
122 TQValueList<bool>::const_iterator endIt = other.end();
123 for (; it != endIt; ++it)
133 if (other.isEmpty())
return;
135 TQValueList<TQ_UINT8>::const_iterator it = other.begin();
136 TQValueList<TQ_UINT8>::const_iterator endIt = other.end();
137 for (; it != endIt; ++it)
147 if (other.isEmpty())
return;
149 TQValueList<TQ_INT16>::const_iterator it = other.begin();
150 TQValueList<TQ_INT16>::const_iterator endIt = other.end();
151 for (; it != endIt; ++it)
161 if (other.isEmpty())
return;
163 TQValueList<TQ_UINT16>::const_iterator it = other.begin();
164 TQValueList<TQ_UINT16>::const_iterator endIt = other.end();
165 for (; it != endIt; ++it)
175 if (other.isEmpty())
return;
177 TQValueList<TQ_INT32>::const_iterator it = other.begin();
178 TQValueList<TQ_INT32>::const_iterator endIt = other.end();
179 for (; it != endIt; ++it)
189 if (other.isEmpty())
return;
191 TQValueList<TQ_UINT32>::const_iterator it = other.begin();
192 TQValueList<TQ_UINT32>::const_iterator endIt = other.end();
193 for (; it != endIt; ++it)
203 if (other.isEmpty())
return;
205 TQValueList<TQ_INT64>::const_iterator it = other.begin();
206 TQValueList<TQ_INT64>::const_iterator endIt = other.end();
207 for (; it != endIt; ++it)
217 if (other.isEmpty())
return;
219 TQValueList<TQ_UINT64>::const_iterator it = other.begin();
220 TQValueList<TQ_UINT64>::const_iterator endIt = other.end();
221 for (; it != endIt; ++it)
231 if (other.isEmpty())
return;
233 TQValueList<double>::const_iterator it = other.begin();
234 TQValueList<double>::const_iterator endIt = other.end();
235 for (; it != endIt; ++it)
246 if (other.isEmpty())
return;
248 TQValueList<TQT_DBusVariant>::const_iterator it = other.begin();
249 TQValueList<TQT_DBusVariant>::const_iterator endIt = other.end();
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;
277 TQValueList<TQT_DBusObjectPath>::const_iterator it = other.begin();
278 TQValueList<TQT_DBusObjectPath>::const_iterator endIt = other.end();
279 for (; it != endIt; ++it)
290 if (other.isEmpty())
return;
292 TQValueList<TQT_DBusUnixFd>::const_iterator it = other.begin();
293 TQValueList<TQT_DBusUnixFd>::const_iterator endIt = other.end();
294 for (; it != endIt; ++it)
307 if (&other ==
this)
return *
this;
322 if (other.isEmpty())
return *
this;
324 TQValueList<TQT_DBusData>::const_iterator it = other.begin();
325 TQValueList<TQT_DBusData>::const_iterator endIt = other.end();
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();
507 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
508 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
509 for (; it != endIt; ++it)
511 result << (*it).toString();
514 if (ok != 0) *ok =
true;
523 if (ok != 0) *ok =
false;
524 return TQValueList<bool>();
527 TQValueList<bool> result;
529 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
530 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
531 for (; it != endIt; ++it)
533 result << (*it).toBool();
536 if (ok != 0) *ok =
true;
545 if (ok != 0) *ok =
false;
546 return TQValueList<TQ_UINT8>();
549 TQValueList<TQ_UINT8> result;
551 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
552 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
553 for (; it != endIt; ++it)
555 result << (*it).toByte();
558 if (ok != 0) *ok =
true;
567 if (ok != 0) *ok =
false;
568 return TQValueList<TQ_INT16>();
571 TQValueList<TQ_INT16> result;
573 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
574 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
575 for (; it != endIt; ++it)
577 result << (*it).toInt16();
580 if (ok != 0) *ok =
true;
589 if (ok != 0) *ok =
false;
590 return TQValueList<TQ_UINT16>();
593 TQValueList<TQ_UINT16> result;
595 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
596 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
597 for (; it != endIt; ++it)
599 result << (*it).toUInt16();
602 if (ok != 0) *ok =
true;
611 if (ok != 0) *ok =
false;
612 return TQValueList<TQ_INT32>();
615 TQValueList<TQ_INT32> result;
617 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
618 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
619 for (; it != endIt; ++it)
621 result << (*it).toInt32();
624 if (ok != 0) *ok =
true;
633 if (ok != 0) *ok =
false;
634 return TQValueList<TQ_UINT32>();
637 TQValueList<TQ_UINT32> result;
639 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
640 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
641 for (; it != endIt; ++it)
643 result << (*it).toUInt32();
646 if (ok != 0) *ok =
true;
655 if (ok != 0) *ok =
false;
656 return TQValueList<TQ_INT64>();
659 TQValueList<TQ_INT64> result;
661 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
662 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
663 for (; it != endIt; ++it)
665 result << (*it).toInt64();
668 if (ok != 0) *ok =
true;
677 if (ok != 0) *ok =
false;
678 return TQValueList<TQ_UINT64>();
681 TQValueList<TQ_UINT64> result;
683 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
684 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
685 for (; it != endIt; ++it)
687 result << (*it).toUInt64();
690 if (ok != 0) *ok =
true;
699 if (ok != 0) *ok =
false;
700 return TQValueList<double>();
703 TQValueList<double> result;
705 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
706 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
707 for (; it != endIt; ++it)
709 result << (*it).toDouble();
712 if (ok != 0) *ok =
true;
726 if (ok != 0) *ok =
false;
727 return TQValueList<TQT_DBusObjectPath>();
730 TQValueList<TQT_DBusObjectPath> result;
732 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
733 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
734 for (; it != endIt; ++it)
736 result << (*it).toObjectPath();
739 if (ok != 0) *ok =
true;
748 if (ok != 0) *ok =
false;
749 return TQValueList<TQT_DBusUnixFd>();
752 TQValueList<TQT_DBusUnixFd> result;
754 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
755 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
756 for (; it != endIt; ++it)
758 result << (*it).toUnixFd();
761 if (ok != 0) *ok =
true;
770 if (ok != 0) *ok =
false;
771 return TQValueList<TQT_DBusVariant>();
774 TQValueList<TQT_DBusVariant> result;
776 TQValueList<TQT_DBusData>::const_iterator it =
d->
list.begin();
777 TQValueList<TQT_DBusData>::const_iterator endIt =
d->
list.end();
778 for (; it != endIt; ++it)
780 result << (*it).toVariant();
783 if (ok != 0) *ok =
true;