mpcfile.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_MPCFILE_H
00023 #define TAGLIB_MPCFILE_H
00024
00025 #include "tfile.h"
00026
00027 #include "mpcproperties.h"
00028
00029 namespace TagLib {
00030
00031 class Tag;
00032
00033 namespace ID3v1 { class Tag; }
00034 namespace APE { class Tag; }
00035
00037
00046 namespace MPC {
00047
00049
00058 class File : public TagLib::File
00059 {
00060 public:
00065 enum TagTypes {
00067 NoTags = 0x0000,
00069 ID3v1 = 0x0001,
00071 ID3v2 = 0x0002,
00073 APE = 0x0004,
00075 AllTags = 0xffff
00076 };
00077
00083 File(const char *file, bool readProperties = true,
00084 Properties::ReadStyle propertiesStyle = Properties::Average);
00085
00089 virtual ~File();
00090
00095 virtual TagLib::Tag *tag() const;
00096
00101 virtual Properties *audioProperties() const;
00102
00106 virtual bool save();
00107
00120 ID3v1::Tag *ID3v1Tag(bool create = false);
00121
00134 APE::Tag *APETag(bool create = false);
00135
00144 void remove(int tags = AllTags);
00145
00146 private:
00147 File(const File &);
00148 File &operator=(const File &);
00149
00150 void read(bool readProperties, Properties::ReadStyle propertiesStyle);
00151 void scan();
00152 long findAPE();
00153 long findID3v1();
00154 long findID3v2();
00155
00156 class FilePrivate;
00157 FilePrivate *d;
00158 };
00159 }
00160 }
00161
00162 #endif