tag.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2002 - 2008 by Scott Wheeler
00003     email                : wheeler@kde.org
00004  ***************************************************************************/
00005 
00006 /***************************************************************************
00007  *   This library is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU Lesser General Public License version   *
00009  *   2.1 as published by the Free Software Foundation.                     *
00010  *                                                                         *
00011  *   This library is distributed in the hope that it will be useful, but   *
00012  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00014  *   Lesser General Public License for more details.                       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with this library; if not, write to the Free Software   *
00018  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *
00019  *   02110-1301  USA                                                       *
00020  *                                                                         *
00021  *   Alternatively, this file is available under the Mozilla Public        *
00022  *   License Version 1.1.  You may obtain a copy of the License at         *
00023  *   http://www.mozilla.org/MPL/                                           *
00024  ***************************************************************************/
00025 
00026 #ifndef TAGLIB_TAG_H
00027 #define TAGLIB_TAG_H
00028 
00029 #include "taglib_export.h"
00030 #include "tstring.h"
00031 
00032 namespace TagLib {
00033 
00035 
00044   class PropertyMap;
00045 
00046   class TAGLIB_EXPORT Tag
00047   {
00048   public:
00049 
00053     virtual ~Tag();
00054 
00061     PropertyMap properties() const;
00062 
00071     void removeUnsupportedProperties(const StringList& properties);
00072 
00079     PropertyMap setProperties(const PropertyMap &properties);
00080 
00085     virtual String title() const = 0;
00086 
00091     virtual String artist() const = 0;
00092 
00097     virtual String album() const = 0;
00098 
00103     virtual String comment() const = 0;
00104 
00109     virtual String genre() const = 0;
00110 
00114     virtual unsigned int year() const = 0;
00115 
00120     virtual unsigned int track() const = 0;
00121 
00126     virtual void setTitle(const String &s) = 0;
00127 
00132     virtual void setArtist(const String &s) = 0;
00133 
00138     virtual void setAlbum(const String &s) = 0;
00139 
00144     virtual void setComment(const String &s) = 0;
00145 
00153     virtual void setGenre(const String &s) = 0;
00154 
00158     virtual void setYear(unsigned int i) = 0;
00159 
00163     virtual void setTrack(unsigned int i) = 0;
00164 
00170     virtual bool isEmpty() const;
00171 
00183     static void duplicate(const Tag *source, Tag *target, bool overwrite = true);
00184 
00185   protected:
00190     Tag();
00191 
00192   private:
00193     Tag(const Tag &);
00194     Tag &operator=(const Tag &);
00195 
00196     class TagPrivate;
00197     TagPrivate *d;
00198   };
00199 }
00200 
00201 #endif