aboutsummaryrefslogtreecommitdiff
path: root/lib/filetag.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-20 12:23:35 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-20 12:23:35 +0000
commitbc2f300631757a3eaf637203ee3f85d804ea1628 (patch)
tree701e22ba98da72f75a6bcacfe101b51ed2b10734 /lib/filetag.h
parent3df482395b31866da7b91a25360ef952ec0a90aa (diff)
downloadqmmp-bc2f300631757a3eaf637203ee3f85d804ea1628.tar.gz
qmmp-bc2f300631757a3eaf637203ee3f85d804ea1628.tar.bz2
qmmp-bc2f300631757a3eaf637203ee3f85d804ea1628.zip
added metadata update support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@103 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'lib/filetag.h')
-rw-r--r--lib/filetag.h54
1 files changed, 39 insertions, 15 deletions
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 <QString>
+#include <QMap>
+/**
+ @author Ilya Kotov <forkotov02@hotmail.ru>
+*/
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 <uint, QString> m_strValues;
+ QMap <uint, uint> m_numValues;
};