| TagLib 1.13 |  |

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
33 namespace TagLib {
34
35 namespace APE {
36
38
42 class TAGLIB_EXPORT Item
43 {
44 public:
48 enum ItemTypes {
50 Text = 0,
52 Binary = 1,
54 Locator = 2
55 };
59 Item();
60
64 // BIC: Remove this, StringList has a constructor from a single string
65 Item(const String &key, const String &value);
66
70 Item(const String &key, const StringList &values);
71
76 Item(const String &key, const ByteVector &value, bool binary);
77
81 Item(const Item &item);
82
86 virtual ~Item();
87
91 Item &operator=(const Item &item);
92
96 void swap(Item &item);
97
101 String key() const;
102
107 ByteVector binaryData() const;
108
113 void setBinaryData(const ByteVector &value);
114
115#ifndef DO_NOT_DOCUMENT
116 /* Remove in next binary incompatible release */
117 ByteVector value() const;
118#endif
119
123 void setKey(const String &key);
124
130 void setValue(const String &value);
131
138 void setValues(const StringList &values);
139
145 void appendValue(const String &value);
146
152 void appendValues(const StringList &values);
153
157 int size() const;
158
164 String toString() const;
165
166#ifndef DO_NOT_DOCUMENT
167 /* Remove in next binary incompatible release */
168 StringList toStringList() const;
169#endif
170
175 StringList values() const;
176
180 ByteVector render() const;
181
185 void parse(const ByteVector& data);
186
190 void setReadOnly(bool readOnly);
191
195 bool isReadOnly() const;
196
202 void setType(ItemTypes type);
203
207 ItemTypes type() const;
208
212 bool isEmpty() const;
213
214 private:
215 class ItemPrivate;
216 ItemPrivate *d;
217 };
218 }
219
220}
221
222#endif
223
224
TagLib::APE::Item
An implementation of APE-items.
Definition: apeitem.h:43
TagLib::APE::Item::Item
Item(const String &key, const StringList &values)
TagLib::APE::Item::isReadOnly
bool isReadOnly() const
TagLib::APE::Item::key
String key() const
TagLib::APE::Item::toString
String toString() const
TagLib::APE::Item::setReadOnly
void setReadOnly(bool readOnly)
TagLib::APE::Item::operator=
Item & operator=(const Item &item)
TagLib::APE::Item::Item
Item()
TagLib::APE::Item::setType
void setType(ItemTypes type)
TagLib::APE::Item::ItemTypes
ItemTypes
Definition: apeitem.h:48
TagLib::APE::Item::size
int size() const
TagLib::APE::Item::render
ByteVector render() const
TagLib::APE::Item::type
ItemTypes type() const
TagLib::APE::Item::setKey
void setKey(const String &key)
TagLib::APE::Item::Item
Item(const String &key, const String &value)
TagLib::APE::Item::isEmpty
bool isEmpty() const
TagLib::APE::Item::swap
void swap(Item &item)
TagLib::APE::Item::values
StringList values() const
TagLib::APE::Item::Item
Item(const String &key, const ByteVector &value, bool binary)
TagLib::APE::Item::appendValues
void appendValues(const StringList &values)
TagLib::APE::Item::setValues
void setValues(const StringList &values)
TagLib::APE::Item::appendValue
void appendValue(const String &value)
TagLib::APE::Item::parse
void parse(const ByteVector &data)
TagLib::APE::Item::setBinaryData
void setBinaryData(const ByteVector &value)
TagLib::APE::Item::binaryData
ByteVector binaryData() const
TagLib::APE::Item::~Item
virtual ~Item()
TagLib::APE::Item::setValue
void setValue(const String &value)
TagLib::APE::Item::Item
Item(const Item &item)
TagLib::ByteVector
A byte vector.
Definition: tbytevector.h:46
TagLib::StringList
A list of strings.
Definition: tstringlist.h:46
TagLib::String
A wide string class suitable for unicode.
Definition: tstring.h:85
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tbytevector.h
tstring.h
tstringlist.h