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
00023
00024
00025
00026 #ifndef TAGLIB_VORBISCOMMENT_H
00027 #define TAGLIB_VORBISCOMMENT_H
00028
00029 #include "tag.h"
00030 #include "tlist.h"
00031 #include "tmap.h"
00032 #include "tstring.h"
00033 #include "tstringlist.h"
00034 #include "tbytevector.h"
00035 #include "taglib_export.h"
00036
00037 namespace TagLib {
00038
00039 namespace Ogg {
00040
00047 typedef Map<String, StringList> FieldListMap;
00048
00050
00064 class TAGLIB_EXPORT XiphComment : public TagLib::Tag
00065 {
00066 public:
00070 XiphComment();
00071
00075 XiphComment(const ByteVector &data);
00076
00080 virtual ~XiphComment();
00081
00082 virtual String title() const;
00083 virtual String artist() const;
00084 virtual String album() const;
00085 virtual String comment() const;
00086 virtual String genre() const;
00087 virtual uint year() const;
00088 virtual uint track() const;
00089
00090 virtual void setTitle(const String &s);
00091 virtual void setArtist(const String &s);
00092 virtual void setAlbum(const String &s);
00093 virtual void setComment(const String &s);
00094 virtual void setGenre(const String &s);
00095 virtual void setYear(uint i);
00096 virtual void setTrack(uint i);
00097
00098 virtual bool isEmpty() const;
00099
00103 uint fieldCount() const;
00104
00141 const FieldListMap &fieldListMap() const;
00142
00147 String vendorID() const;
00148
00156 void addField(const String &key, const String &value, bool replace = true);
00157
00162 void removeField(const String &key, const String &value = String::null);
00163
00169 bool contains(const String &key) const;
00170
00174 ByteVector render() const;
00175
00183 ByteVector render(bool addFramingBit) const;
00184
00185 protected:
00190 void parse(const ByteVector &data);
00191
00192 private:
00193 XiphComment(const XiphComment &);
00194 XiphComment &operator=(const XiphComment &);
00195
00196 class XiphCommentPrivate;
00197 XiphCommentPrivate *d;
00198 };
00199 }
00200 }
00201
00202 #endif