xiphcomment.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_VORBISCOMMENT_H
00023 #define TAGLIB_VORBISCOMMENT_H
00024
00025 #include <tag.h>
00026 #include <tlist.h>
00027 #include <tmap.h>
00028 #include <tstring.h>
00029 #include <tstringlist.h>
00030 #include <tbytevector.h>
00031
00032 namespace TagLib {
00033
00034 namespace Ogg {
00035
00042 typedef Map<String, StringList> FieldListMap;
00043
00045
00059 class XiphComment : public TagLib::Tag
00060 {
00061 public:
00065 XiphComment();
00066
00070 XiphComment(const ByteVector &data);
00071
00075 virtual ~XiphComment();
00076
00077 virtual String title() const;
00078 virtual String artist() const;
00079 virtual String album() const;
00080 virtual String comment() const;
00081 virtual String genre() const;
00082 virtual uint year() const;
00083 virtual uint track() const;
00084
00085 virtual void setTitle(const String &s);
00086 virtual void setArtist(const String &s);
00087 virtual void setAlbum(const String &s);
00088 virtual void setComment(const String &s);
00089 virtual void setGenre(const String &s);
00090 virtual void setYear(uint i);
00091 virtual void setTrack(uint i);
00092
00093 virtual bool isEmpty() const;
00094
00098 uint fieldCount() const;
00099
00136 const FieldListMap &fieldListMap() const;
00137
00142 String vendorID() const;
00143
00151 void addField(const String &key, const String &value, bool replace = true);
00152
00157 void removeField(const String &key, const String &value = String::null);
00158
00162 ByteVector render() const;
00163
00171 ByteVector render(bool addFramingBit) const;
00172
00173 protected:
00178 void parse(const ByteVector &data);
00179
00180 private:
00181 XiphComment(const XiphComment &);
00182 XiphComment &operator=(const XiphComment &);
00183
00184 class XiphCommentPrivate;
00185 XiphCommentPrivate *d;
00186 };
00187 }
00188 }
00189
00190 #endif