TagLib API Documentation
synchronizedlyricsframe.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2014 by Urs Fleisch
3 email : ufleisch@users.sourceforge.net
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_SYNCHRONIZEDLYRICSFRAME_H
27#define TAGLIB_SYNCHRONIZEDLYRICSFRAME_H
28
29#include "tlist.h"
30#include "id3v2frame.h"
31
32namespace TagLib {
33
34 namespace ID3v2 {
35
37
41 {
42 friend class FrameFactory;
43
44 public:
45
51 Unknown = 0x00,
54 AbsoluteMpegFrames = 0x01,
57 AbsoluteMilliseconds = 0x02
58 };
59
63 enum Type {
65 Other = 0x00,
67 Lyrics = 0x01,
69 TextTranscription = 0x02,
71 Movement = 0x03,
73 Events = 0x04,
75 Chord = 0x05,
77 Trivia = 0x06,
79 WebpageUrls = 0x07,
81 ImageUrls = 0x08
82 };
83
87 struct SynchedText {
88 SynchedText(unsigned int ms, const String &str) :
89 time(ms), text(str) { }
90 unsigned int time;
92 };
93
98
104
108 explicit SynchronizedLyricsFrame(const ByteVector &data);
109
114
117
123 String toString() const override;
124
134
144
149
153 Type type() const;
154
163
168
177
185 void setLanguage(const ByteVector &languageEncoding);
186
193
199 void setType(Type t);
200
206 void setDescription(const String &s);
207
214
215 protected:
216 // Reimplementations.
217
218 void parseFields(const ByteVector &data) override;
219 ByteVector renderFields() const override;
220
221 private:
226
227 class SynchronizedLyricsFramePrivate;
229 std::unique_ptr<SynchronizedLyricsFramePrivate> d;
230 };
231
232 } // namespace ID3v2
233} // namespace TagLib
234#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
ID3v2 synchronized lyrics frame.
Definition: synchronizedlyricsframe.h:41
SynchronizedLyricsFrame & operator=(const SynchronizedLyricsFrame &)=delete
void setDescription(const String &s)
void setSynchedText(const SynchedTextList &t)
void setTextEncoding(String::Type encoding)
TimestampFormat timestampFormat() const
void setLanguage(const ByteVector &languageEncoding)
Type
Definition: synchronizedlyricsframe.h:63
SynchronizedLyricsFrame(String::Type encoding=String::Latin1)
void parseFields(const ByteVector &data) override
ByteVector renderFields() const override
String toString() const override
SynchronizedLyricsFrame(const SynchronizedLyricsFrame &)=delete
TimestampFormat
Definition: synchronizedlyricsframe.h:49
void setTimestampFormat(TimestampFormat f)
SynchedTextList synchedText() const
SynchronizedLyricsFrame(const ByteVector &data)
A generic, implicitly shared list.
Definition: tlist.h:54
A wide string class suitable for unicode.
Definition: tstring.h:83
Type
Definition: tstring.h:96
@ Latin1
Definition: tstring.h:100
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
Definition: synchronizedlyricsframe.h:87
unsigned int time
Definition: synchronizedlyricsframe.h:90
String text
Definition: synchronizedlyricsframe.h:91
SynchedText(unsigned int ms, const String &str)
Definition: synchronizedlyricsframe.h:88
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55