xiphcomment.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2002 - 2008 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_VORBISCOMMENT_H
#define TAGLIB_VORBISCOMMENT_H
#include "tlist.h"
#include "tmap.h"
#include "tstring.h"
#include "tstringlist.h"
#include "tbytevector.h"
#include "taglib_export.h"
#include "tag.h"
#include "flacpicture.h"
#ifdef _MSC_VER
// Explained at end of tpropertymap.cpp
extern template class TagLib::Map<TagLib::String, TagLib::StringList>;
#endif
namespace TagLib {
namespace Ogg {
using FieldListMap = Map<String, StringList>;
class TAGLIB_EXPORT XiphComment : public TagLib::Tag
{
public:
XiphComment();
XiphComment(const ByteVector &data);
~XiphComment() override;
XiphComment(const XiphComment &) = delete;
XiphComment &operator=(const XiphComment &) = delete;
String title() const override;
String artist() const override;
String album() const override;
String comment() const override;
String genre() const override;
unsigned int year() const override;
unsigned int track() const override;
void setTitle(const String &s) override;
void setArtist(const String &s) override;
void setAlbum(const String &s) override;
void setComment(const String &s) override;
void setGenre(const String &s) override;
void setYear(unsigned int i) override;
void setTrack(unsigned int i) override;
bool isEmpty() const override;
unsigned int fieldCount() const;
const FieldListMap &fieldListMap() const;
PropertyMap properties() const override;
PropertyMap setProperties(const PropertyMap&) override;
StringList complexPropertyKeys() const override;
List<VariantMap> complexProperties(const String &key) const override;
bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
static bool checkKey(const String&);
String vendorID() const;
void addField(const String &key, const String &value, bool replace = true);
void removeFields(const String &key);
void removeFields(const String &key, const String &value);
void removeAllFields();
bool contains(const String &key) const;
ByteVector render(bool addFramingBit = true) const;
List<FLAC::Picture *> pictureList();
void removePicture(FLAC::Picture *picture, bool del = true);
void removeAllPictures();
void addPicture(FLAC::Picture *picture);
protected:
void parse(const ByteVector &data);
private:
class XiphCommentPrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<XiphCommentPrivate> d;
};
} // namespace Ogg
} // namespace TagLib
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::FLAC::Picture
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:45
TagLib::Ogg::XiphComment::track
unsigned int track() const override
TagLib::Ogg::XiphComment::title
String title() const override
TagLib::Ogg::XiphComment::setProperties
PropertyMap setProperties(const PropertyMap &) override
TagLib::Ogg::XiphComment::addField
void addField(const String &key, const String &value, bool replace=true)
TagLib::Ogg::XiphComment::render
ByteVector render(bool addFramingBit=true) const
TagLib::Ogg::XiphComment::comment
String comment() const override
TagLib::Ogg::XiphComment::setGenre
void setGenre(const String &s) override
TagLib::Ogg::XiphComment::setTitle
void setTitle(const String &s) override
TagLib::Ogg::XiphComment::complexPropertyKeys
StringList complexPropertyKeys() const override
TagLib::Ogg::XiphComment::XiphComment
XiphComment(const XiphComment &)=delete
TagLib::Ogg::XiphComment::year
unsigned int year() const override
TagLib::Ogg::XiphComment::fieldListMap
const FieldListMap & fieldListMap() const
TagLib::Ogg::XiphComment::removeAllPictures
void removeAllPictures()
TagLib::Ogg::XiphComment::XiphComment
XiphComment(const ByteVector &data)
TagLib::Ogg::XiphComment::setAlbum
void setAlbum(const String &s) override
TagLib::Ogg::XiphComment::removeAllFields
void removeAllFields()
TagLib::Ogg::XiphComment::setArtist
void setArtist(const String &s) override
TagLib::Ogg::XiphComment::vendorID
String vendorID() const
TagLib::Ogg::XiphComment::properties
PropertyMap properties() const override
TagLib::Ogg::XiphComment::addPicture
void addPicture(FLAC::Picture *picture)
TagLib::Ogg::XiphComment::parse
void parse(const ByteVector &data)
TagLib::Ogg::XiphComment::XiphComment
XiphComment()
TagLib::Ogg::XiphComment::setTrack
void setTrack(unsigned int i) override
TagLib::Ogg::XiphComment::~XiphComment
~XiphComment() override
TagLib::Ogg::XiphComment::genre
String genre() const override
TagLib::Ogg::XiphComment::fieldCount
unsigned int fieldCount() const
TagLib::Ogg::XiphComment::operator=
XiphComment & operator=(const XiphComment &)=delete
TagLib::Ogg::XiphComment::checkKey
static bool checkKey(const String &)
TagLib::Ogg::XiphComment::isEmpty
bool isEmpty() const override
TagLib::Ogg::XiphComment::setComment
void setComment(const String &s) override
TagLib::Ogg::XiphComment::setYear
void setYear(unsigned int i) override
TagLib::Ogg::XiphComment::artist
String artist() const override
TagLib::Ogg::XiphComment::pictureList
List< FLAC::Picture * > pictureList()
TagLib::Ogg::XiphComment::setComplexProperties
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
TagLib::Ogg::XiphComment::complexProperties
List< VariantMap > complexProperties(const String &key) const override
TagLib::Ogg::XiphComment::removeFields
void removeFields(const String &key)
TagLib::Ogg::XiphComment::removePicture
void removePicture(FLAC::Picture *picture, bool del=true)
TagLib::Ogg::XiphComment::removeFields
void removeFields(const String &key, const String &value)
TagLib::Ogg::XiphComment::album
String album() const override
TagLib::Ogg::XiphComment::contains
bool contains(const String &key) const
TagLib::PropertyMap
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib::Tag
A simple, generic interface to common audio metadata fields.
Definition tag.h:49
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_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
tbytevector.h
tlist.h
tmap.h
tstring.h
tstringlist.h