id3v2header.h

Go to the documentation of this file.
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_ID3V2HEADER_H
00023 #define TAGLIB_ID3V2HEADER_H
00024 
00025 #include <tbytevector.h>
00026 
00027 namespace TagLib {
00028 
00029   namespace ID3v2 {
00030 
00032 
00042     class Header
00043     {
00044     public:
00048       Header();
00049 
00054       Header(const ByteVector &data);
00055 
00059       virtual ~Header();
00060 
00065       uint majorVersion() const;
00066 
00071       uint revisionNumber() const;
00072 
00076       bool unsynchronisation() const;
00077 
00081       bool extendedHeader() const;
00082 
00086       bool experimentalIndicator() const;
00087 
00091       bool footerPresent() const;
00103       uint tagSize() const;
00104 
00111       uint completeTagSize() const;
00112 
00117       void setTagSize(uint s);
00118 
00122       static uint size();
00123 
00128       static ByteVector fileIdentifier();
00129 
00134       void setData(const ByteVector &data);
00135 
00139       ByteVector render() const;
00140 
00141     protected:
00146       void parse(const ByteVector &data);
00147 
00148     private:
00149       Header(const Header &);
00150       Header &operator=(const Header &);
00151 
00152       class HeaderPrivate;
00153       HeaderPrivate *d;
00154     };
00155 
00156   }
00157 }
00158 
00159 #endif