TagLib API Documentation
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#include "id3v2frame.h"
33
34namespace TagLib {
35
36 namespace ID3v2 {
37
38 class Tag;
40
42
106 {
107 friend class FrameFactory;
108
109 public:
120
125 explicit TextIdentificationFrame(const ByteVector &data);
126
133
145
148
159 void setText(const StringList &l);
160
161 // Reimplementations.
162
163 void setText(const String &s) override;
164 String toString() const override;
165 StringList toStringList() const override;
166
178
189
194
200
201 PropertyMap asProperties() const override;
202
203 protected:
204 // Reimplementations.
205
206 void parseFields(const ByteVector &data) override;
207 ByteVector renderFields() const override;
208
213
214 private:
220 PropertyMap makeTIPLProperties() const;
224 PropertyMap makeTMCLProperties() const;
225 class TextIdentificationFramePrivate;
227 std::unique_ptr<TextIdentificationFramePrivate> d;
228 };
229
239
241 {
242 friend class FrameFactory;
243
244 public:
250
255
260 UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding = String::UTF8);
261
263
266
267 String toString() const override;
268
273
279 void setDescription(const String &s);
280
281 void setText(const String &text) override;
282 void setText(const StringList &fields);
283
297 PropertyMap asProperties() const override;
298
303 static UserTextIdentificationFrame *find(const Tag *tag, const String &description);
304
308 static String keyToTXXX(const String &);
309
313 static String txxxToKey(const String &);
314
315 private:
317
318 void checkFields();
319
320 class UserTextIdentificationFramePrivate;
322 std::unique_ptr<UserTextIdentificationFramePrivate> d;
323 };
324
325 } // namespace ID3v2
326} // namespace TagLib
327#endif
A byte vector.
Definition: tbytevector.h:46
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:68
ID3v2 frame implementation.
Definition: id3v2frame.h:57
An implementation of ID3v2 headers.
Definition: id3v2header.h:49
The main class in the ID3v2 implementation.
Definition: id3v2tag.h:134
An ID3v2 text identification frame implementation.
Definition: textidentificationframe.h:106
ByteVector renderFields() const override
TextIdentificationFrame & operator=(const TextIdentificationFrame &)=delete
void setTextEncoding(String::Type encoding)
void setText(const StringList &l)
StringList toStringList() const override
String toString() const override
TextIdentificationFrame(const ByteVector &data, Header *h)
TextIdentificationFrame(const ByteVector &data)
void parseFields(const ByteVector &data) override
void setText(const String &s) override
static TextIdentificationFrame * createTMCLFrame(const PropertyMap &properties)
static TextIdentificationFrame * createTIPLFrame(const PropertyMap &properties)
static const KeyConversionMap & involvedPeopleMap()
TextIdentificationFrame(const ByteVector &type, String::Type encoding)
TextIdentificationFrame(const TextIdentificationFrame &)=delete
PropertyMap asProperties() const override
An ID3v2 custom text identification frame implementation.
Definition: textidentificationframe.h:241
UserTextIdentificationFrame & operator=(const UserTextIdentificationFrame &)=delete
UserTextIdentificationFrame(const String &description, const StringList &values, String::Type encoding=String::UTF8)
void setText(const StringList &fields)
static String txxxToKey(const String &)
static String keyToTXXX(const String &)
void setText(const String &text) override
UserTextIdentificationFrame(const ByteVector &data)
static UserTextIdentificationFrame * find(const Tag *tag, const String &description)
UserTextIdentificationFrame(const UserTextIdentificationFrame &)=delete
PropertyMap asProperties() const override
UserTextIdentificationFrame(String::Type encoding=String::Latin1)
A generic, implicitly shared map.
Definition: tmap.h:45
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
Type
Definition: tstring.h:96
@ Latin1
Definition: tstring.h:100
@ UTF8
Definition: tstring.h:113
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