![]() |
|
00001 /*************************************************************************** 00002 copyright : (C) 2002, 2003 by Scott Wheeler 00003 email : wheeler@kde.org 00004 ***************************************************************************/ 00005 00006 /*************************************************************************** 00007 * This library is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU Lesser General Public License version * 00009 * 2.1 as published by the Free Software Foundation. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, but * 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00014 * Lesser General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Lesser General Public * 00017 * License along with this library; if not, write to the Free Software * 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * 00019 * USA * 00020 ***************************************************************************/ 00021 00022 #ifndef TAGLIB_COMMENTSFRAME_H 00023 #define TAGLIB_COMMENTSFRAME_H 00024 00025 #include <id3v2frame.h> 00026 00027 namespace TagLib { 00028 00029 namespace ID3v2 { 00030 00032 00038 class CommentsFrame : public Frame 00039 { 00040 friend class FrameFactory; 00041 00042 public: 00047 explicit CommentsFrame(String::Type encoding = String::Latin1); 00048 00052 explicit CommentsFrame(const ByteVector &data); 00053 00057 virtual ~CommentsFrame(); 00058 00064 virtual String toString() const; 00065 00074 ByteVector language() const; 00075 00083 String description() const; 00084 00090 String text() const; 00091 00099 void setLanguage(const ByteVector &languageCode); 00100 00106 void setDescription(const String &s); 00107 00113 virtual void setText(const String &s); 00114 00123 String::Type textEncoding() const; 00124 00132 void setTextEncoding(String::Type encoding); 00133 00134 protected: 00135 // Reimplementations. 00136 00137 virtual void parseFields(const ByteVector &data); 00138 virtual ByteVector renderFields() const; 00139 00140 private: 00144 CommentsFrame(const ByteVector &data, Header *h); 00145 CommentsFrame(const CommentsFrame &); 00146 CommentsFrame &operator=(const CommentsFrame &); 00147 00148 class CommentsFramePrivate; 00149 CommentsFramePrivate *d; 00150 }; 00151 00152 } 00153 } 00154 #endif