Qmmp
|
00001 /*************************************************************************** 00002 * Copyright (C) 2008-2009 by Ilya Kotov * 00003 * forkotov02@hotmail.ru * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00019 ***************************************************************************/ 00020 #ifndef FILEINFO_H 00021 #define FILEINFO_H 00022 00023 #include <QString> 00024 #include <QMap> 00025 #include <QUrl> 00026 00027 #include "qmmp.h" 00028 00032 class FileInfo 00033 { 00034 public: 00038 FileInfo(const QString &path = QString()); 00042 FileInfo(const FileInfo &info); 00046 ~FileInfo(); 00050 void operator=(const FileInfo &info); 00054 bool operator==(const FileInfo &info); 00058 bool operator!=(const FileInfo &info); 00062 qint64 length () const; 00066 const QString metaData (Qmmp::MetaData key) const; 00070 const QMap<Qmmp::MetaData, QString> metaData () const; 00074 bool isEmpty() const; 00078 const QString path() const; 00082 void setLength(qint64 length); 00086 void setMetaData(Qmmp::MetaData key, const QString &value); 00090 void setMetaData(Qmmp::MetaData key, int value); 00094 void setMetaData(const QMap <Qmmp::MetaData, QString> &metaData); 00098 void setPath(const QString &path); 00099 00100 private: 00101 QMap <Qmmp::MetaData, QString> m_metaData; 00102 qint64 m_length; 00103 QString m_path; 00104 QList<QMap<int, int> > map; 00105 }; 00106 00107 #endif