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
38namespace TagLib {
39
40 namespace Ogg {
41
49
51
66 {
67 public:
72
76 XiphComment(const ByteVector &data);
77
81 virtual ~XiphComment();
82
83 virtual String title() const;
84 virtual String artist() const;
85 virtual String album() const;
86 virtual String comment() const;
87 virtual String genre() const;
88 virtual unsigned int year() const;
89 virtual unsigned int track() const;
90
91 virtual void setTitle(const String &s);
92 virtual void setArtist(const String &s);
93 virtual void setAlbum(const String &s);
94 virtual void setComment(const String &s);
95 virtual void setGenre(const String &s);
96 virtual void setYear(unsigned int i);
97 virtual void setTrack(unsigned int i);
98
99 virtual bool isEmpty() const;
100
104 unsigned int fieldCount() const;
105
143
152
161
165 static bool checkKey(const String&);
166
172
180 void addField(const String &key, const String &value, bool replace = true);
181
188 // BIC: remove and merge with below
189 void removeField(const String &key, const String &value = String::null);
190
196 void removeFields(const String &key);
197
203 void removeFields(const String &key, const String &value);
204
211
217 bool contains(const String &key) const;
218
222 ByteVector render() const; // BIC: remove and merge with below
223
231 ByteVector render(bool addFramingBit) const;
232
233
238
243 void removePicture(FLAC::Picture *picture, bool del = true);
244
249
256 void addPicture(FLAC::Picture *picture);
257
258 protected:
263 void parse(const ByteVector &data);
264
265 private:
266 XiphComment(const XiphComment &);
267 XiphComment &operator=(const XiphComment &);
268
269 class XiphCommentPrivate;
270 XiphCommentPrivate *d;
271 };
272 }
273}
274
275#endif
A byte vector.
Definition: tbytevector.h:46
Definition: flacpicture.h:40
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:66
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)
const FieldListMap & fieldListMap() const
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)
virtual void setArtist(const String &s)
void removeField(const String &key, const String &value=String::null)
unsigned int fieldCount() const
static bool checkKey(const String &)
virtual String album() const
List< FLAC::Picture * > pictureList()
PropertyMap setProperties(const PropertyMap &)
virtual unsigned int year() const
void removeFields(const String &key)
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:109
A wide string class suitable for unicode.
Definition: tstring.h:85
static String null
Definition: tstring.h:528
Definition: tag.h:47
Map< String, StringList > FieldListMap
Definition: xiphcomment.h:48
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40