| TagLib 1.13 |  |

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 "tag.h"
30#include "tbytevector.h"
31#include "tmap.h"
32#include "tstring.h"
33#include "taglib_export.h"
34
35#include "apeitem.h"
36
37 namespace TagLib {
38
39 class File;
40
42
43 namespace APE {
44
45 class Footer;
46
52 typedef Map<const String, Item> ItemListMap;
53
54
56
57 class TAGLIB_EXPORT Tag : public TagLib::Tag
58 {
59 public:
63 Tag();
64
69 Tag(TagLib::File *file, long footerLocation);
70
74 virtual ~Tag();
75
80 ByteVector render() const;
81
86 static ByteVector fileIdentifier();
87
88 // Reimplementations.
89
90 virtual String title() const;
91 virtual String artist() const;
92 virtual String album() const;
93 virtual String comment() const;
94 virtual String genre() const;
95 virtual unsigned int year() const;
96 virtual unsigned int track() const;
97
98 virtual void setTitle(const String &s);
99 virtual void setArtist(const String &s);
100 virtual void setAlbum(const String &s);
101 virtual void setComment(const String &s);
102 virtual void setGenre(const String &s);
103 virtual void setYear(unsigned int i);
104 virtual void setTrack(unsigned int i);
105
120 PropertyMap properties() const;
121
122 void removeUnsupportedProperties(const StringList &properties);
123
130 PropertyMap setProperties(const PropertyMap &);
131
135 static bool checkKey(const String&);
136
140 Footer *footer() const;
141
154 const ItemListMap &itemListMap() const;
155
159 void removeItem(const String &key);
160
166 void addValue(const String &key, const String &value, bool replace = true);
167
173 void setData(const String &key, const ByteVector &value);
174
179 void setItem(const String &key, const Item &item);
180
184 bool isEmpty() const;
185
186 protected:
187
191 void read();
192
196 void parse(const ByteVector &data);
197
198 private:
199 Tag(const Tag &);
200 Tag &operator=(const Tag &);
201
202 class TagPrivate;
203 TagPrivate *d;
204 };
205 }
206}
207
208#endif
apeitem.h
TagLib::APE::Footer
An implementation of APE footers.
Definition: apefooter.h:46
TagLib::APE::Item
An implementation of APE-items.
Definition: apeitem.h:43
TagLib::APE::Tag
An APE tag implementation.
Definition: apetag.h:58
TagLib::APE::Tag::checkKey
static bool checkKey(const String &)
TagLib::APE::Tag::~Tag
virtual ~Tag()
TagLib::APE::Tag::setData
void setData(const String &key, const ByteVector &value)
TagLib::APE::Tag::genre
virtual String genre() const
TagLib::APE::Tag::itemListMap
const ItemListMap & itemListMap() const
TagLib::APE::Tag::track
virtual unsigned int track() const
TagLib::APE::Tag::setGenre
virtual void setGenre(const String &s)
TagLib::APE::Tag::footer
Footer * footer() const
TagLib::APE::Tag::year
virtual unsigned int year() const
TagLib::APE::Tag::setTrack
virtual void setTrack(unsigned int i)
TagLib::APE::Tag::setYear
virtual void setYear(unsigned int i)
TagLib::APE::Tag::comment
virtual String comment() const
TagLib::APE::Tag::removeItem
void removeItem(const String &key)
TagLib::APE::Tag::album
virtual String album() const
TagLib::APE::Tag::isEmpty
bool isEmpty() const
TagLib::APE::Tag::setTitle
virtual void setTitle(const String &s)
TagLib::APE::Tag::read
void read()
TagLib::APE::Tag::title
virtual String title() const
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::setItem
void setItem(const String &key, const Item &item)
TagLib::APE::Tag::Tag
Tag()
TagLib::APE::Tag::render
ByteVector render() const
TagLib::APE::Tag::setArtist
virtual void setArtist(const String &s)
TagLib::APE::Tag::Tag
Tag(TagLib::File *file, long footerLocation)
TagLib::APE::Tag::properties
PropertyMap properties() const
TagLib::APE::Tag::setProperties
PropertyMap setProperties(const PropertyMap &)
TagLib::APE::Tag::fileIdentifier
static ByteVector fileIdentifier()
TagLib::APE::Tag::artist
virtual String artist() const
TagLib::APE::Tag::setAlbum
virtual void setAlbum(const String &s)
TagLib::APE::Tag::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties)
TagLib::APE::Tag::setComment
virtual void setComment(const String &s)
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::Map
A generic, implicitly shared map.
Definition: tmap.h:44
TagLib::PropertyMap
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
TagLib::StringList
A list of strings.
Definition: tstringlist.h:46
TagLib::String
A wide string class suitable for unicode.
Definition: tstring.h:85
TagLib::Tag
Definition: tag.h:47
TagLib::APE::ItemListMap
Map< const String, Item > ItemListMap
Definition: apetag.h:45
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
tbytevector.h
tmap.h
tstring.h