Qmmp
fileinfo.h
1 /***************************************************************************
2  * Copyright (C) 2008-2017 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef FILEINFO_H
21 #define FILEINFO_H
22 
23 #include <QString>
24 #include <QMap>
25 #include <QUrl>
26 
27 #include "qmmp.h"
28 
32 class FileInfo
33 {
34 public:
38  FileInfo(const QString &path = QString());
42  FileInfo(const FileInfo &info);
46  ~FileInfo();
50  FileInfo &operator=(const FileInfo &info);
54  bool operator==(const FileInfo &info);
58  bool operator!=(const FileInfo &info);
62  qint64 length () const;
66  const QString metaData (Qmmp::MetaData key) const;
70  const QMap<Qmmp::MetaData, QString> metaData () const;
74  bool isEmpty() const;
78  const QString path() const;
82  void setLength(qint64 length);
86  void setMetaData(Qmmp::MetaData key, const QString &value);
90  void setMetaData(Qmmp::MetaData key, int value);
94  void setMetaData(const QMap <Qmmp::MetaData, QString> &metaData);
98  void setPath(const QString &path);
99 
100 private:
101  QMap <Qmmp::MetaData, QString> m_metaData;
102  qint64 m_length;
103  QString m_path;
104 };
105 
106 #endif
The FileInfo class stores metadata and audio information about media file or stream.
Definition: fileinfo.h:32
bool isEmpty() const
FileInfo(const QString &path=QString())
qint64 length() const
bool operator!=(const FileInfo &info)
MetaData
Definition: qmmp.h:63
const QMap< Qmmp::MetaData, QString > metaData() const
bool operator==(const FileInfo &info)
const QString path() const
void setMetaData(Qmmp::MetaData key, const QString &value)
void setPath(const QString &path)
FileInfo & operator=(const FileInfo &info)
void setLength(qint64 length)