apetag.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_APETAG_H
00027 #define TAGLIB_APETAG_H
00028
00029 #include "tag.h"
00030 #include "tbytevector.h"
00031 #include "tmap.h"
00032 #include "tstring.h"
00033 #include "taglib_export.h"
00034
00035 #include "apeitem.h"
00036
00037 namespace TagLib {
00038
00039 class File;
00040
00042
00043 namespace APE {
00044
00045 class Footer;
00046
00052 typedef Map<const String, Item> ItemListMap;
00053
00054
00056
00057 class TAGLIB_EXPORT Tag : public TagLib::Tag
00058 {
00059 public:
00063 Tag();
00064
00069 Tag(File *file, long footerLocation);
00070
00074 virtual ~Tag();
00075
00080 ByteVector render() const;
00081
00086 static ByteVector fileIdentifier();
00087
00088
00089
00090 virtual String title() const;
00091 virtual String artist() const;
00092 virtual String album() const;
00093 virtual String comment() const;
00094 virtual String genre() const;
00095 virtual uint year() const;
00096 virtual uint track() const;
00097
00098 virtual void setTitle(const String &s);
00099 virtual void setArtist(const String &s);
00100 virtual void setAlbum(const String &s);
00101 virtual void setComment(const String &s);
00102 virtual void setGenre(const String &s);
00103 virtual void setYear(uint i);
00104 virtual void setTrack(uint i);
00105
00109 Footer *footer() const;
00110
00120 const ItemListMap &itemListMap() const;
00121
00125 void removeItem(const String &key);
00126
00132 void addValue(const String &key, const String &value, bool replace = true);
00133
00138 void setItem(const String &key, const Item &item);
00139
00140 protected:
00141
00145 void read();
00146
00150 void parse(const ByteVector &data);
00151
00152 private:
00153 Tag(const Tag &);
00154 Tag &operator=(const Tag &);
00155
00156 class TagPrivate;
00157 TagPrivate *d;
00158 };
00159 }
00160 }
00161
00162 #endif