metainfojob.h
00001 // -*- c++ -*- 00002 // vim: ts=4 sw=4 et 00003 /* This file is part of the KDE libraries 00004 Copyright (C) 2001 Rolf Magnus <ramagnus@kde.org> 00005 parts of this taken from previewjob.h 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation version 2.0. 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 00022 #ifndef __tdeio_metainfojob_h__ 00023 #define __tdeio_metainfojob_h__ 00024 00025 #include <tdeio/job.h> 00026 #include <tdefileitem.h> 00027 00028 namespace TDEIO { 00035 class TDEIO_EXPORT MetaInfoJob : public TDEIO::Job 00036 { 00037 Q_OBJECT 00038 public: 00044 MetaInfoJob(const KFileItemList &items, bool deleteItems = false); 00045 virtual ~MetaInfoJob(); 00046 00052 void removeItem( const KFileItem *item ); 00053 00060 static TQStringList availablePlugins(); 00061 00067 static TQStringList supportedMimeTypes(); 00068 00069 signals: 00075 void gotMetaInfo( const KFileItem *item ); 00082 void failed( const KFileItem *item ); 00083 00084 protected: 00085 void getMetaInfo(); 00086 00087 protected slots: 00088 virtual void slotResult( TDEIO::Job *job ); 00089 00090 private slots: 00091 void start(); 00092 void slotMetaInfo(TDEIO::Job *, const TQByteArray &); 00093 00094 private: 00095 void determineNextFile(); 00096 // void saveMetaInfo(const TQByteArray info); 00097 00098 private: 00099 struct MetaInfoJobPrivate *d; 00100 }; 00101 00108 TDEIO_EXPORT MetaInfoJob* fileMetaInfo(const KFileItemList& items); 00109 00116 TDEIO_EXPORT MetaInfoJob* fileMetaInfo(const KURL::List& items); 00117 } 00118 00119 #endif