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
37namespace TagLib {
38
39 class File;
40
42
43 namespace APE {
44
45 class Footer;
46
53
54
56
58 {
59 public:
63 Tag();
64
69 Tag(TagLib::File *file, long footerLocation);
70
74 virtual ~Tag();
75
81
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
121
123
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
An implementation of APE footers.
Definition: apefooter.h:46
An implementation of APE-items.
Definition: apeitem.h:43
An APE tag implementation.
Definition: apetag.h:58
static bool checkKey(const String &)
void setData(const String &key, const ByteVector &value)
virtual String genre() const
const ItemListMap & itemListMap() const
virtual unsigned int track() const
virtual void setGenre(const String &s)
Footer * footer() const
virtual unsigned int year() const
virtual void setTrack(unsigned int i)
virtual void setYear(unsigned int i)
virtual String comment() const
void removeItem(const String &key)
virtual String album() const
bool isEmpty() const
virtual void setTitle(const String &s)
virtual String title() const
void addValue(const String &key, const String &value, bool replace=true)
void parse(const ByteVector &data)
void setItem(const String &key, const Item &item)
ByteVector render() const
virtual void setArtist(const String &s)
Tag(TagLib::File *file, long footerLocation)
PropertyMap properties() const
PropertyMap setProperties(const PropertyMap &)
static ByteVector fileIdentifier()
virtual String artist() const
virtual void setAlbum(const String &s)
void removeUnsupportedProperties(const StringList &properties)
virtual void setComment(const String &s)
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 map.
Definition: tmap.h:44
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:119
A list of strings.
Definition: tstringlist.h:46
A wide string class suitable for unicode.
Definition: tstring.h:85
Definition: tag.h:47
Map< const String, Item > ItemListMap
Definition: apetag.h:45
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40