flacfile.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_FLACFILE_H
00027 #define TAGLIB_FLACFILE_H
00028
00029 #include "taglib_export.h"
00030 #include "tfile.h"
00031
00032 #include "flacproperties.h"
00033
00034 namespace TagLib {
00035
00036 class Tag;
00037
00038 namespace ID3v2 { class FrameFactory; class Tag; }
00039 namespace ID3v1 { class Tag; }
00040 namespace Ogg { class XiphComment; }
00041
00043
00053 namespace FLAC {
00054
00056
00064 class TAGLIB_EXPORT File : public TagLib::File
00065 {
00066 public:
00075 File(FileName file, bool readProperties = true,
00076 Properties::ReadStyle propertiesStyle = Properties::Average);
00077
00086
00087 File(FileName file, ID3v2::FrameFactory *frameFactory,
00088 bool readProperties = true,
00089 Properties::ReadStyle propertiesStyle = Properties::Average);
00090
00094 virtual ~File();
00095
00104 virtual TagLib::Tag *tag() const;
00105
00110 virtual Properties *audioProperties() const;
00111
00119 virtual bool save();
00120
00132 ID3v2::Tag *ID3v2Tag(bool create = false);
00133
00145 ID3v1::Tag *ID3v1Tag(bool create = false);
00146
00158 Ogg::XiphComment *xiphComment(bool create = false);
00159
00167 void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
00168
00175 ByteVector streamInfoData();
00176
00183 long streamLength();
00184
00185 private:
00186 File(const File &);
00187 File &operator=(const File &);
00188
00189 void read(bool readProperties, Properties::ReadStyle propertiesStyle);
00190 void scan();
00191 long findID3v2();
00192 long findID3v1();
00193 ByteVector xiphCommentData() const;
00194 long findPaddingBreak(long nextPageOffset, long targetOffset, bool *isLast);
00195
00196 class FilePrivate;
00197 FilePrivate *d;
00198 };
00199 }
00200 }
00201
00202 #endif