|
DBus-1-TQt
1.0
|
00001 /* qdbusdatalist.h list of DBUS data transport type 00002 * 00003 * Copyright (C) 2007 Kevin Krammer <kevin.krammer@gmx.at> 00004 * 00005 * Licensed under the Academic Free License version 2.1 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00020 * USA. 00021 * 00022 */ 00023 00024 #ifndef TQDBUSDATALIST_H 00025 #define TQDBUSDATALIST_H 00026 00027 #include "tqdbusdata.h" 00028 00029 template <typename T> class TQValueList; 00030 class TQT_DBusObjectPath; 00031 class TQT_DBusVariant; 00032 class TQT_DBusUnixFd; 00033 class TQString; 00034 class TQStringList; 00035 00071 class TQDBUS_EXPORT TQT_DBusDataList 00072 { 00073 public: 00079 TQT_DBusDataList(); 00080 00092 explicit TQT_DBusDataList(TQT_DBusData::Type simpleItemType); 00093 00104 explicit TQT_DBusDataList(const TQT_DBusData& containerItemType); 00105 00114 TQT_DBusDataList(const TQT_DBusDataList& other); 00115 00132 TQT_DBusDataList(const TQValueList<TQT_DBusData>& other); 00133 00146 TQT_DBusDataList(const TQValueList<bool>& other); 00147 00160 TQT_DBusDataList(const TQValueList<TQ_UINT8>& other); 00161 00174 TQT_DBusDataList(const TQValueList<TQ_INT16>& other); 00175 00188 TQT_DBusDataList(const TQValueList<TQ_UINT16>& other); 00189 00202 TQT_DBusDataList(const TQValueList<TQ_INT32>& other); 00203 00216 TQT_DBusDataList(const TQValueList<TQ_UINT32>& other); 00217 00230 TQT_DBusDataList(const TQValueList<TQ_INT64>& other); 00231 00244 TQT_DBusDataList(const TQValueList<TQ_UINT64>& other); 00245 00258 TQT_DBusDataList(const TQValueList<double>& other); 00259 00272 TQT_DBusDataList(const TQValueList<TQT_DBusVariant>& other); 00273 00286 TQT_DBusDataList(const TQStringList& other); 00287 00300 TQT_DBusDataList(const TQValueList<TQT_DBusObjectPath>& other); 00301 00314 TQT_DBusDataList(const TQValueList<TQT_DBusUnixFd>& other); 00315 00319 ~TQT_DBusDataList(); 00320 00331 TQT_DBusDataList& operator=(const TQT_DBusDataList& other); 00332 00347 TQT_DBusDataList& operator=(const TQValueList<TQT_DBusData>& other); 00348 00363 TQT_DBusDataList& operator=(const TQStringList& other); 00364 00373 TQT_DBusData::Type type() const; 00374 00388 bool hasContainerItemType() const; 00389 00405 TQT_DBusData containerItemType() const; 00406 00414 inline bool isValid() const { return type() != TQT_DBusData::Invalid; } 00415 00423 bool isEmpty() const; 00424 00432 uint count() const; 00433 00447 bool operator==(const TQT_DBusDataList& other) const; 00448 00462 bool operator!=(const TQT_DBusDataList& other) const; 00463 00469 void clear(); 00470 00488 TQT_DBusDataList& operator<<(const TQT_DBusData& data); 00489 00495 TQValueList<TQT_DBusData> toTQValueList() const; 00496 00514 TQStringList toTQStringList(bool* ok = 0) const; 00515 00532 TQValueList<bool> toBoolList(bool* ok = 0) const; 00533 00550 TQValueList<TQ_UINT8> toByteList(bool* ok = 0) const; 00551 00569 TQValueList<TQ_INT16> toInt16List(bool* ok = 0) const; 00570 00588 TQValueList<TQ_UINT16> toUInt16List(bool* ok = 0) const; 00589 00607 TQValueList<TQ_INT32> toInt32List(bool* ok = 0) const; 00608 00626 TQValueList<TQ_UINT32> toUInt32List(bool* ok = 0) const; 00627 00645 TQValueList<TQ_INT64> toInt64List(bool* ok = 0) const; 00646 00664 TQValueList<TQ_UINT64> toUInt64List(bool* ok = 0) const; 00665 00682 TQValueList<double> toDoubleList(bool* ok = 0) const; 00683 00700 TQValueList<TQString> toStringList(bool* ok = 0) const; 00701 00715 TQValueList<TQT_DBusObjectPath> toObjectPathList(bool* ok = 0) const; 00716 00733 TQValueList<TQT_DBusVariant> toVariantList(bool* ok = 0) const; 00734 00751 TQValueList<TQT_DBusUnixFd> toUnixFdList(bool* ok = 0) const; 00752 00753 private: 00754 class Private; 00755 Private* d; 00756 }; 00757 00758 #endif