tag.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2002 - 2008 by Scott Wheeler
3  email : wheeler@kde.org
4  ***************************************************************************/
5 
6 /***************************************************************************
7  * This library is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU Lesser General Public License version *
9  * 2.1 as published by the Free Software Foundation. *
10  * *
11  * This library is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19  * 02110-1301 USA *
20  * *
21  * Alternatively, this file is available under the Mozilla Public *
22  * License Version 1.1. You may obtain a copy of the License at *
23  * http://www.mozilla.org/MPL/ *
24  ***************************************************************************/
25 
26 #ifndef TAGLIB_TAG_H
27 #define TAGLIB_TAG_H
28 
29 #include "taglib_export.h"
30 #include "tstring.h"
31 
32 namespace TagLib {
33 
35 
44  class PropertyMap;
45 
47  {
48  public:
49 
53  virtual ~Tag();
54 
61  PropertyMap properties() const;
62 
71  void removeUnsupportedProperties(const StringList& properties);
72 
79  PropertyMap setProperties(const PropertyMap &properties);
80 
85  virtual String title() const = 0;
86 
91  virtual String artist() const = 0;
92 
97  virtual String album() const = 0;
98 
103  virtual String comment() const = 0;
104 
109  virtual String genre() const = 0;
110 
114  virtual uint year() const = 0;
115 
120  virtual uint track() const = 0;
121 
126  virtual void setTitle(const String &s) = 0;
127 
132  virtual void setArtist(const String &s) = 0;
133 
138  virtual void setAlbum(const String &s) = 0;
139 
144  virtual void setComment(const String &s) = 0;
145 
153  virtual void setGenre(const String &s) = 0;
154 
158  virtual void setYear(uint i) = 0;
159 
163  virtual void setTrack(uint i) = 0;
164 
170  virtual bool isEmpty() const;
171 
183  static void duplicate(const Tag *source, Tag *target, bool overwrite = true);
184 
185  protected:
190  Tag();
191 
192  private:
193  Tag(const Tag &);
194  Tag &operator=(const Tag &);
195 
196  class TagPrivate;
197  TagPrivate *d;
198  };
199 }
200 
201 #endif