TagLib 1.12 (textidentificationframe.h Source File)

textidentificationframe.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_TEXTIDENTIFICATIONFRAME_H
27#define TAGLIB_TEXTIDENTIFICATIONFRAME_H
28
29#include "tstringlist.h"
30#include "tmap.h"
31#include "taglib_export.h"
32
33#include "id3v2frame.h"
34
35namespace TagLib {
36
37 namespace ID3v2 {
38
39 class Tag;
41
43
107 {
108 friend class FrameFactory;
109
110 public:
121
126 explicit TextIdentificationFrame(const ByteVector &data);
127
134
146
157 void setText(const StringList &l);
158
159 // Reimplementations.
160
161 virtual void setText(const String &s);
162 virtual String toString() const;
163
175
186
191
197
199
200 protected:
201 // Reimplementations.
202
203 virtual void parseFields(const ByteVector &data);
204 virtual ByteVector renderFields() const;
205
210
211 private:
214
220 PropertyMap makeTIPLProperties() const;
224 PropertyMap makeTMCLProperties() const;
225 class TextIdentificationFramePrivate;
226 TextIdentificationFramePrivate *d;
227 };
228
238
240 {
241 friend class FrameFactory;
242
243 public:
248 explicit UserTextIdentificationFrame(String::Type encoding = String::Latin1);
249
254
259 UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding = String::UTF8);
260
261 virtual String toString() const;
262
267
273 void setDescription(const String &s);
274
276 void setText(const String &text);
277 void setText(const StringList &fields);
278
293
298 static UserTextIdentificationFrame *find(Tag *tag, const String &description);
299
300 private:
304
305 void checkFields();
306
307 class UserTextIdentificationFramePrivate;
308 UserTextIdentificationFramePrivate *d;
309 };
310
311 }
312}
313#endif
A byte vector.
Definition tbytevector.h:46
A factory for creating ID3v2 frames during parsing.
Definition id3v2framefactory.h:66
ID3v2 frame implementation.
Definition id3v2frame.h:55
An implementation of ID3v2 headers.
Definition id3v2header.h:49
The main class in the ID3v2 implementation.
Definition id3v2tag.h:128
An ID3v2 text identification frame implementation.
Definition textidentificationframe.h:107
virtual ByteVector renderFields() const
void setTextEncoding(String::Type encoding)
void setText(const StringList &l)
TextIdentificationFrame(const ByteVector &data, Header *h)
TextIdentificationFrame(const ByteVector &data)
virtual void parseFields(const ByteVector &data)
virtual void setText(const String &s)
static TextIdentificationFrame * createTMCLFrame(const PropertyMap &properties)
static TextIdentificationFrame * createTIPLFrame(const PropertyMap &properties)
static const KeyConversionMap & involvedPeopleMap()
TextIdentificationFrame(const ByteVector &type, String::Type encoding)
An ID3v2 custom text identification frame implementation.
Definition textidentificationframe.h:240
UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding=String::UTF8)
void setText(const StringList &fields)
static UserTextIdentificationFrame * find(Tag *tag, const String &description)
UserTextIdentificationFrame(const ByteVector &data)
UserTextIdentificationFrame(String::Type encoding=String::Latin1)
A generic, implicitly shared map.
Definition tmap.h:44
A map for format-independent <key,valuelist> tag representations.
Definition tpropertymap.h:114
A list of strings.
Definition tstringlist.h:46
A wide string class suitable for unicode.
Definition tstring.h:85
Type
Definition tstring.h:97
Map< String, String > KeyConversionMap
Definition textidentificationframe.h:40
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
#define TAGLIB_EXPORT
Definition taglib_export.h:40