fileref.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TAGLIB_FILEREF_H
00023 #define TAGLIB_FILEREF_H
00024
00025 #include <tstringlist.h>
00026
00027 #include "audioproperties.h"
00028
00029 namespace TagLib {
00030
00031 class String;
00032 class File;
00033 class Tag;
00034
00036
00055 class FileRef
00056 {
00057 public:
00058
00060
00088 class FileTypeResolver
00089 {
00090 public:
00100 virtual File *createFile(const char *fileName,
00101 bool readAudioProperties = true,
00102 AudioProperties::ReadStyle
00103 audioPropertiesStyle = AudioProperties::Average) const = 0;
00104 };
00105
00109 FileRef();
00110
00120 explicit FileRef(const char *fileName,
00121 bool readAudioProperties = true,
00122 AudioProperties::ReadStyle
00123 audioPropertiesStyle = AudioProperties::Average);
00124
00129 explicit FileRef(File *file);
00130
00134 FileRef(const FileRef &ref);
00135
00139 virtual ~FileRef();
00140
00149 Tag *tag() const;
00150
00155 AudioProperties *audioProperties() const;
00156
00172 File *file() const;
00173
00177 bool save();
00178
00191 static const FileTypeResolver *addFileTypeResolver(const FileTypeResolver *resolver);
00192
00209 static StringList defaultFileExtensions();
00210
00214 bool isNull() const;
00215
00219 FileRef &operator=(const FileRef &ref);
00220
00224 bool operator==(const FileRef &ref) const;
00225
00230 bool operator!=(const FileRef &ref) const;
00231
00243 static File *create(const char *fileName,
00244 bool readAudioProperties = true,
00245 AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average);
00246
00247
00248 private:
00249 class FileRefPrivate;
00250 FileRefPrivate *d;
00251 };
00252
00253 }
00254
00255 #endif