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 #ifndef TAGLIB_FLACFILE_H
00023 #define TAGLIB_FLACFILE_H
00024
00025 #include <tfile.h>
00026
00027 #include "flacproperties.h"
00028
00029 namespace TagLib {
00030
00031 class Tag;
00032
00033 namespace ID3v2 { class FrameFactory; class Tag; }
00034 namespace ID3v1 { class Tag; }
00035 namespace Ogg { class XiphComment; }
00036
00038
00048 namespace FLAC {
00049
00051
00059 class File : public TagLib::File
00060 {
00061 public:
00070 File(const char *file, bool readProperties = true,
00071 Properties::ReadStyle propertiesStyle = Properties::Average);
00072
00081
00082 File(const char *file, ID3v2::FrameFactory *frameFactory,
00083 bool readProperties = true,
00084 Properties::ReadStyle propertiesStyle = Properties::Average);
00085
00089 virtual ~File();
00090
00099 virtual TagLib::Tag *tag() const;
00100
00105 virtual Properties *audioProperties() const;
00106
00114 virtual bool save();
00115
00127 ID3v2::Tag *ID3v2Tag(bool create = false);
00128
00140 ID3v1::Tag *ID3v1Tag(bool create = false);
00141
00153 Ogg::XiphComment *xiphComment(bool create = false);
00154
00162 void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
00163
00170 ByteVector streamInfoData();
00171
00178 long streamLength();
00179
00180 private:
00181 File(const File &);
00182 File &operator=(const File &);
00183
00184 void read(bool readProperties, Properties::ReadStyle propertiesStyle);
00185 void scan();
00186 long findID3v2();
00187 long findID3v1();
00188 ByteVector xiphCommentData();
00189
00190 class FilePrivate;
00191 FilePrivate *d;
00192 };
00193 }
00194 }
00195
00196 #endif