Miam-Player  0.8.0
A nice music player
TagLib::RIFF::Info::Tag Class Reference

The main class in the ID3v2 implementation. More...

#include <infotag.h>

Inheritance diagram for TagLib::RIFF::Info::Tag:
TagLib::Tag

Public Member Functions

 Tag ()
 Constructs an empty INFO tag. More...
 
 Tag (const ByteVector &data)
 Constructs an INFO tag read from data which is contents of "LIST" chunk. More...
 
virtual ~Tag ()
 Destroys this Tag instance. More...
 
virtual String title () const
 Returns the track name; if no track name is present in the tag String::null will be returned. More...
 
virtual String artist () const
 Returns the artist name; if no artist name is present in the tag String::null will be returned. More...
 
virtual String album () const
 Returns the album name; if no album name is present in the tag String::null will be returned. More...
 
virtual String comment () const
 Returns the track comment; if no comment is present in the tag String::null will be returned. More...
 
virtual String genre () const
 Returns the genre name; if no genre is present in the tag String::null will be returned. More...
 
virtual unsigned int year () const
 Returns the year; if there is no year set, this will return 0. More...
 
virtual unsigned int track () const
 Returns the track number; if there is no track number set, this will return 0. More...
 
virtual void setTitle (const String &s)
 Sets the title to s. More...
 
virtual void setArtist (const String &s)
 Sets the artist to s. More...
 
virtual void setAlbum (const String &s)
 Sets the album to s. More...
 
virtual void setComment (const String &s)
 Sets the comment to s. More...
 
virtual void setGenre (const String &s)
 Sets the genre to s. More...
 
virtual void setYear (unsigned int i)
 Sets the year to i. More...
 
virtual void setTrack (unsigned int i)
 Sets the track to i. More...
 
virtual bool isEmpty () const
 Returns true if the tag does not contain any data. More...
 
FieldListMap fieldListMap () const
 Returns a copy of the internal fields of the tag. More...
 
String fieldText (const ByteVector &id) const
 
void setFieldText (const ByteVector &id, const String &s)
 
void removeField (const ByteVector &id)
 
ByteVector render () const
 Render the tag back to binary data, suitable to be written to disk. More...
 
- Public Member Functions inherited from TagLib::Tag
PropertyMap properties () const
 Exports the tags of the file as dictionary mapping (human readable) tag names (Strings) to StringLists of tag values. More...
 
void removeUnsupportedProperties (const StringList &properties)
 Removes unsupported properties, or a subset of them, from the tag. More...
 
PropertyMap setProperties (const PropertyMap &properties)
 Sets the tags of this File to those specified in properties. More...
 

Static Public Member Functions

static void setStringHandler (const StringHandler *handler)
 Sets the string handler that decides how the text data will be converted to and from binary data. More...
 
- Static Public Member Functions inherited from TagLib::Tag
static void duplicate (const Tag *source, Tag *target, bool overwrite=true)
 Copies the generic data from one tag to another. More...
 

Protected Member Functions

void parse (const ByteVector &data)
 Pareses the body of the tag in data. More...
 
- Protected Member Functions inherited from TagLib::Tag
 Tag ()
 Construct a Tag. More...
 

Detailed Description

The main class in the ID3v2 implementation.

This is the main class in the INFO tag implementation. RIFF INFO tag is a metadata format found in WAV audio and AVI video files. Though it is a part of Microsoft/IBM's RIFF specification, the author could not find the official documents about it. So, this implementation is referring to unofficial documents online and some applications' behaviors especially Windows Explorer.

Constructor & Destructor Documentation

◆ Tag() [1/2]

TagLib::RIFF::Info::Tag::Tag ( )

Constructs an empty INFO tag.

◆ Tag() [2/2]

TagLib::RIFF::Info::Tag::Tag ( const ByteVector data)

Constructs an INFO tag read from data which is contents of "LIST" chunk.

◆ ~Tag()

virtual TagLib::RIFF::Info::Tag::~Tag ( )
virtual

Destroys this Tag instance.

Reimplemented from TagLib::Tag.

Member Function Documentation

◆ album()

virtual String TagLib::RIFF::Info::Tag::album ( ) const
virtual

