• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • 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> d;
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     
00097     explicit KFileMetaInfo(const QString& path, const QString& mimetype = QString(),
00098         WhatFlags w = Everything);
00104     KFileMetaInfo(const KUrl& url);
00108     KFileMetaInfo();
00112     KFileMetaInfo(const KFileMetaInfo&);
00116     ~KFileMetaInfo();
00120     const KFileMetaInfo& operator=(KFileMetaInfo const& kfmi);
00124     bool applyChanges();
00128     const QHash<QString, KFileMetaInfoItem>& items() const;
00129     KFileMetaInfoItem& item(const QString& key);
00130     const KFileMetaInfoItem& item(const QString& key) const;
00131     bool isValid() const;
00135     QStringList preferredKeys() const;
00139     QStringList supportedKeys() const;
00140     KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfo& )
00141 ;
00142     KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfo&);
00146 #ifndef KDE_NO_DEPRECATED
00147     KDE_DEPRECATED KFileMetaInfoGroupList preferredGroups() const;
00148 #endif
00149 
00152 #ifndef KDE_NO_DEPRECATED
00153     KDE_DEPRECATED KFileMetaInfoGroupList supportedGroups() const;
00154 #endif
00155     KFileMetaInfoGroupList groups() const;
00156     QStringList keys() const;
00157     const KUrl& url() const;
00158 
00159 private:
00160     QSharedDataPointer<KFileMetaInfoPrivate> d;
00161 };
00162 
00163 Q_DECLARE_OPERATORS_FOR_FLAGS(KFileMetaInfo::WhatFlags)
00164 
00165 
00166 #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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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