fileref.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_FILEREF_H
00023 #define TAGLIB_FILEREF_H
00024 
00025 #include "audioproperties.h"
00026 
00027 namespace TagLib {
00028 
00029   class String;
00030   class File;
00031   class Tag;
00032 
00034 
00068   class FileRef
00069   {
00070   public:
00071 
00072     FileRef();
00073 
00083     explicit FileRef(const char *fileName,
00084                      bool readAudioProperties = true,
00085                      AudioProperties::ReadStyle
00086                      audioPropertiesStyle = AudioProperties::Average);
00087 
00092     explicit FileRef(File *file);
00093 
00097     FileRef(const FileRef &ref);
00098 
00102     virtual ~FileRef();
00103 
00112     Tag *tag() const;
00113 
00118     AudioProperties *audioProperties() const;
00119 
00135     File *file() const;
00136 
00140     bool save();
00141 
00145     bool isNull() const;
00146 
00150     FileRef &operator=(const FileRef &ref);
00151 
00155     bool operator==(const FileRef &ref) const;
00156 
00161     bool operator!=(const FileRef &ref) const;
00162 
00172     static File *create(const char *fileName,
00173                         bool readAudioProperties = true,
00174                         AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average);
00175 
00176   private:
00177     class FileRefPrivate;
00178     FileRefPrivate *d;
00179   };
00180 
00181 } // namespace TagLib
00182 
00183 #endif