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
00033 #include "flacpicture.h"
00034 #include "flacproperties.h"
00035
00036 namespace TagLib {
00037
00038 class Tag;
00039
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:
00077 File(FileName file, bool readProperties = true,
00078 Properties::ReadStyle propertiesStyle = Properties::Average);
00079
00088
00089 File(FileName file, ID3v2::FrameFactory *frameFactory,
00090 bool readProperties = true,
00091 Properties::ReadStyle propertiesStyle = Properties::Average);
00092
00096 virtual ~File();
00097
00106 virtual TagLib::Tag *tag() const;
00107
00112 virtual Properties *audioProperties() const;
00113
00121 virtual bool save();
00122
00134 ID3v2::Tag *ID3v2Tag(bool create = false);
00135
00147 ID3v1::Tag *ID3v1Tag(bool create = false);
00148
00160 Ogg::XiphComment *xiphComment(bool create = false);
00161
00169 void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
00170
00177 ByteVector streamInfoData();
00178
00185 long streamLength();
00186
00190 List<Picture *> pictureList();
00191
00195 void removePictures();
00196
00203 void addPicture(Picture *picture);
00204
00205 private:
00206 File(const File &);
00207 File &operator=(const File &);
00208
00209 void read(bool readProperties, Properties::ReadStyle propertiesStyle);
00210 void scan();
00211 long findID3v2();
00212 long findID3v1();
00213 ByteVector xiphCommentData() const;
00214 long findPaddingBreak(long nextPageOffset, long targetOffset, bool *isLast);
00215
00216 class FilePrivate;
00217 FilePrivate *d;
00218 };
00219 }
00220 }
00221
00222 #endif