1 /***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.org
4 copyright : (C) 2006 by Urs Fleisch
5 email : ufleisch@users.sourceforge.net
6 ***************************************************************************/
8 /***************************************************************************
9 * This library is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU Lesser General Public License version *
11 * 2.1 as published by the Free Software Foundation. *
13 * This library is distributed in the hope that it will be useful, but *
14 * WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
23 * Alternatively, this file is available under the Mozilla Public *
24 * License Version 1.1. You may obtain a copy of the License at *
25 * http://www.mozilla.org/MPL/ *
26 ***************************************************************************/
28 #ifndef TAGLIB_UNSYNCHRONIZEDLYRICSFRAME_H
29 #define TAGLIB_UNSYNCHRONIZEDLYRICSFRAME_H
31 #include "id3v2frame.h"
37 //! ID3v2 unsynchronized lyrics frame
39 * An implementation of ID3v2 unsynchronized lyrics.
41 class TAGLIB_EXPORT UnsynchronizedLyricsFrame : public Frame
43 friend class FrameFactory;
47 * Construct an empty unsynchronized lyrics frame that will use the text encoding
50 explicit UnsynchronizedLyricsFrame(String::Type encoding = String::Latin1);
53 * Construct a unsynchronized lyrics frame based on the data in \a data.
55 explicit UnsynchronizedLyricsFrame(const ByteVector &data);
58 * Destroys this UnsynchronizedLyricsFrame instance.
60 virtual ~UnsynchronizedLyricsFrame();
63 * Returns the text of this unsynchronized lyrics frame.
67 virtual String toString() const;
70 * Returns the language encoding as a 3 byte encoding as specified by
71 * <a href="http://en.wikipedia.org/wiki/ISO_639">ISO-639-2</a>.
73 * \note Most taggers simply ignore this value.
77 ByteVector language() const;
80 * Returns the description of this unsynchronized lyrics frame.
82 * \note Most taggers simply ignore this value.
84 * \see setDescription()
86 String description() const;
89 * Returns the text of this unsynchronized lyrics frame.
96 * Set the language using the 3 byte language code from
97 * <a href="http://en.wikipedia.org/wiki/ISO_639">ISO-639-2</a> to
102 void setLanguage(const ByteVector &languageCode);
105 * Sets the description of the unsynchronized lyrics frame to \a s.
109 void setDescription(const String &s);
112 * Sets the text portion of the unsynchronized lyrics frame to \a s.
116 virtual void setText(const String &s);
119 * Returns the text encoding that will be used in rendering this frame.
120 * This defaults to the type that was either specified in the constructor
121 * or read from the frame when parsed.
123 * \see setTextEncoding()
126 String::Type textEncoding() const;
129 * Sets the text encoding to be used when rendering this frame to
132 * \see textEncoding()
135 void setTextEncoding(String::Type encoding);
138 // Reimplementations.
140 virtual void parseFields(const ByteVector &data);
141 virtual ByteVector renderFields() const;
145 * The constructor used by the FrameFactory.
147 UnsynchronizedLyricsFrame(const ByteVector &data, Header *h);
148 UnsynchronizedLyricsFrame(const UnsynchronizedLyricsFrame &);
149 UnsynchronizedLyricsFrame &operator=(const UnsynchronizedLyricsFrame &);
151 class UnsynchronizedLyricsFramePrivate;
152 UnsynchronizedLyricsFramePrivate *d;