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
00150 PropertyMap properties() const;
00151
00159 PropertyMap setProperties(const PropertyMap&);
00160
00164 static bool checkKey(const String&);
00165
00170 String vendorID() const;
00171
00179 void addField(const String &key, const String &value, bool replace = true);
00180
00185 void removeField(const String &key, const String &value = String::null);
00186
00192 bool contains(const String &key) const;
00193
00197 ByteVector render() const;
00198
00206 ByteVector render(bool addFramingBit) const;
00207
00208 protected:
00213 void parse(const ByteVector &data);
00214
00215 private:
00216 XiphComment(const XiphComment &);
00217 XiphComment &operator=(const XiphComment &);
00218
00219 class XiphCommentPrivate;
00220 XiphCommentPrivate *d;
00221 };
00222 }
00223 }
00224
00225 #endif