TagLib 1.11.1 (textidentificationframe.h Source File)
Home
Class Hierarchy
Namespaces
Classes
Headers
Namespace Members
Class Members
File Members
taglib
mpeg
id3v2
frames
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
35
namespace
TagLib
{
36
37
namespace
ID3v2 {
38
39
class
Tag
;
40
typedef
Map<String, String>
KeyConversionMap
;
41
43
106
class
TAGLIB_EXPORT
TextIdentificationFrame
:
public
Frame
107
{
108
friend
class
FrameFactory
;
109
110
public
:
120
TextIdentificationFrame
(
const
ByteVector
&type,
String::Type
encoding);
121
126
explicit
TextIdentificationFrame
(
const
ByteVector
&data);
127
133
static
TextIdentificationFrame
*createTIPLFrame(
const
PropertyMap
&properties);
134
141
static
TextIdentificationFrame
*createTMCLFrame(
const
PropertyMap
&properties);
145
virtual
~
TextIdentificationFrame
();
146
157
void
setText(
const
StringList
&l);
158
159
// Reimplementations.
160
161
virtual
void
setText(
const
String
&s);
162
virtual
String
toString()
const
;
163
174
String::Type
textEncoding()
const
;
175
185
void
setTextEncoding(
String::Type
encoding);
186
190
StringList
fieldList()
const
;
191
196
static
const
KeyConversionMap &involvedPeopleMap();
197
198
PropertyMap
asProperties()
const
;
199
200
protected
:
201
// Reimplementations.
202
203
virtual
void
parseFields(
const
ByteVector
&data);
204
virtual
ByteVector
renderFields()
const
;
205
209
TextIdentificationFrame
(
const
ByteVector
&data,
Header
*h);
210
211
private
:
212
TextIdentificationFrame
(
const
TextIdentificationFrame
&);
213
TextIdentificationFrame
&operator=(
const
TextIdentificationFrame
&);
214
220
PropertyMap
makeTIPLProperties()
const
;
224
PropertyMap
makeTMCLProperties()
const
;
225
class
TextIdentificationFramePrivate;
226
TextIdentificationFramePrivate *d;
227
};
228
237
239
class
TAGLIB_EXPORT
UserTextIdentificationFrame
:
public
TextIdentificationFrame
240
{
241
friend
class
FrameFactory
;
242
243
public
:
248
explicit
UserTextIdentificationFrame
(
String::Type
encoding =
String::Latin1
);
249
253
explicit
UserTextIdentificationFrame
(
const
ByteVector
&data);
254
259
UserTextIdentificationFrame
(
const
String
&description,
const
StringList
&values,
String::Type
encoding =
String::UTF8
);
260
261
virtual
String
toString()
const
;
262
266
String
description()
const
;
267
273
void
setDescription(
const
String
&s);
274
275
StringList
fieldList()
const
;
276
void
setText(
const
String
&text);
277
void
setText(
const
StringList
&fields);
278
292
PropertyMap
asProperties()
const
;
293
298
static
UserTextIdentificationFrame
*find(
Tag
*tag,
const
String
&description);
299
300
private
:
301
UserTextIdentificationFrame
(
const
ByteVector
&data,
Header
*h);
302
UserTextIdentificationFrame
(
const
TextIdentificationFrame
&);
303
UserTextIdentificationFrame
&operator=(
const
UserTextIdentificationFrame
&);
304
305
void
checkFields();
306
307
class
UserTextIdentificationFramePrivate;
308
UserTextIdentificationFramePrivate *d;
309
};
310
311
}
312
}
313
#endif
TagLib::PropertyMap
A map for format-independent <key,valuelist> tag representations.
Definition:
tpropertymap.h:108
TagLib::ID3v2::Header
An implementation of ID3v2 headers.
Definition:
id3v2header.h:47
Tag
TagLib::String
A wide string class suitable for unicode.
Definition:
tstring.h:84
TagLib::ID3v2::TextIdentificationFrame
An ID3v2 text identification frame implementation.
Definition:
textidentificationframe.h:106
TagLib::ByteVector
A byte vector.
Definition:
tbytevector.h:45
TagLib::ID3v2::FrameFactory
A factory for creating ID3v2 frames during parsing.
Definition:
id3v2framefactory.h:65
id3v2frame.h
tstringlist.h
TagLib::Map
A generic, implicitly shared map.
Definition:
tmap.h:43
TagLib::StringList
A list of strings.
Definition:
tstringlist.h:45
TagLib::ID3v2::Frame
ID3v2 frame implementation.
Definition:
id3v2frame.h:54
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition:
taglib_export.h:40
TagLib::ID3v2::UserTextIdentificationFrame
An ID3v2 custom text identification frame implementation.
Definition:
textidentificationframe.h:239
TagLib::ID3v2::KeyConversionMap
Map< String, String > KeyConversionMap
Definition:
textidentificationframe.h:39
taglib_export.h
TagLib::String::Type
Type
Definition:
tstring.h:97
tmap.h
TagLib
A namespace for all TagLib related classes and functions.
Definition:
apefile.h:41
TagLib::String::Latin1
Definition:
tstring.h:101
TagLib::String::UTF8
Definition:
tstring.h:114