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_INFOTAG_H
00027 #define TAGLIB_INFOTAG_H
00028
00029 #include "tag.h"
00030 #include "tmap.h"
00031 #include "tstring.h"
00032 #include "tstringlist.h"
00033 #include "tbytevector.h"
00034 #include "taglib_export.h"
00035
00036 namespace TagLib {
00037
00038 class File;
00039
00041 namespace RIFF {
00042 namespace Info {
00043
00044 typedef Map<ByteVector, String> FieldListMap;
00045
00047
00060 class TAGLIB_EXPORT StringHandler
00061 {
00062 public:
00063 StringHandler();
00064 ~StringHandler();
00065
00070 virtual String parse(const ByteVector &data) const;
00071
00076 virtual ByteVector render(const String &s) const;
00077 };
00078
00080
00088 class TAGLIB_EXPORT Tag : public TagLib::Tag
00089 {
00090 public:
00094 Tag();
00095
00099 Tag(const ByteVector &data);
00100
00101 virtual ~Tag();
00102
00103
00104
00105 virtual String title() const;
00106 virtual String artist() const;
00107 virtual String album() const;
00108 virtual String comment() const;
00109 virtual String genre() const;
00110 virtual unsigned int year() const;
00111 virtual unsigned int track() const;
00112
00113 virtual void setTitle(const String &s);
00114 virtual void setArtist(const String &s);
00115 virtual void setAlbum(const String &s);
00116 virtual void setComment(const String &s);
00117 virtual void setGenre(const String &s);
00118 virtual void setYear(unsigned int i);
00119 virtual void setTrack(unsigned int i);
00120
00121 virtual bool isEmpty() const;
00122
00133 FieldListMap fieldListMap() const;
00134
00135
00136
00137
00138 String fieldText(const ByteVector &id) const;
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148 void setFieldText(const ByteVector &id, const String &s);
00149
00150
00151
00152
00153 void removeField(const ByteVector &id);
00154
00160 ByteVector render() const;
00161
00173 static void setStringHandler(const StringHandler *handler);
00174
00175 protected:
00179 void parse(const ByteVector &data);
00180
00181
00182 private:
00183 Tag(const Tag &);
00184 Tag &operator=(const Tag &);
00185
00186 class TagPrivate;
00187 TagPrivate *d;
00188 };
00189 }}
00190 }
00191
00192 #endif