oggflacfile.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_OGGFLACFILE_H
00023 #define TAGLIB_OGGFLACFILE_H
00024 
00025 #include "oggfile.h"
00026 #include "xiphcomment.h"
00027 
00028 #include "flacproperties.h"
00029 
00030 namespace TagLib {
00031 
00032   class Tag;
00033 
00034   namespace Ogg {
00035 
00037 
00045   namespace FLAC {
00046 
00047     using TagLib::FLAC::Properties;
00048 
00050 
00058     class File : public Ogg::File
00059     {
00060     public:
00066       File(const char *file, bool readProperties = true,
00067            Properties::ReadStyle propertiesStyle = Properties::Average);
00068 
00072       virtual ~File();
00073 
00077       virtual XiphComment *tag() const;
00078 
00083       virtual Properties *audioProperties() const;
00084 
00089       virtual bool save();
00090 
00095       long streamLength();
00096 
00097     private:
00098       File(const File &);
00099       File &operator=(const File &);
00100 
00101       void read(bool readProperties, Properties::ReadStyle propertiesStyle);
00102       void scan();
00103       ByteVector streamInfoData();
00104       ByteVector xiphCommentData();
00105 
00106       class FilePrivate;
00107       FilePrivate *d;
00108     };
00109   } // namespace FLAC
00110   } // namespace Ogg
00111 } // namespace TagLib
00112 
00113 #endif