TagLib  2.3
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
105
107 {
108 friend class FrameFactory;
109
110 public:
121
126 explicit TextIdentificationFrame(const ByteVector &data);
127
134
146
149
160 void setText(const StringList &l);
161
162 // Reimplementations.
163
164 void setText(const String &s) override;
165 String toString() const override;
166 StringList toStringList() const override;
167
179
190
195
201
202 PropertyMap asProperties() const override;
203
204 protected:
205 // Reimplementations.
206
207 void parseFields(const ByteVector &data) override;
208 ByteVector renderFields() const override;
209
214
215 private:
221 PropertyMap makeTIPLProperties() const;
225 PropertyMap makeTMCLProperties() const;
226 class TextIdentificationFramePrivate;
228 std::unique_ptr<TextIdentificationFramePrivate> d;
229 };
230
238
240
242 {
243 friend class FrameFactory;
244
245 public:
251
256
262
264
267
268 String toString() const override;
269
274
280 void setDescription(const String &s);
281
282 void setText(const String &text) override;
283 void setText(const StringList &fields);
284
298 PropertyMap asProperties() const override;
299
305
309 static String keyToTXXX(const String &);
310
314 static String txxxToKey(const String &);
315
316 private:
318
319 void checkFields();
320
321 class UserTextIdentificationFramePrivate;
323 std::unique_ptr<UserTextIdentificationFramePrivate> d;
324 };
325
326 } // namespace ID3v2
327} // namespace TagLib
328#endif
A byte vector.
Definition tbytevector.h:46
ID3v2 frame header implementation.
Definition id3v2frame.h:293
Frame(const Frame &)=delete
The main class in the ID3v2 implementation.
Definition id3v2tag.h:134
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
friend class FrameFactory
Definition textidentificationframe.h:108
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
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)
friend class FrameFactory
Definition textidentificationframe.h:243
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:123
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
An ID3v2 implementation.
Definition flacfile.h:39
Map< String, String > KeyConversionMap
Definition textidentificationframe.h:39
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