| TagLib 1.13 |  |

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
40 extern template class TAGLIB_EXPORT TagLib::Map<TagLib::String, TagLib::StringList>;
41#endif
42
43 namespace TagLib {
44
45 namespace Ogg {
46
53 typedef Map<String, StringList> FieldListMap;
54
56
70 class TAGLIB_EXPORT XiphComment : public TagLib::Tag
71 {
72 public:
76 XiphComment();
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
156 PropertyMap properties() const;
157
165 PropertyMap setProperties(const PropertyMap&);
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
215 void removeAllFields();
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
242 List<FLAC::Picture *> pictureList();
243
248 void removePicture(FLAC::Picture *picture, bool del = true);
249
253 void removeAllPictures();
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 }
278}
279
280#endif
TagLib::ByteVector
A byte vector.
Definition: tbytevector.h:46
TagLib::FLAC::Picture
Definition: flacpicture.h:40
TagLib::List
A generic, implicitly shared list.
Definition: tlist.h:54
TagLib::Map
A generic, implicitly shared map.
Definition: tmap.h:44
TagLib::Ogg::XiphComment
Ogg Vorbis comment implementation.
Definition: xiphcomment.h:71
TagLib::Ogg::XiphComment::artist
virtual String artist() const
TagLib::Ogg::XiphComment::addField
void addField(const String &key, const String &value, bool replace=true)
TagLib::Ogg::XiphComment::render
ByteVector render(bool addFramingBit) const
TagLib::Ogg::XiphComment::genre
virtual String genre() const
TagLib::Ogg::XiphComment::setAlbum
virtual void setAlbum(const String &s)
TagLib::Ogg::XiphComment::setGenre
virtual void setGenre(const String &s)
TagLib::Ogg::XiphComment::fieldListMap
const FieldListMap & fieldListMap() const
TagLib::Ogg::XiphComment::setTitle
virtual void setTitle(const String &s)
TagLib::Ogg::XiphComment::removeAllPictures
void removeAllPictures()
TagLib::Ogg::XiphComment::XiphComment
XiphComment(const ByteVector &data)
TagLib::Ogg::XiphComment::setYear
virtual void setYear(unsigned int i)
TagLib::Ogg::XiphComment::properties
PropertyMap properties() const
TagLib::Ogg::XiphComment::render
ByteVector render() const
TagLib::Ogg::XiphComment::removeAllFields
void removeAllFields()
TagLib::Ogg::XiphComment::isEmpty
virtual bool isEmpty() const
TagLib::Ogg::XiphComment::comment
virtual String comment() const
TagLib::Ogg::XiphComment::vendorID
String vendorID() const
TagLib::Ogg::XiphComment::addPicture
void addPicture(FLAC::Picture *picture)
TagLib::Ogg::XiphComment::title
virtual String title() const
TagLib::Ogg::XiphComment::parse
void parse(const ByteVector &data)
TagLib::Ogg::XiphComment::setComment
virtual void setComment(const String &s)
TagLib::Ogg::XiphComment::XiphComment
XiphComment()
TagLib::Ogg::XiphComment::setTrack
virtual void setTrack(unsigned int i)
TagLib::Ogg::XiphComment::setArtist
virtual void setArtist(const String &s)
TagLib::Ogg::XiphComment::fieldCount
unsigned int fieldCount() const
TagLib::Ogg::XiphComment::~XiphComment
virtual ~XiphComment()
TagLib::Ogg::XiphComment::checkKey
static bool checkKey(const String &)
TagLib::Ogg::XiphComment::album
virtual String album() const
TagLib::Ogg::XiphComment::pictureList
List< FLAC::Picture * > pictureList()
TagLib::Ogg::XiphComment::setProperties
PropertyMap setProperties(const PropertyMap &)
TagLib::Ogg::XiphComment::year
virtual unsigned int year() const
TagLib::Ogg::XiphComment::removeFields
void removeFields(const String &key)
TagLib::Ogg::XiphComment::removeField
TAGLIB_DEPRECATED void removeField(const String &key, const String &value=String())
TagLib::Ogg::XiphComment::removePicture
void removePicture(FLAC::Picture *picture, bool del=true)
TagLib::Ogg::XiphComment::track
virtual unsigned int track() const
TagLib::Ogg::XiphComment::removeFields
void removeFields(const String &key, const String &value)
TagLib::Ogg::XiphComment::contains
bool contains(const String &key) const
TagLib::PropertyMap
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
TagLib::String
A wide string class suitable for unicode.
Definition: tstring.h:85
TagLib::Tag
Definition: tag.h:47
flacpicture.h
TagLib::Ogg::FieldListMap
Map< String, StringList > FieldListMap
Definition: xiphcomment.h:53
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
tag.h
TAGLIB_DEPRECATED
#define TAGLIB_DEPRECATED
Definition: taglib.h:54
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tbytevector.h
tlist.h
tmap.h
tstring.h
tstringlist.h