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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • kio
  • kio
udsentry.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000-2005 David Faure <faure@kde.org>
3  Copyright (C) 2007 Norbert Frese <nf2@scheinwelt.at>
4  Copyright (C) 2007 Thiago Macieira <thiago@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 
22 #ifndef UDSENTRY_H
23 #define UDSENTRY_H
24 
25 #include <QtCore/QString>
26 #include <QtCore/QList>
27 #include <QtCore/QSharedData>
28 
29 #include <kio/kio_export.h>
30 
31 namespace KIO
32 {
33  class UDSEntryPrivate;
58  class KIO_EXPORT UDSEntry
59  {
60  public:
61 
62  UDSEntry();
63  UDSEntry(const UDSEntry &other);
64  ~UDSEntry();
65  UDSEntry &operator=(const UDSEntry &other);
66 
70  QString stringValue( uint field ) const;
71 
75  long long numberValue( uint field, long long defaultValue = 0 ) const;
76 
77  // Convenience methods.
78  // Let's not add one method per field, only methods that have some more logic
79  // than just calling stringValue(field) or numberValue(field).
80 
82  bool isDir() const;
84  bool isLink() const;
85 
91  void insert(uint field, const QString& value);
92 
98  void insert(uint field, long long l);
99 
104  int count() const;
105 
110  bool contains(uint field) const;
111 
116  bool remove(uint field);
117 
121  QList<uint> listFields() const;
122 
126  void clear();
127 
131  enum StandardFieldTypes {
132  // First let's define the item types: bit field
133 
135  UDS_STRING = 0x01000000,
137  UDS_NUMBER = 0x02000000,
139  UDS_TIME = 0x04000000 | UDS_NUMBER,
140 
141  // The rest isn't a bit field
142 
144  UDS_SIZE = 1 | UDS_NUMBER,
146  UDS_SIZE_LARGE = 2 | UDS_NUMBER,
148  UDS_USER = 3 | UDS_STRING,
151  UDS_ICON_NAME = 4 | UDS_STRING,
153  UDS_GROUP = 5 | UDS_STRING,
163  UDS_NAME = 6 | UDS_STRING,
166  UDS_LOCAL_PATH = 7 | UDS_STRING,
169  UDS_HIDDEN = 8 | UDS_NUMBER,
171  UDS_ACCESS = 9 | UDS_NUMBER,
173  UDS_MODIFICATION_TIME = 10 | UDS_TIME,
175  UDS_ACCESS_TIME = 11 | UDS_TIME,
177  UDS_CREATION_TIME = 12 | UDS_TIME,
181  UDS_FILE_TYPE = 13 | UDS_NUMBER,
184  UDS_LINK_DEST = 14 | UDS_STRING,
190  UDS_URL = 15 | UDS_STRING,
192  UDS_MIME_TYPE = 16 | UDS_STRING,
196  UDS_GUESSED_MIME_TYPE = 17 | UDS_STRING,
198  UDS_XML_PROPERTIES = 18 | UDS_STRING,
199 
201  UDS_EXTENDED_ACL = 19 | UDS_NUMBER,
203  UDS_ACL_STRING = 20 | UDS_STRING,
206  UDS_DEFAULT_ACL_STRING = 21 | UDS_STRING,
207 
211  UDS_DISPLAY_NAME = 22 | UDS_STRING,
215  UDS_TARGET_URL = 23 | UDS_STRING,
216 
220  UDS_DISPLAY_TYPE = 24 | UDS_STRING,
221 
234  UDS_NEPOMUK_URI = 25 | UDS_STRING,
235 
241  UDS_ICON_OVERLAY_NAMES = 26 | UDS_STRING,
242 
248  UDS_NEPOMUK_QUERY = 27 | UDS_STRING,
249 
254  UDS_COMMENT = 28 | UDS_STRING,
255 
258  UDS_DEVICE_ID = 29 | UDS_NUMBER,
261  UDS_INODE = 30 | UDS_NUMBER,
262 
266  UDS_EXTRA = 100 | UDS_STRING,
270  UDS_EXTRA_END = 140 | UDS_STRING
271  };
272 
273  private:
274  friend class UDSEntryPrivate;
275  QSharedDataPointer<UDSEntryPrivate> d;
276  };
277 
294  typedef QList<UDSEntry> UDSEntryList;
295 } // end namespace
296 
297 KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KIO::UDSEntry & a );
298 KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KIO::UDSEntry & a );
299 
300 #endif /*UDSENTRY_H*/
kio_export.h
KIO::UDSEntryList
QList< UDSEntry > UDSEntryList
A directory listing is a list of UDSEntry instances.
Definition: udsentry.h:294
KIO::UDSEntry
Universal Directory Service.
Definition: udsentry.h:58
QDataStream
insert
KGuiItem insert()
clear
KAction * clear(const QObject *recvr, const char *slot, QObject *parent)
QString
QList
operator>>
QDataStream & operator>>(QDataStream &s, KIO::UDSEntry &a)
Definition: udsentry.cpp:139
KIO::UDSEntry::StandardFieldTypes
StandardFieldTypes
Constants used to specify the type of a UDSField.
Definition: udsentry.h:131
operator<<
QDataStream & operator<<(QDataStream &s, const KIO::UDSEntry &a)
Definition: udsentry.cpp:133
QSharedDataPointer< UDSEntryPrivate >
defaultValue
QString defaultValue(const QString &t)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal