apefooter.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2004 by Allan Sandfeld Jensen
00003     email                : kde@carewolf.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_APEFOOTER_H
00023 #define TAGLIB_APEFOOTER_H
00024 
00025 #include <tbytevector.h>
00026 
00027 namespace TagLib {
00028 
00029   namespace APE {
00030 
00032 
00040     class Footer
00041     {
00042     public:
00046       Footer();
00047 
00052       Footer(const ByteVector &data);
00053 
00057       virtual ~Footer();
00058 
00062       uint version() const;
00063 
00067       bool headerPresent() const;
00068 
00072       bool footerPresent() const;
00073 
00077       bool isHeader() const;
00078 
00082       void setHeaderPresent(bool b) const;
00083 
00087       uint itemCount() const;
00088 
00093       void setItemCount(uint s);
00094 
00101       uint tagSize() const;
00102 
00109       uint completeTagSize() const;
00110 
00115       void setTagSize(uint s);
00116 
00120       static uint size();
00121 
00126       static ByteVector fileIdentifier();
00127 
00132       void setData(const ByteVector &data);
00133 
00137       ByteVector renderFooter() const;
00138 
00143       ByteVector renderHeader() const;
00144 
00145     protected:
00150       void parse(const ByteVector &data);
00151 
00155       ByteVector render(bool isHeader) const;
00156 
00157     private:
00158       Footer(const Footer &);
00159       Footer &operator=(const Footer &);
00160 
00161       class FooterPrivate;
00162       FooterPrivate *d;
00163     };
00164 
00165   }
00166 }
00167 
00168 #endif