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_FLACFILE_H
00027 #define TAGLIB_FLACFILE_H
00028
00029 #include "taglib_export.h"
00030 #include "tfile.h"
00031 #include "tlist.h"
00032 #include "tag.h"
00033
00034 #include "flacpicture.h"
00035 #include "flacproperties.h"
00036
00037 namespace TagLib {
00038
00039 class Tag;
00040 namespace ID3v2 { class FrameFactory; class Tag; }
00041 namespace ID3v1 { class Tag; }
00042 namespace Ogg { class XiphComment; }
00043
00045
00055 namespace FLAC {
00056
00058
00066 class TAGLIB_EXPORT File : public TagLib::File
00067 {
00068 public:
00078 File(FileName file, bool readProperties = true,
00079 Properties::ReadStyle propertiesStyle = Properties::Average);
00080
00090
00091 File(FileName file, ID3v2::FrameFactory *frameFactory,
00092 bool readProperties = true,
00093 Properties::ReadStyle propertiesStyle = Properties::Average);
00094
00107
00108 File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
00109 bool readProperties = true,
00110 Properties::ReadStyle propertiesStyle = Properties::Average);
00111
00115 virtual ~File();
00116
00125 virtual TagLib::Tag *tag() const;
00126
00133 PropertyMap properties() const;
00134
00135 void removeUnsupportedProperties(const StringList &);
00136
00144 PropertyMap setProperties(const PropertyMap &);
00145
00150 virtual Properties *audioProperties() const;
00151
00162 virtual bool save();
00163
00181 ID3v2::Tag *ID3v2Tag(bool create = false);
00182
00200 ID3v1::Tag *ID3v1Tag(bool create = false);
00201
00219 Ogg::XiphComment *xiphComment(bool create = false);
00220
00229 void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
00230
00237 ByteVector streamInfoData();
00238
00245 long streamLength();
00246
00250 List<Picture *> pictureList();
00251
00256 void removePicture(Picture *picture, bool del = true);
00257
00261 void removePictures();
00262
00269 void addPicture(Picture *picture);
00270
00276 bool hasXiphComment() const;
00277
00283 bool hasID3v1Tag() const;
00284
00290 bool hasID3v2Tag() const;
00291
00292 private:
00293 File(const File &);
00294 File &operator=(const File &);
00295
00296 void read(bool readProperties);
00297 void scan();
00298 long findID3v2();
00299 long findID3v1();
00300
00301 class FilePrivate;
00302 FilePrivate *d;
00303 };
00304 }
00305 }
00306
00307 #endif