TagLib  1.13.1
xiphcomment.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_VORBISCOMMENT_H
27 #define TAGLIB_VORBISCOMMENT_H
28 
29 #include "tag.h"
30 #include "tlist.h"
31 #include "tmap.h"
32 #include "tstring.h"
33 #include "tstringlist.h"
34 #include "tbytevector.h"
35 #include "flacpicture.h"
36 #include "taglib_export.h"
37 
38 #ifdef _MSC_VER
39 // Explained at end of tpropertymap.cpp
41 #endif
42 
43 namespace TagLib {
44 
45  namespace Ogg {
46 
54 
56 
71  {
72  public:
77 
81  XiphComment(const ByteVector &data);
82 
86  virtual ~XiphComment();
87 
88  virtual String title() const;
89  virtual String artist() const;
90  virtual String album() const;
91  virtual String comment() const;
92  virtual String genre() const;
93  virtual unsigned int year() const;
94  virtual unsigned int track() const;
95 
96  virtual void setTitle(const String &s);
97  virtual void setArtist(const String &s);
98  virtual void setAlbum(const String &s);
99  virtual void setComment(const String &s);
100  virtual void setGenre(const String &s);
101  virtual void setYear(unsigned int i);
102  virtual void setTrack(unsigned int i);
103 
104  virtual bool isEmpty() const;
105 
109  unsigned int fieldCount() const;
110 
147  const FieldListMap &fieldListMap() const;
148 
157 
166 
170  static bool checkKey(const String&);
171 
176  String vendorID() const;
177 
185  void addField(const String &key, const String &value, bool replace = true);
186 
193  // BIC: remove and merge with below
194  TAGLIB_DEPRECATED void removeField(const String &key, const String &value = String());
195 
201  void removeFields(const String &key);
202 
208  void removeFields(const String &key, const String &value);
209 
216 
222  bool contains(const String &key) const;
223 
227  ByteVector render() const; // BIC: remove and merge with below
228 
236  ByteVector render(bool addFramingBit) const;
237 
238 
243 
248  void removePicture(FLAC::Picture *picture, bool del = true);
249 
254 
261  void addPicture(FLAC::Picture *picture);
262 
263  protected:
268  void parse(const ByteVector &data);
269 
270  private:
271  XiphComment(const XiphComment &);
272  XiphComment &operator=(const XiphComment &);
273 
274  class XiphCommentPrivate;
275  XiphCommentPrivate *d;
276  };
277  } // namespace Ogg
278 } // namespace TagLib
279 
280 #endif
A byte vector.
Definition: tbytevector.h:46
Definition: flacpicture.h:38
A generic, implicitly shared list.
Definition: tlist.h:54
A generic, implicitly shared map.
Definition: tmap.h:44
Ogg Vorbis comment implementation.
Definition: xiphcomment.h:71
virtual String artist() const
void addField(const String &key, const String &value, bool replace=true)
ByteVector render(bool addFramingBit) const
virtual String genre() const
virtual void setAlbum(const String &s)
virtual void setGenre(const String &s)
virtual void setTitle(const String &s)
XiphComment(const ByteVector &data)
virtual void setYear(unsigned int i)
PropertyMap properties() const
ByteVector render() const
virtual bool isEmpty() const
virtual String comment() const
String vendorID() const
void addPicture(FLAC::Picture *picture)
virtual String title() const
void parse(const ByteVector &data)
virtual void setComment(const String &s)
virtual void setTrack(unsigned int i)
const FieldListMap & fieldListMap() const
virtual void setArtist(const String &s)
unsigned int fieldCount() const
static bool checkKey(const String &)
virtual String album() const
PropertyMap setProperties(const PropertyMap &)
List< FLAC::Picture * > pictureList()
virtual unsigned int year() const
void removeFields(const String &key)
TAGLIB_DEPRECATED void removeField(const String &key, const String &value=String())
void removePicture(FLAC::Picture *picture, bool del=true)
virtual unsigned int track() const
void removeFields(const String &key, const String &value)
bool contains(const String &key) const
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
A wide string class suitable for unicode.
Definition: tstring.h:85
Definition: tag.h:47
Map< String, StringList > FieldListMap
Definition: xiphcomment.h:53
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_DEPRECATED
Definition: taglib.h:54
#define TAGLIB_EXPORT
Definition: taglib_export.h:40