TagLib 1.7.2 (textidentificationframe.h Source File)

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 "taglib_export.h"
31 
32 #include "id3v2frame.h"
33 
34 namespace TagLib {
35 
36  namespace ID3v2 {
37 
38  class Tag;
39 
41 
105  {
106  friend class FrameFactory;
107 
108  public:
118  TextIdentificationFrame(const ByteVector &type, String::Type encoding);
119 
124  explicit TextIdentificationFrame(const ByteVector &data);
125 
129  virtual ~TextIdentificationFrame();
130 
141  void setText(const StringList &l);
142 
143  // Reimplementations.
144 
145  virtual void setText(const String &s);
146  virtual String toString() const;
147 
158  String::Type textEncoding() const;
159 
169  void setTextEncoding(String::Type encoding);
170 
174  StringList fieldList() const;
175 
176  protected:
177  // Reimplementations.
178 
179  virtual void parseFields(const ByteVector &data);
180  virtual ByteVector renderFields() const;
181 
185  TextIdentificationFrame(const ByteVector &data, Header *h);
186 
187  private:
190 
191  class TextIdentificationFramePrivate;
192  TextIdentificationFramePrivate *d;
193  };
194 
203 
204 
206  {
207  friend class FrameFactory;
208 
209  public:
215 
219  explicit UserTextIdentificationFrame(const ByteVector &data);
220 
221  virtual String toString() const;
222 
226  String description() const;
227 
233  void setDescription(const String &s);
234 
235  StringList fieldList() const;
236  void setText(const String &text);
237  void setText(const StringList &fields);
238 
243  static UserTextIdentificationFrame *find(Tag *tag, const String &description);
244 
245  private:
249 
250  void checkFields();
251 
252  class UserTextIdentificationFramePrivate;
253  UserTextIdentificationFramePrivate *d;
254  };
255 
256  }
257 }
258 #endif