TagLib API Documentation
tag.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.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_TAG_H
27#define TAGLIB_TAG_H
28
29#include "taglib_export.h"
30#include "tstring.h"
31#include "tlist.h"
32#include "tvariant.h"
33
34namespace TagLib {
35
36 class PropertyMap;
37
39
49 {
50 public:
51
55 virtual ~Tag();
56
57 Tag(const Tag &) = delete;
58 Tag &operator=(const Tag &) = delete;
59
66 virtual PropertyMap properties() const;
67
73 virtual void removeUnsupportedProperties(const StringList& properties);
74
81 virtual PropertyMap setProperties(const PropertyMap &origProps);
82
94
117 virtual List<VariantMap> complexProperties(const String &key) const;
118
124 virtual bool setComplexProperties(const String &key, const List<VariantMap> &value);
125
130 virtual String title() const = 0;
131
136 virtual String artist() const = 0;
137
142 virtual String album() const = 0;
143
148 virtual String comment() const = 0;
149
154 virtual String genre() const = 0;
155
159 virtual unsigned int year() const = 0;
160
165 virtual unsigned int track() const = 0;
166
171 virtual void setTitle(const String &s) = 0;
172
177 virtual void setArtist(const String &s) = 0;
178
183 virtual void setAlbum(const String &s) = 0;
184
189 virtual void setComment(const String &s) = 0;
190
198 virtual void setGenre(const String &s) = 0;
199
203 virtual void setYear(unsigned int i) = 0;
204
208 virtual void setTrack(unsigned int i) = 0;
209
215 virtual bool isEmpty() const;
216
228 static void duplicate(const Tag *source, Tag *target, bool overwrite = true);
229
236 static String joinTagValues(const StringList &values);
237
238 protected:
244
245 private:
246 class TagPrivate;
248 std::unique_ptr<TagPrivate> d;
249 };
250} // namespace TagLib
251
252#endif
A generic, implicitly shared list.
Definition: tlist.h:54
A map for format-independent <key,values> tag representations.
Definition: tpropertymap.h:122
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
virtual String album() const =0
virtual bool isEmpty() const
virtual String comment() const =0
virtual void setYear(unsigned int i)=0
static String joinTagValues(const StringList &values)
virtual void setArtist(const String &s)=0
virtual String title() const =0
static void duplicate(const Tag *source, Tag *target, bool overwrite=true)
virtual void setTrack(unsigned int i)=0
Tag & operator=(const Tag &)=delete
virtual String genre() const =0
virtual unsigned int year() const =0
virtual void setComment(const String &s)=0
virtual unsigned int track() const =0
virtual void setTitle(const String &s)=0
virtual List< VariantMap > complexProperties(const String &key) const
virtual void removeUnsupportedProperties(const StringList &properties)
virtual String artist() const =0
virtual ~Tag()
virtual PropertyMap properties() const
virtual void setAlbum(const String &s)=0
virtual bool setComplexProperties(const String &key, const List< VariantMap > &value)
virtual void setGenre(const String &s)=0
virtual StringList complexPropertyKeys() const
virtual PropertyMap setProperties(const PropertyMap &origProps)
Tag(const Tag &)=delete
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55