TagLib 1.6.1 (TagLib: vorbisproperties.h Source File)

vorbisproperties.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2002 - 2008 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  *   Alternatively, this file is available under the Mozilla Public        *
00022  *   License Version 1.1.  You may obtain a copy of the License at         *
00023  *   http://www.mozilla.org/MPL/                                           *
00024  ***************************************************************************/
00025 
00026 #ifndef TAGLIB_VORBISPROPERTIES_H
00027 #define TAGLIB_VORBISPROPERTIES_H
00028 
00029 #include "taglib_export.h"
00030 #include "audioproperties.h"
00031 
00032 namespace TagLib {
00033 
00034 /*
00035  * This is just to make this appear to be in the Ogg namespace in the
00036  * documentation.  The typedef below will make this work with the current code.
00037  * In the next BIC version of TagLib this will be really moved into the Ogg
00038  * namespace.
00039  */
00040 
00041 #ifdef DOXYGEN
00042   namespace Ogg {
00043 #endif
00044 
00045   namespace Vorbis {
00046 
00047     class File;
00048 
00050 
00056     class TAGLIB_EXPORT Properties : public AudioProperties
00057     {
00058     public:
00063       Properties(File *file, ReadStyle style = Average);
00064 
00068       virtual ~Properties();
00069 
00070       // Reimplementations.
00071 
00072       virtual int length() const;
00073       virtual int bitrate() const;
00074       virtual int sampleRate() const;
00075       virtual int channels() const;
00076 
00080       int vorbisVersion() const;
00081 
00086       int bitrateMaximum() const;
00087 
00092       int bitrateNominal() const;
00093 
00098       int bitrateMinimum() const;
00099 
00100     private:
00101       Properties(const Properties &);
00102       Properties &operator=(const Properties &);
00103 
00104       void read();
00105 
00106       class PropertiesPrivate;
00107       PropertiesPrivate *d;
00108     };
00109   }
00110 
00111 /*
00112  * To keep compatibility with the current version put Vorbis in the Ogg namespace
00113  * only in the docs and provide a typedef to make it work.  In the next BIC
00114  * version this will be removed and it will only exist in the Ogg namespace.
00115  */
00116 
00117 #ifdef DOXYGEN
00118   }
00119 #else
00120   namespace Ogg { namespace Vorbis { typedef TagLib::AudioProperties AudioProperties; } }
00121 #endif
00122 
00123 }
00124 
00125 #endif