TagLib API Documentation
apetag.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2004 by Allan Sandfeld Jensen
3 email : kde@carewolf.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_APETAG_H
27#define TAGLIB_APETAG_H
28
29#include "tbytevector.h"
30#include "tmap.h"
31#include "tstring.h"
32#include "taglib.h"
33#include "taglib_export.h"
34#include "tag.h"
35#include "apeitem.h"
36
37namespace TagLib {
38
39 class File;
40
42
43 namespace APE {
44
45 class Footer;
46
53
55
57 {
58 public:
62 Tag();
63
68 Tag(TagLib::File *file, offset_t footerLocation);
69
73 ~Tag() override;
74
75 Tag(const Tag &) = delete;
76 Tag &operator=(const Tag &) = delete;
77
83
89
90 // Reimplementations.
91
92 String title() const override;
93 String artist() const override;
94 String album() const override;
95 String comment() const override;
96 String genre() const override;
97 unsigned int year() const override;
98 unsigned int track() const override;
99
100 void setTitle(const String &s) override;
101 void setArtist(const String &s) override;
102 void setAlbum(const String &s) override;
103 void setComment(const String &s) override;
104 void setGenre(const String &s) override;
105 void setYear(unsigned int i) override;
106 void setTrack(unsigned int i) override;
107
123 PropertyMap properties() const override;
124
125 void removeUnsupportedProperties(const StringList &properties) override;
126
134
136 List<VariantMap> complexProperties(const String &key) const override;
137 bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
138
142 static bool checkKey(const String&);
143
147 Footer *footer() const;
148
161 const ItemListMap &itemListMap() const;
162
166 void removeItem(const String &key);
167
173 void addValue(const String &key, const String &value, bool replace = true);
174
180 void setData(const String &key, const ByteVector &value);
181
186 void setItem(const String &key, const Item &item);
187
191 bool isEmpty() const override;
192
193 protected:
194
198 void read();
199
203 void parse(const ByteVector &data);
204
205 private:
206 class TagPrivate;
208 std::unique_ptr<TagPrivate> d;
209 };
210 } // namespace APE
211} // namespace TagLib
212
213#endif
An implementation of APE footers.
Definition: apefooter.h:46
An implementation of APE-items.
Definition: apeitem.h:41
An APE tag implementation.
Definition: apetag.h:57
PropertyMap setProperties(const PropertyMap &) override
static bool checkKey(const String &)
void setData(const String &key, const ByteVector &value)
PropertyMap properties() const override
Tag & operator=(const Tag &)=delete
List< VariantMap > complexProperties(const String &key) const override
const ItemListMap & itemListMap() const
String artist() const override
String genre() const override
unsigned int track() const override
Footer * footer() const
String title() const override
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
Tag(TagLib::File *file, offset_t footerLocation)
void setTrack(unsigned int i) override
void setComment(const String &s) override
unsigned int year() const override
void removeItem(const String &key)
void setAlbum(const String &s) override
bool isEmpty() const override
void addValue(const String &key, const String &value, bool replace=true)
void parse(const ByteVector &data)
void removeUnsupportedProperties(const StringList &properties) override
void setItem(const String &key, const Item &item)
StringList complexPropertyKeys() const override
void setGenre(const String &s) override
ByteVector render() const
~Tag() override
Tag(const Tag &)=delete
String album() const override
static ByteVector fileIdentifier()
void setArtist(const String &s) override
String comment() const override
void setYear(unsigned int i) override
void setTitle(const String &s) override
A byte vector.
Definition: tbytevector.h:46
A file class with some useful methods for tag manipulation.
Definition: tfile.h:51
A generic, implicitly shared list.
Definition: tlist.h:54
A generic, implicitly shared map.
Definition: tmap.h:45
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
off_t offset_t
Definition: taglib.h:64
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55