TagLib::Ogg::XiphComment Class Reference
Ogg Vorbis comment implementation. More...
#include <xiphcomment.h>
Inheritance diagram for TagLib::Ogg::XiphComment:

Public Member Functions | |
XiphComment () | |
XiphComment (const ByteVector &data) | |
virtual | ~XiphComment () |
virtual String | title () const |
virtual String | artist () const |
virtual String | album () const |
virtual String | comment () const |
virtual String | genre () const |
virtual uint | year () const |
virtual uint | track () const |
virtual void | setTitle (const String &s) |
virtual void | setArtist (const String &s) |
virtual void | setAlbum (const String &s) |
virtual void | setComment (const String &s) |
virtual void | setGenre (const String &s) |
virtual void | setYear (uint i) |
virtual void | setTrack (uint i) |
virtual bool | isEmpty () const |
uint | fieldCount () const |
const FieldListMap & | fieldListMap () const |
String | vendorID () const |
void | addField (const String &key, const String &value, bool replace=true) |
void | removeField (const String &key, const String &value=String::null) |
ByteVector | render () const |
Protected Member Functions | |
void | parse (const ByteVector &data) |
Detailed Description
Ogg Vorbis comment implementation.This class is an implementation of the Ogg Vorbis comment specification, to be found in section 5 of the Ogg Vorbis specification. Because this format is also used in other (currently unsupported) Xiph.org formats, it has been made part of a generic implementation rather than being limited to strictly Vorbis.
Vorbis comments are a simple vector of keys and values, called fields. Multiple values for a given key are supported.
- See also:
- fieldListMap()
Definition at line 59 of file xiphcomment.h.
Constructor & Destructor Documentation
|
Constructs an empty Vorbis comment. |
|
Constructs a Vorbis comment from data. |
|
Destroys this instance of the XiphComment. |
Member Function Documentation
|
Returns the track name; if no track name is present in the tag String::null will be returned. Implements TagLib::Tag. |
|
Returns the artist name; if no artist name is present in the tag String::null will be returned. Implements TagLib::Tag. |
|
Returns the album name; if no album name is present in the tag String::null will be returned. Implements TagLib::Tag. |
|
Returns the track comment; if no comment is present in the tag String::null will be returned. Implements TagLib::Tag. |
|
Returns the genre name; if no genre is present in the tag String::null will be returned. Implements TagLib::Tag. |
|
Returns the year; if there is no year set, this will return 0. Implements TagLib::Tag. |
|
Returns the track number; if there is no track number set, this will return 0. Implements TagLib::Tag. |
|
Sets the title to s. If s is String::null then this value will be cleared. Implements TagLib::Tag. |
|
Sets the artist to s. If s is String::null then this value will be cleared. Implements TagLib::Tag. |
|
Sets the album to s. If s is String::null then this value will be cleared. Implements TagLib::Tag. |
|
Sets the album to s. If s is String::null then this value will be cleared. Implements TagLib::Tag. |
|
Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type's implementation. Implements TagLib::Tag. |
|
Sets the year to i. If s is 0 then this value will be cleared. Implements TagLib::Tag. |
|
Sets the track to i. If s is 0 then this value will be cleared. Implements TagLib::Tag. |
|
Returns true if the tag does not contain any data. This should be reimplemented in subclasses that provide more than the basic tagging abilities in this class. Reimplemented from TagLib::Tag. |
|
Returns the number of fields present in the comment. |
|
Returns a reference to the map of field lists. Because Xiph comments support multiple fields with the same key, a pure Map would not work. As such this is a Map of string lists, keyed on the comment field name. The standard set of Xiph/Vorbis fields (which may or may not be contained in any specific comment) is:
For a more detailed description of these fields, please see the Ogg Vorbis specification, section 5.2.2.1.
|
|
Returns the vendor ID of the Ogg Vorbis encoder. libvorbis 1.0 as the most common case always returns "Xiph.Org libVorbis I 20020717". |
|
Add the field specified by key with the data value. If replace is true, then all of the other fields with the same key will be removed first. If the field value is empty, the field will be removed. |
|
Remove the field specified by key with the data value. If value is null, all of the fields with the given key will be removed. |
|
Renders the comment to a ByteVector suitable for inserting into a file. |
|
Reads the tag from the file specified in the constructor and fills the FieldListMap. |
The documentation for this class was generated from the following file: