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 "flacpicture.h"
00036 #include "taglib_export.h"
00037
00038 namespace TagLib {
00039
00040 namespace Ogg {
00041
00048 typedef Map<String, StringList> FieldListMap;
00049
00051
00065 class TAGLIB_EXPORT XiphComment : public TagLib::Tag
00066 {
00067 public:
00071 XiphComment();
00072
00076 XiphComment(const ByteVector &data);
00077
00081 virtual ~XiphComment();
00082
00083 virtual String title() const;
00084 virtual String artist() const;
00085 virtual String album() const;
00086 virtual String comment() const;
00087 virtual String genre() const;
00088 virtual unsigned int year() const;
00089 virtual unsigned int track() const;
00090
00091 virtual void setTitle(const String &s);
00092 virtual void setArtist(const String &s);
00093 virtual void setAlbum(const String &s);
00094 virtual void setComment(const String &s);
00095 virtual void setGenre(const String &s);
00096 virtual void setYear(unsigned int i);
00097 virtual void setTrack(unsigned int i);
00098
00099 virtual bool isEmpty() const;
00100
00104 unsigned int fieldCount() const;
00105
00142 const FieldListMap &fieldListMap() const;
00143
00151 PropertyMap properties() const;
00152
00160 PropertyMap setProperties(const PropertyMap&);
00161
00165 static bool checkKey(const String&);
00166
00171 String vendorID() const;
00172
00180 void addField(const String &key, const String &value, bool replace = true);
00181
00188
00189 void removeField(const String &key, const String &value = String::null);
00190
00196 void removeFields(const String &key);
00197
00203 void removeFields(const String &key, const String &value);
00204
00210 void removeAllFields();
00211
00217 bool contains(const String &key) const;
00218
00222 ByteVector render() const;
00223
00231 ByteVector render(bool addFramingBit) const;
00232
00233
00237 List<FLAC::Picture *> pictureList();
00238
00243 void removePicture(FLAC::Picture *picture, bool del = true);
00244
00248 void removeAllPictures();
00249
00256 void addPicture(FLAC::Picture *picture);
00257
00258 protected:
00263 void parse(const ByteVector &data);
00264
00265 private:
00266 XiphComment(const XiphComment &);
00267 XiphComment &operator=(const XiphComment &);
00268
00269 class XiphCommentPrivate;
00270 XiphCommentPrivate *d;
00271 };
00272 }
00273 }
00274
00275 #endif