![]() |
|
00001 /*************************************************************************** 00002 copyright : (C) 2002 - 2008 by Scott Wheeler 00003 email : wheeler@kde.org 00004 00005 copyright : (C) 2006 by Aaron VonderHaar 00006 email : avh4@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * This library is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU Lesser General Public License version * 00012 * 2.1 as published by the Free Software Foundation. * 00013 * * 00014 * This library is distributed in the hope that it will be useful, but * 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00017 * Lesser General Public License for more details. * 00018 * * 00019 * You should have received a copy of the GNU Lesser General Public * 00020 * License along with this library; if not, write to the Free Software * 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 00022 * 02110-1301 USA * 00023 * * 00024 * Alternatively, this file is available under the Mozilla Public * 00025 * License Version 1.1. You may obtain a copy of the License at * 00026 * http://www.mozilla.org/MPL/ * 00027 ***************************************************************************/ 00028 00029 #ifndef TAGLIB_GENERALENCAPSULATEDOBJECT_H 00030 #define TAGLIB_GENERALENCAPSULATEDOBJECT_H 00031 00032 #include "id3v2frame.h" 00033 #include "id3v2header.h" 00034 #include "taglib_export.h" 00035 00036 namespace TagLib { 00037 00038 namespace ID3v2 { 00039 00041 00051 class TAGLIB_EXPORT GeneralEncapsulatedObjectFrame : public Frame 00052 { 00053 friend class FrameFactory; 00054 00055 public: 00056 00061 GeneralEncapsulatedObjectFrame(); 00062 00070 explicit GeneralEncapsulatedObjectFrame(const ByteVector &data); 00071 00075 virtual ~GeneralEncapsulatedObjectFrame(); 00076 00080 virtual String toString() const; 00081 00089 String::Type textEncoding() const; 00090 00097 void setTextEncoding(String::Type encoding); 00098 00102 String mimeType() const; 00103 00107 void setMimeType(const String &type); 00108 00114 String fileName() const; 00115 00121 void setFileName(const String &name); 00122 00131 String description() const; 00132 00141 void setDescription(const String &desc); 00142 00152 ByteVector object() const; 00153 00162 void setObject(const ByteVector &object); 00163 00164 protected: 00165 virtual void parseFields(const ByteVector &data); 00166 virtual ByteVector renderFields() const; 00167 00168 private: 00169 GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h); 00170 GeneralEncapsulatedObjectFrame(const GeneralEncapsulatedObjectFrame &); 00171 GeneralEncapsulatedObjectFrame &operator=(const GeneralEncapsulatedObjectFrame &); 00172 00173 class GeneralEncapsulatedObjectFramePrivate; 00174 GeneralEncapsulatedObjectFramePrivate *d; 00175 }; 00176 } 00177 } 00178 00179 #endif