From bc2f300631757a3eaf637203ee3f85d804ea1628 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 20 Aug 2007 12:23:35 +0000 Subject: added metadata update support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@103 90c681e8-e032-0410-971d-27865f9a5e38 --- lib/filetag.h | 54 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 15 deletions(-) (limited to 'lib/filetag.h') diff --git a/lib/filetag.h b/lib/filetag.h index 80383c2ab..c2d36a842 100644 --- a/lib/filetag.h +++ b/lib/filetag.h @@ -1,6 +1,6 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * - * forkotov02@hotmail.ru * + * Copyright (C) 2006 by Ilya Kotov * + * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -20,24 +20,48 @@ #ifndef FILETAG_H #define FILETAG_H - #include +#include +/** + @author Ilya Kotov +*/ class FileTag { public: - FileTag() {}; - - virtual ~FileTag() {}; - virtual QString title () = 0; - virtual QString artist () = 0; - virtual QString album () = 0; - virtual QString comment () = 0 ; - virtual QString genre () = 0; - virtual uint year () = 0; - virtual uint track () = 0; - virtual uint length () = 0; - virtual bool isEmpty () = 0; + FileTag(); + FileTag(const FileTag &other); + + ~FileTag(); + + enum Type + { + TITLE = 0, + ARTIST, + ALBUM, + COMMENT, + GENRE, + YEAR, + TRACK, + LENGTH + }; + + void operator=(const FileTag &tag); + void setValue(uint name, const QString &value); + void setValue(uint name, const uint &value); + const QString title () const; + const QString artist () const; + const QString album () const; + const QString comment () const; + const QString genre () const; + const uint year () const; + const uint track () const; + const uint length () const; + const bool isEmpty () const; + +private: + QMap m_strValues; + QMap m_numValues; }; -- cgit v1.2.3-13-gbd6f