TagLib API Documentation
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 "tlist.h"
30#include "tmap.h"
31#include "tstring.h"
32#include "tstringlist.h"
33#include "tbytevector.h"
34#include "taglib_export.h"
35#include "tag.h"
36#include "flacpicture.h"
37
38#ifdef _MSC_VER
39// Explained at end of tpropertymap.cpp
41#endif
42
43namespace TagLib {
44
45 namespace Ogg {
46
54
56
71 {
72 public:
77
81 XiphComment(const ByteVector &data);
82
86 ~XiphComment() override;
87
88 XiphComment(const XiphComment &) = delete;
89 XiphComment &operator=(const XiphComment &) = delete;
90
91 String title() const override;
92 String artist() const override;
93 String album() const override;
94 String comment() const override;
95 String genre() const override;
96 unsigned int year() const override;
97 unsigned int track() const override;
98
99 void setTitle(const String &s) override;
100 void setArtist(const String &s) override;
101 void setAlbum(const String &s) override;
102 void setComment(const String &s) override;
103 void setGenre(const String &s) override;
104 void setYear(unsigned int i) override;
105 void setTrack(unsigned int i) override;
106
107 bool isEmpty() const override;
108
112 unsigned int fieldCount() const;
113
151
159 PropertyMap properties() const override;
160
169
171 List<VariantMap> complexProperties(const String &key) const override;
172 bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
173
177 static bool checkKey(const String&);
178
184
192 void addField(const String &key, const String &value, bool replace = true);
193
199 void removeFields(const String &key);
200
206 void removeFields(const String &key, const String &value);
207
214
220 bool contains(const String &key) const;
221
229 ByteVector render(bool addFramingBit = true) const;
230
231
236
241 void removePicture(FLAC::Picture *picture, bool del = true);
242
247
254 void addPicture(FLAC::Picture *picture);
255
256 protected:
261 void parse(const ByteVector &data);
262
263 private:
264 class XiphCommentPrivate;
266 std::unique_ptr<XiphCommentPrivate> d;
267 };
268 } // namespace Ogg
269} // namespace TagLib
270
271#endif
A byte vector.
Definition: tbytevector.h:46
FLAC picture.
Definition: flacpicture.h:40
A generic, implicitly shared list.
Definition: tlist.h:54
A generic, implicitly shared map.
Definition: tmap.h:45
Ogg Vorbis comment implementation.
Definition: xiphcomment.h:71
unsigned int track() const override
String title() const override
PropertyMap setProperties(const PropertyMap &) override
void addField(const String &key, const String &value, bool replace=true)
ByteVector render(bool addFramingBit=true) const
String comment() const override
void setGenre(const String &s) override
void setTitle(const String &s) override
StringList complexPropertyKeys() const override
XiphComment(const XiphComment &)=delete
unsigned int year() const override
const FieldListMap & fieldListMap() const
XiphComment(const ByteVector &data)
void setAlbum(const String &s) override
void setArtist(const String &s) override
String vendorID() const
PropertyMap properties() const override
void addPicture(FLAC::Picture *picture)
void parse(const ByteVector &data)
void setTrack(unsigned int i) override
String genre() const override
unsigned int fieldCount() const
XiphComment & operator=(const XiphComment &)=delete
static bool checkKey(const String &)
bool isEmpty() const override
void setComment(const String &s) override
void setYear(unsigned int i) override
String artist() const override
List< FLAC::Picture * > pictureList()
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
List< VariantMap > complexProperties(const String &key) const override
void removeFields(const String &key)
void removePicture(FLAC::Picture *picture, bool del=true)
void removeFields(const String &key, const String &value)
String album() const override
bool contains(const String &key) const
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:123
A list of strings.
Definition: tstringlist.h:44
A wide string class suitable for unicode.
Definition: tstring.h:83
A simple, generic interface to common audio metadata fields.
Definition: tag.h:49
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55