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
00023
00024
00025
00026 #ifndef TAGLIB_FILEREF_H
00027 #define TAGLIB_FILEREF_H
00028
00029 #include "tfile.h"
00030 #include "tstringlist.h"
00031
00032 #include "taglib_export.h"
00033 #include "audioproperties.h"
00034
00035 namespace TagLib {
00036
00037 class Tag;
00038
00040
00059 class TAGLIB_EXPORT FileRef
00060 {
00061 public:
00062
00064
00092 class TAGLIB_EXPORT FileTypeResolver
00093 {
00094 TAGLIB_IGNORE_MISSING_DESTRUCTOR
00095 public:
00105 virtual File *createFile(FileName fileName,
00106 bool readAudioProperties = true,
00107 AudioProperties::ReadStyle
00108 audioPropertiesStyle = AudioProperties::Average) const = 0;
00109 };
00110
00114 FileRef();
00115
00125 explicit FileRef(FileName fileName,
00126 bool readAudioProperties = true,
00127 AudioProperties::ReadStyle
00128 audioPropertiesStyle = AudioProperties::Average);
00129
00134 explicit FileRef(File *file);
00135
00139 FileRef(const FileRef &ref);
00140
00144 virtual ~FileRef();
00145
00157 Tag *tag() const;
00158
00163 AudioProperties *audioProperties() const;
00164
00180 File *file() const;
00181
00185 bool save();
00186
00199 static const FileTypeResolver *addFileTypeResolver(const FileTypeResolver *resolver);
00200
00217 static StringList defaultFileExtensions();
00218
00222 bool isNull() const;
00223
00227 FileRef &operator=(const FileRef &ref);
00228
00232 bool operator==(const FileRef &ref) const;
00233
00238 bool operator!=(const FileRef &ref) const;
00239
00251 static File *create(FileName fileName,
00252 bool readAudioProperties = true,
00253 AudioProperties::ReadStyle audioPropertiesStyle = AudioProperties::Average);
00254
00255
00256 private:
00257 class FileRefPrivate;
00258 FileRefPrivate *d;
00259 };
00260
00261 }
00262
00263 #endif