KIO
udsentry.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef UDSENTRY_H
00023 #define UDSENTRY_H
00024
00025 #include <QtCore/QString>
00026 #include <QtCore/QList>
00027 #include <QtCore/QSharedData>
00028
00029 #include <kio/kio_export.h>
00030
00031 namespace KIO
00032 {
00033 class UDSEntryPrivate;
00058 class KIO_EXPORT UDSEntry
00059 {
00060 public:
00061
00062 UDSEntry();
00063 UDSEntry(const UDSEntry &other);
00064 ~UDSEntry();
00065 UDSEntry &operator=(const UDSEntry &other);
00066
00070 QString stringValue( uint field ) const;
00071
00075 long long numberValue( uint field, long long defaultValue = 0 ) const;
00076
00077
00078
00079
00080
00082 bool isDir() const;
00084 bool isLink() const;
00085
00091 void insert(uint field, const QString& value);
00092
00098 void insert(uint field, long long l);
00099
00104 int count() const;
00105
00110 bool contains(uint field) const;
00111
00116 bool remove(uint field);
00117
00121 QList<uint> listFields() const;
00122
00126 void clear();
00127
00131 enum StandardFieldTypes {
00132
00133
00135 UDS_STRING = 0x01000000,
00137 UDS_NUMBER = 0x02000000,
00139 UDS_TIME = 0x04000000 | UDS_NUMBER,
00140
00141
00142
00144 UDS_SIZE = 1 | UDS_NUMBER,
00146 UDS_SIZE_LARGE = 2 | UDS_NUMBER,
00148 UDS_USER = 3 | UDS_STRING,
00151 UDS_ICON_NAME = 4 | UDS_STRING,
00153 UDS_GROUP = 5 | UDS_STRING,
00163 UDS_NAME = 6 | UDS_STRING,
00166 UDS_LOCAL_PATH = 7 | UDS_STRING,
00169 UDS_HIDDEN = 8 | UDS_NUMBER,
00171 UDS_ACCESS = 9 | UDS_NUMBER,
00173 UDS_MODIFICATION_TIME = 10 | UDS_TIME,
00175 UDS_ACCESS_TIME = 11 | UDS_TIME,
00177 UDS_CREATION_TIME = 12 | UDS_TIME,
00181 UDS_FILE_TYPE = 13 | UDS_NUMBER,
00184 UDS_LINK_DEST = 14 | UDS_STRING,
00190 UDS_URL = 15 | UDS_STRING,
00192 UDS_MIME_TYPE = 16 | UDS_STRING,
00196 UDS_GUESSED_MIME_TYPE = 17 | UDS_STRING,
00198 UDS_XML_PROPERTIES = 18 | UDS_STRING,
00199
00201 UDS_EXTENDED_ACL = 19 | UDS_NUMBER,
00203 UDS_ACL_STRING = 20 | UDS_STRING,
00206 UDS_DEFAULT_ACL_STRING = 21 | UDS_STRING,
00207
00211 UDS_DISPLAY_NAME = 22 | UDS_STRING,
00215 UDS_TARGET_URL = 23 | UDS_STRING,
00216
00220 UDS_EXTRA = 100 | UDS_STRING,
00224 UDS_EXTRA_END = 140 | UDS_STRING
00225 };
00226
00227 private:
00228 friend class UDSEntryPrivate;
00229 QSharedDataPointer<UDSEntryPrivate> d;
00230 };
00231
00248 typedef QList<UDSEntry> UDSEntryList;
00249 }
00250
00251 KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KIO::UDSEntry & a );
00252 KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KIO::UDSEntry & a );
00253
00254 #endif