KIO
kloadfilemetadatathread_p.h
Go to the documentation of this file.
00001 /***************************************************************************** 00002 * Copyright (C) 2009-2010 by Peter Penz <peter.penz@gmx.at> * 00003 * * 00004 * This library is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU Library General Public * 00006 * License as published by the Free Software Foundation; either * 00007 * version 2 of the License, or (at your option) any later version. * 00008 * * 00009 * This library is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00012 * Library General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU Library General Public License * 00015 * along with this library; see the file COPYING.LIB. If not, write to * 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00017 * Boston, MA 02110-1301, USA. * 00018 *****************************************************************************/ 00019 00020 #ifndef KLOADFILEMETADATATHREAD_H 00021 #define KLOADFILEMETADATATHREAD_H 00022 00023 #define DISABLE_NEPOMUK_LEGACY 00024 #include <property.h> 00025 #include <tag.h> 00026 #include <variant.h> 00027 00028 #include <kurl.h> 00029 #include <QList> 00030 #include <QMutex> 00031 #include <QThread> 00032 00039 class KLoadFileMetaDataThread : public QThread 00040 { 00041 Q_OBJECT 00042 00043 public: 00044 KLoadFileMetaDataThread(); 00045 virtual ~KLoadFileMetaDataThread(); 00046 00053 void load(const KUrl::List& urls); 00054 00061 QHash<KUrl, Nepomuk::Variant> data() const; 00062 00069 void cancel(); 00070 00072 virtual void run(); 00073 00074 Q_SIGNALS: 00081 void finished(QThread* thread); 00082 00083 private slots: 00087 void slotLoadingFinished(); 00088 00089 private: 00090 mutable QMutex m_mutex; 00091 QHash<KUrl, Nepomuk::Variant> m_data; 00092 KUrl::List m_urls; 00093 00094 volatile bool m_canceled; 00095 }; 00096 #endif
KDE 4.6 API Reference