TagLib API Documentation
apeitem.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_APEITEM_H
27#define TAGLIB_APEITEM_H
28
29#include "tbytevector.h"
30#include "tstring.h"
31#include "tstringlist.h"
32
33namespace TagLib {
34 namespace APE {
36
41 {
42 public:
46 enum ItemTypes {
48 Text = 0,
50 Binary = 1,
52 Locator = 2
53 };
58
62 Item(const String &key, const StringList &values);
63
68 Item(const String &key, const ByteVector &value, bool binary);
69
73 Item(const Item &item);
74
79
83 Item &operator=(const Item &item);
84
88 void swap(Item &item) noexcept;
89
93 String key() const;
94
100
105 void setBinaryData(const ByteVector &value);
106
110 void setKey(const String &key);
111
117 void setValue(const String &value);
118
125 void setValues(const StringList &values);
126
132 void appendValue(const String &value);
133
139 void appendValues(const StringList &values);
140
144 int size() const;
145
152
158
163
167 void parse(const ByteVector& data);
168
172 void setReadOnly(bool readOnly);
173
177 bool isReadOnly() const;
178
185
190
194 bool isEmpty() const;
195
196 private:
197 class ItemPrivate;
199 std::unique_ptr<ItemPrivate> d;
200 };
201 } // namespace APE
202} // namespace TagLib
203
204#endif
An implementation of APE-items.
Definition: apeitem.h:41
Item(const String &key, const StringList &values)
bool isReadOnly() const
String key() const
String toString() const
void setReadOnly(bool readOnly)
Item & operator=(const Item &item)
ItemTypes
Definition: apeitem.h:46
int size() const
ByteVector render() const
ItemTypes type() const
void setKey(const String &key)
bool isEmpty() const
void setType(ItemTypes val)
StringList values() const
Item(const String &key, const ByteVector &value, bool binary)
void swap(Item &item) noexcept
void appendValues(const StringList &values)
void setValues(const StringList &values)
void appendValue(const String &value)
void parse(const ByteVector &data)
void setBinaryData(const ByteVector &value)
ByteVector binaryData() const
void setValue(const String &value)
Item(const Item &item)
A byte vector.
Definition: tbytevector.h:46
A list of strings.
Definition: tstringlist.h:44
A wide string class suitable for unicode.
Definition: tstring.h:83
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