Returns the album name; if no album name is present in the tag String::null will be returned.

Implements TagLib::Tag.

◆ artist()

virtual String TagLib::RIFF::Info::Tag::artist ( ) const
virtual

Returns the artist name; if no artist name is present in the tag String::null will be returned.

Implements TagLib::Tag.

◆ comment()

virtual String TagLib::RIFF::Info::Tag::comment ( ) const
virtual

Returns the track comment; if no comment is present in the tag String::null will be returned.

Implements TagLib::Tag.

◆ fieldListMap()

FieldListMap TagLib::RIFF::Info::Tag::fieldListMap ( ) const

Returns a copy of the internal fields of the tag.

The returned map directly reflects the contents of the "INFO" chunk.

Note
Modifying this map does not affect the tag's internal data. Use setFieldText() and removeField() instead.
See also
setFieldText()
removeField()

◆ fieldText()

String TagLib::RIFF::Info::Tag::fieldText ( const ByteVector id) const

◆ genre()

virtual String TagLib::RIFF::Info::Tag::genre ( ) const
virtual

Returns the genre name; if no genre is present in the tag String::null will be returned.

Implements TagLib::Tag.

◆ isEmpty()

virtual bool TagLib::RIFF::Info::Tag::isEmpty ( ) const
virtual

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.

◆ parse()

void TagLib::RIFF::Info::Tag::parse ( const ByteVector data)
protected

Pareses the body of the tag in data.

◆ removeField()

void TagLib::RIFF::Info::Tag::removeField ( const ByteVector id)

◆ render()

ByteVector TagLib::RIFF::Info::Tag::render ( ) const

Render the tag back to binary data, suitable to be written to disk.

Note
Returns empty ByteVector is the tag contains no fields.

◆ setAlbum()

virtual void TagLib::RIFF::Info::Tag::setAlbum ( const String s)
virtual

Sets the album to s.

If s is String::null then this value will be cleared.

Implements TagLib::Tag.

◆ setArtist()

virtual void TagLib::RIFF::Info::Tag::setArtist ( const String s)
virtual

Sets the artist to s.

If s is String::null then this value will be cleared.

Implements TagLib::Tag.

◆ setComment()

virtual void TagLib::RIFF::Info::Tag::setComment ( const String s)
virtual

Sets the comment to s.

If s is String::null then this value will be cleared.

Implements TagLib::Tag.

◆ setFieldText()

void TagLib::RIFF::Info::Tag::setFieldText ( const ByteVector id,
const String s 
)

◆ setGenre()

virtual void TagLib::RIFF::Info::Tag::setGenre ( const String s)
virtual

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.

◆ setStringHandler()

static void TagLib::RIFF::Info::Tag::setStringHandler ( const StringHandler handler)
static

Sets the string handler that decides how the text data will be converted to and from binary data.

If the parameter handler is null, the previous handler is released and default UTF-8 handler is restored.

Note
The caller is responsible for deleting the previous handler as needed after it is released.
See also
StringHandler

◆ setTitle()

virtual void TagLib::RIFF::Info::Tag::setTitle ( const String s)
virtual

Sets the title to s.

If s is String::null then this value will be cleared.

Implements TagLib::Tag.

◆ setTrack()

virtual void TagLib::RIFF::Info::Tag::setTrack ( unsigned int  i)
virtual

Sets the track to i.

If s is 0 then this value will be cleared.

Implements TagLib::Tag.

◆ setYear()

virtual void TagLib::RIFF::Info::Tag::setYear ( unsigned int  i)
virtual

Sets the year to i.

If s is 0 then this value will be cleared.

Implements TagLib::Tag.

◆ title()

virtual String TagLib::RIFF::Info::Tag::title ( ) const
virtual

Returns the track name; if no track name is present in the tag String::null will be returned.

Implements TagLib::Tag.

◆ track()

virtual unsigned int TagLib::RIFF::Info::Tag::track ( ) const
virtual

Returns the track number; if there is no track number set, this will return 0.

Implements TagLib::Tag.

◆ year()

virtual unsigned int TagLib::RIFF::Info::Tag::year ( ) const
virtual

Returns the year; if there is no year set, this will return 0.

Implements TagLib::Tag.


The documentation for this class was generated from the following file: