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:
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
00104
00105 File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
00106 bool readProperties = true,
00107 Properties::ReadStyle propertiesStyle = Properties::Average);
00108
00112 virtual ~File();
00113
00122 virtual TagLib::Tag *tag() const;
00123
00130 PropertyMap properties() const;
00131
00132 void removeUnsupportedProperties(const StringList &);
00133
00139 PropertyMap setProperties(const PropertyMap &);
00140
00145 virtual Properties *audioProperties() const;
00146
00154 virtual bool save();
00155
00167 ID3v2::Tag *ID3v2Tag(bool create = false);
00168
00180 ID3v1::Tag *ID3v1Tag(bool create = false);
00181
00193 Ogg::XiphComment *xiphComment(bool create = false);
00194
00202 void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
00203
00210 ByteVector streamInfoData();
00211
00218 long streamLength();
00219
00223 List<Picture *> pictureList();
00224
00229 void removePicture(Picture *picture, bool del = true);
00230
00234 void removePictures();
00235
00242 void addPicture(Picture *picture);
00243
00244 private:
00245 File(const File &);
00246 File &operator=(const File &);
00247
00248 void read(bool readProperties, Properties::ReadStyle propertiesStyle);
00249 void scan();
00250 long findID3v2();
00251 long findID3v1();
00252 ByteVector xiphCommentData() const;
00253 long findPaddingBreak(long nextPageOffset, long targetOffset, bool *isLast);
00254
00255 class FilePrivate;
00256 FilePrivate *d;
00257 };
00258 }
00259 }
00260
00261 #endif