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:
00073 enum TagTypes {
00075 NoTags = 0x0000,
00077 XiphComment = 0x0001,
00079 ID3v1 = 0x0002,
00081 ID3v2 = 0x0004,
00083 AllTags = 0xffff
00084 };
00085
00095 File(FileName file, bool readProperties = true,
00096 Properties::ReadStyle propertiesStyle = Properties::Average);
00097
00107
00108 File(FileName file, ID3v2::FrameFactory *frameFactory,
00109 bool readProperties = true,
00110 Properties::ReadStyle propertiesStyle = Properties::Average);
00111
00124
00125 File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
00126 bool readProperties = true,
00127 Properties::ReadStyle propertiesStyle = Properties::Average);
00128
00132 virtual ~File();
00133
00142 virtual TagLib::Tag *tag() const;
00143
00150 PropertyMap properties() const;
00151
00152 void removeUnsupportedProperties(const StringList &);
00153
00161 PropertyMap setProperties(const PropertyMap &);
00162
00167 virtual Properties *audioProperties() const;
00168
00176 virtual bool save();
00177
00195 ID3v2::Tag *ID3v2Tag(bool create = false);
00196
00214 ID3v1::Tag *ID3v1Tag(bool create = false);
00215
00233 Ogg::XiphComment *xiphComment(bool create = false);
00234
00243 void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
00244
00251 ByteVector streamInfoData();
00252
00259 long streamLength();
00260
00264 List<Picture *> pictureList();
00265
00270 void removePicture(Picture *picture, bool del = true);
00271
00275 void removePictures();
00276
00283 void addPicture(Picture *picture);
00284
00298 void strip(int tags = AllTags);
00299
00305 bool hasXiphComment() const;
00306
00312 bool hasID3v1Tag() const;
00313
00319 bool hasID3v2Tag() const;
00320
00321 private:
00322 File(const File &);
00323 File &operator=(const File &);
00324
00325 void read(bool readProperties);
00326 void scan();
00327
00328 class FilePrivate;
00329 FilePrivate *d;
00330 };
00331 }
00332 }
00333
00334 #endif