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 #ifndef TAGLIB_APETAG_H
00023 #define TAGLIB_APETAG_H
00024
00025 #include <tag.h>
00026 #include <tbytevector.h>
00027 #include <tmap.h>
00028 #include <tstring.h>
00029
00030 #include "apeitem.h"
00031
00032 namespace TagLib {
00033
00034 class File;
00035
00037
00038 namespace APE {
00039
00040 class Footer;
00041
00047 typedef Map<const String, Item> ItemListMap;
00048
00049
00051
00052 class Tag : public TagLib::Tag
00053 {
00054 public:
00058 Tag();
00059
00064 Tag(File *file, long tagOffset);
00065
00069 virtual ~Tag();
00070
00075 ByteVector render() const;
00076
00081 static ByteVector fileIdentifier();
00082
00083
00084
00085 virtual String title() const;
00086 virtual String artist() const;
00087 virtual String album() const;
00088 virtual String comment() const;
00089 virtual String genre() const;
00090 virtual uint year() const;
00091 virtual uint track() const;
00092
00093 virtual void setTitle(const String &s);
00094 virtual void setArtist(const String &s);
00095 virtual void setAlbum(const String &s);
00096 virtual void setComment(const String &s);
00097 virtual void setGenre(const String &s);
00098 virtual void setYear(uint i);
00099 virtual void setTrack(uint i);
00100
00104 Footer *footer() const;
00105
00115 const ItemListMap &itemListMap() const;
00116
00120 void removeItem(const String &key);
00121
00127 void addValue(const String &key, const String &value, bool replace = true);
00128
00133 void setItem(const String &key, const Item &item);
00134
00135 protected:
00136
00140 void read();
00141
00145 void parse(const ByteVector &data);
00146
00147 private:
00148 Tag(const Tag &);
00149 Tag &operator=(const Tag &);
00150
00151 class TagPrivate;
00152 TagPrivate *d;
00153 };
00154 }
00155 }
00156
00157 #endif