apetag.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.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_APETAG_H
#define TAGLIB_APETAG_H
#include "tbytevector.h"
#include "tmap.h"
#include "tstring.h"
#include "taglib.h"
#include "taglib_export.h"
#include "tag.h"
#include "apeitem.h"
namespace TagLib {
class File;
namespace APE {
class Footer;
using ItemListMap = Map<const String, Item>;
class TAGLIB_EXPORT Tag : public TagLib::Tag
{
public:
Tag();
Tag(TagLib::File *file, offset_t footerLocation);
~Tag() override;
Tag(const Tag &) = delete;
Tag &operator=(const Tag &) = delete;
ByteVector render() const;
static ByteVector fileIdentifier();
// Reimplementations.
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;
PropertyMap properties() const override;
void removeUnsupportedProperties(const StringList &properties) 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&);
Footer *footer() const;
const ItemListMap &itemListMap() const;
void removeItem(const String &key);
void addValue(const String &key, const String &value, bool replace = true);
void setData(const String &key, const ByteVector &value);
void setItem(const String &key, const Item &item);
bool isEmpty() const override;
protected:
void read();
void parse(const ByteVector &data);
private:
class TagPrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<TagPrivate> d;
};
} // namespace APE
} // namespace TagLib
#endif
apeitem.h
TagLib::APE::Item
An implementation of APE-items.
Definition apeitem.h:41
TagLib::APE::Tag::setProperties
PropertyMap setProperties(const PropertyMap &) override
TagLib::APE::Tag::checkKey
static bool checkKey(const String &)
TagLib::APE::Tag::setData
void setData(const String &key, const ByteVector &value)
TagLib::APE::Tag::properties
PropertyMap properties() const override
TagLib::APE::Tag::operator=
Tag & operator=(const Tag &)=delete
TagLib::APE::Tag::complexProperties
List< VariantMap > complexProperties(const String &key) const override
TagLib::APE::Tag::itemListMap
const ItemListMap & itemListMap() const
TagLib::APE::Tag::artist
String artist() const override
TagLib::APE::Tag::genre
String genre() const override
TagLib::APE::Tag::track
unsigned int track() const override
TagLib::APE::Tag::footer
Footer * footer() const
TagLib::APE::Tag::title
String title() const override
TagLib::APE::Tag::setComplexProperties
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
TagLib::APE::Tag::Tag
Tag(TagLib::File *file, offset_t footerLocation)
TagLib::APE::Tag::setTrack
void setTrack(unsigned int i) override
TagLib::APE::Tag::setComment
void setComment(const String &s) override
TagLib::APE::Tag::year
unsigned int year() const override
TagLib::APE::Tag::removeItem
void removeItem(const String &key)
TagLib::APE::Tag::setAlbum
void setAlbum(const String &s) override
TagLib::APE::Tag::read
void read()
TagLib::APE::Tag::isEmpty
bool isEmpty() const override
TagLib::APE::Tag::addValue
void addValue(const String &key, const String &value, bool replace=true)
TagLib::APE::Tag::parse
void parse(const ByteVector &data)
TagLib::APE::Tag::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties) override
TagLib::APE::Tag::setItem
void setItem(const String &key, const Item &item)
TagLib::APE::Tag::Tag
Tag()
TagLib::APE::Tag::complexPropertyKeys
StringList complexPropertyKeys() const override
TagLib::APE::Tag::setGenre
void setGenre(const String &s) override
TagLib::APE::Tag::render
ByteVector render() const
TagLib::APE::Tag::~Tag
~Tag() override
TagLib::APE::Tag::Tag
Tag(const Tag &)=delete
TagLib::APE::Tag::album
String album() const override
TagLib::APE::Tag::fileIdentifier
static ByteVector fileIdentifier()
TagLib::APE::Tag::setArtist
void setArtist(const String &s) override
TagLib::APE::Tag::comment
String comment() const override
TagLib::APE::Tag::setYear
void setYear(unsigned int i) override
TagLib::APE::Tag::setTitle
void setTitle(const String &s) override
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::File
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
TagLib::List
A generic, implicitly shared list.
Definition tlist.h:54
TagLib::Map
A generic, implicitly shared map.
Definition tmap.h:45
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
TagLib::APE
An implementation of APE metadata.
Definition apefile.h:46
TagLib::APE::ItemListMap
Map< const String, Item > ItemListMap
Definition apetag.h:52
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::offset_t
off_t offset_t
Definition taglib.h:64
tag.h
taglib.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
tmap.h
tstring.h