• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

udsentry.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2000-2005 David Faure <faure@kde.org>
00003    Copyright (C) 2007 Norbert Frese <nf2@scheinwelt.at>
00004    Copyright (C) 2007 Thiago Macieira <thiago@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
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         // Convenience methods.
00078         // Let's not add one method per field, only methods that have some more logic
00079         // than just calling stringValue(field) or numberValue(field).
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             // First let's define the item types: bit field
00133 
00135             UDS_STRING = 0x01000000,
00137             UDS_NUMBER   = 0x02000000,
00139             UDS_TIME   = 0x04000000 | UDS_NUMBER,
00140 
00141             // The rest isn't a bit field
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 } // end namespace
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 /*UDSENTRY_H*/

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal