00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef METADATAMANAGER_H
00022 #define METADATAMANAGER_H
00023
00024 #include <QList>
00025 #include <QStringList>
00026 #include <QPixmap>
00027 #include <QDir>
00028 #include "fileinfo.h"
00029 #include "metadatamodel.h"
00030
00031 class DecoderFactory;
00032 class EngineFactory;
00033 class InputSourceFactory;
00034 class QmmpSettings;
00035
00039 class MetaDataManager
00040 {
00041 public:
00045 MetaDataManager();
00049 ~MetaDataManager();
00056 QList <FileInfo *> createPlayList(const QString &path, bool useMetaData = true) const;
00063 MetaDataModel* createMetaDataModel(const QString &url, QObject *parent = 0) const;
00067 QStringList filters() const;
00071 QStringList nameFilters() const;
00075 QStringList protocols() const;
00079 bool supports(const QString &file) const;
00084 QPixmap getCover(const QString &fileName);
00090 QString getCoverPath(const QString &fileName);
00094 void clearCoverChache();
00098 static MetaDataManager* instance();
00102 static void destroy();
00103
00104 private:
00105 QFileInfoList findCoverFiles(QDir dir, int depth) const;
00106 QList <DecoderFactory *> *m_decoderFactories;
00107 QList <EngineFactory *> *m_engineFactories;
00108 QList <InputSourceFactory *> *m_inputSourceFactories;
00109 QMap <QString, QString> m_cover_cache;
00110 QmmpSettings *m_settings;
00111 static MetaDataManager* m_instance;
00112 };
00113
00114 #endif // METADATAMANAGER_H