TagLib API Documentation

oggpageheader.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 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_OGGPAGEHEADER_H
00023 #define TAGLIB_OGGPAGEHEADER_H
00024 
00025 #include <tlist.h>
00026 #include <tbytevector.h>
00027 
00028 namespace TagLib {
00029 
00030   namespace Ogg {
00031 
00032     class File;
00033 
00035 
00042     class PageHeader
00043     {
00044     public:
00050       PageHeader(File *file = 0, long pageOffset = -1);
00051 
00055       virtual ~PageHeader();
00056 
00060       bool isValid() const;
00061 
00069       List<int> packetSizes() const;
00070 
00077       void setPacketSizes(const List<int> &sizes);
00078 
00087       bool firstPacketContinued() const;
00088 
00095       void setFirstPacketContinued(bool continued);
00096 
00104       bool lastPacketCompleted() const;
00105 
00112       void setLastPacketCompleted(bool completed);
00113 
00119       bool firstPageOfStream() const;
00120 
00126       void setFirstPageOfStream(bool first);
00127 
00133       bool lastPageOfStream() const;
00134 
00140       void setLastPageOfStream(bool last);
00141 
00149       long long absoluteGranularPosition() const;
00150 
00158       void setAbsoluteGranularPosition(long long agp);
00159 
00167       uint streamSerialNumber() const;
00168 
00177       void setStreamSerialNumber(uint n);
00178 
00185       int pageSequenceNumber() const;
00186 
00192       void setPageSequenceNumber(int sequenceNumber);
00193 
00197       int size() const;
00198 
00203       int dataSize() const;
00204 
00211       ByteVector render() const;
00212 
00213     private:
00214       PageHeader(const PageHeader &);
00215       PageHeader &operator=(const PageHeader &);
00216 
00217       void read();
00218       ByteVector lacingValues() const;
00219 
00220       class PageHeaderPrivate;
00221       PageHeaderPrivate *d;
00222     };
00223 
00224   }
00225 }
00226 
00227 #endif
KDE Logo
This file is part of the documentation for TagLib Version 1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Jan 22 05:44:21 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003