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

KIO

kfilemetainfo.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002 
00003    Copyright (c) 2001,2002 Carsten Pfeiffer <pfeiffer@kde.org>
00004                  2007 Jos van den Oever <jos@vandenoever.info>
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 (LGPL) as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.
00020 */
00021 #ifndef KFILEMETAINFO_H
00022 #define KFILEMETAINFO_H
00023 
00024 #include "predicateproperties.h"
00025 #include "kfilemetainfoitem.h"
00026 #include <QtCore/QList>
00027 #include <QtCore/QStringList>
00028 class KUrl;
00029 
00030 typedef QList<KFileMetaInfoItem> KFileMetaInfoItemList;
00031 
00032 class KFileMetaInfoGroupPrivate;
00033 class KIO_EXPORT KFileMetaInfoGroup {
00034 public:
00035     KFileMetaInfoGroup();
00036     KFileMetaInfoGroup(const KFileMetaInfoGroup&);
00037     ~KFileMetaInfoGroup();
00038     const KFileMetaInfoGroup& operator=(const KFileMetaInfoGroup&);
00039     KFileMetaInfoItemList items() const;
00040     const QString& name() const;
00041     const QStringList& keys() const;
00042 private:
00043     QSharedDataPointer<KFileMetaInfoGroupPrivate> p;
00044 };
00045 
00046 typedef QList<KFileMetaInfoGroup> KFileMetaInfoGroupList;
00047 
00048 class KFileMetaInfoPrivate;
00056 class KIO_EXPORT KFileMetaInfo {
00057 public:
00064     enum What
00065     {
00066       Fastest       = 0x1,  
00069 // Deprecated
00070 //      DontCare      = 0x2,  ///< let the plugin decide what to read.
00071 
00072       TechnicalInfo = 0x4,  
00075       ContentInfo   = 0x8,  
00077       ExternalSources = 0x10, 
00081       Thumbnail     = 0x20, 
00083 // Deprecated
00084 //      Preferred     = 0x40,  ///< get at least the preferred items
00085       LinkedData    = 0x80, //< extract linked/related files like html links, source #include etc
00086       Everything    = 0xffff 
00087 
00088     };
00089     Q_DECLARE_FLAGS(WhatFlags, What)
00090 
00091     
00095     explicit KFileMetaInfo(const QString& path, const QString& mimetype = QString(),
00096         WhatFlags w = Everything);
00101     KFileMetaInfo(const KUrl& url);
00105     KFileMetaInfo();
00109     KFileMetaInfo(const KFileMetaInfo&);
00113     ~KFileMetaInfo();
00117     const KFileMetaInfo& operator=(KFileMetaInfo const& kfmi);
00121     bool applyChanges();
00125     const QHash<QString, KFileMetaInfoItem>& items() const;
00126     KFileMetaInfoItem& item(const QString& key);
00127     const KFileMetaInfoItem& item(const QString& key) const;
00128     bool isValid() const;
00132     QStringList preferredKeys() const;
00136     QStringList supportedKeys() const;
00137     KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfo& )
00138 ;
00139     KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfo&);
00143     KDE_DEPRECATED KFileMetaInfoGroupList preferredGroups() const;
00147     KDE_DEPRECATED KFileMetaInfoGroupList supportedGroups() const;
00148     KFileMetaInfoGroupList groups() const;
00149     QStringList keys() const;
00150     const KUrl& url() const;
00151 
00152 private:
00153     QSharedDataPointer<KFileMetaInfoPrivate> p;
00154 };
00155 
00156 Q_DECLARE_OPERATORS_FOR_FLAGS(KFileMetaInfo::WhatFlags)
00157 
00158 
00159 #endif

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
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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