TagLib API Documentation
Public Member Functions | Friends | List of all members
TagLib::ASF::Tag Class Reference

An implementation of ASF (WMA) tags. More...

#include <asftag.h>

Inheritance diagram for TagLib::ASF::Tag:
[legend]
Collaboration diagram for TagLib::ASF::Tag:
[legend]

Public Member Functions

 Tag ()
 
 ~Tag () override
 
 Tag (const Tag &)=delete
 
Tagoperator= (const Tag &)=delete
 
String title () const override
 
String artist () const override
 
String album () const override
 
String comment () const override
 
String genre () const override
 
virtual String rating () const
 
virtual String copyright () const
 
unsigned int year () const override
 
unsigned int track () const override
 
void setTitle (const String &value) override
 
void setArtist (const String &value) override
 
void setAlbum (const String &value) override
 
void setComment (const String &value) override
 
virtual void setRating (const String &value)
 
virtual void setCopyright (const String &value)
 
void setGenre (const String &value) override
 
void setYear (unsigned int value) override
 
void setTrack (unsigned int value) override
 
bool isEmpty () const override
 
AttributeListMapattributeListMap ()
 
const AttributeListMapattributeListMap () const
 
bool contains (const String &key) const
 
void removeItem (const String &key)
 
AttributeList attribute (const String &name) const
 
void setAttribute (const String &name, const Attribute &attribute)
 
void setAttribute (const String &name, const AttributeList &values)
 
void addAttribute (const String &name, const Attribute &attribute)
 
PropertyMap properties () const override
 
void removeUnsupportedProperties (const StringList &props) override
 
PropertyMap setProperties (const PropertyMap &props) override
 
StringList complexPropertyKeys () const override
 
List< VariantMapcomplexProperties (const String &key) const override
 
bool setComplexProperties (const String &key, const List< VariantMap > &value) override
 
- Public Member Functions inherited from TagLib::Tag
virtual ~Tag ()
 
 Tag (const Tag &)=delete
 
Tagoperator= (const Tag &)=delete
 
virtual PropertyMap properties () const
 
virtual void removeUnsupportedProperties (const StringList &properties)
 
virtual PropertyMap setProperties (const PropertyMap &origProps)
 
virtual StringList complexPropertyKeys () const
 
virtual List< VariantMapcomplexProperties (const String &key) const
 
virtual bool setComplexProperties (const String &key, const List< VariantMap > &value)
 
virtual String title () const =0
 
virtual String artist () const =0
 
virtual String album () const =0
 
virtual String comment () const =0
 
virtual String genre () const =0
 
virtual unsigned int year () const =0
 
virtual unsigned int track () const =0
 
virtual void setTitle (const String &s)=0
 
virtual void setArtist (const String &s)=0
 
virtual void setAlbum (const String &s)=0
 
virtual void setComment (const String &s)=0
 
virtual void setGenre (const String &s)=0
 
virtual void setYear (unsigned int i)=0
 
virtual void setTrack (unsigned int i)=0
 
virtual bool isEmpty () const
 

Friends

class File
 

Additional Inherited Members

- Static Public Member Functions inherited from TagLib::Tag
static void duplicate (const Tag *source, Tag *target, bool overwrite=true)
 
static String joinTagValues (const StringList &values)
 
- Protected Member Functions inherited from TagLib::Tag
 Tag ()
 

Detailed Description

An implementation of ASF (WMA) tags.

Constructor & Destructor Documentation

◆ Tag() [1/2]

TagLib::ASF::Tag::Tag ( )

◆ ~Tag()

TagLib::ASF::Tag::~Tag ( )
overridevirtual

Destroys this Tag instance.

Reimplemented from TagLib::Tag.

◆ Tag() [2/2]

TagLib::ASF::Tag::Tag ( const Tag )
delete

Member Function Documentation

◆ addAttribute()

void TagLib::ASF::Tag::addAttribute ( const String name,
const Attribute attribute 
)

Sets the name attribute to the value of attribute. If an attribute with the name is already present, it will be added to the list.

◆ album()

String TagLib::ASF::Tag::album ( ) const
overridevirtual

Returns the album name; if no album name is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ artist()

String TagLib::ASF::Tag::artist ( ) const
overridevirtual

Returns the artist name.

Implements TagLib::Tag.

◆ attribute()

AttributeList TagLib::ASF::Tag::attribute ( const String name) const
Returns
The list of values for the key name, or an empty list if no values have been set.

◆ attributeListMap() [1/2]

AttributeListMap & TagLib::ASF::Tag::attributeListMap ( )
Warning
You should not modify this data structure directly, instead use attributeListMap() const, contains(), removeItem(), attribute(), setAttribute(), addAttribute().

◆ attributeListMap() [2/2]

const AttributeListMap & TagLib::ASF::Tag::attributeListMap ( ) const

Returns a reference to the item list map. This is an AttributeListMap of all of the items in the tag.

◆ comment()

String TagLib::ASF::Tag::comment ( ) const
overridevirtual

Returns the track comment.

Implements TagLib::Tag.

◆ complexProperties()

List< VariantMap > TagLib::ASF::Tag::complexProperties ( const String key) const
overridevirtual

Get the complex properties for a given key. In order to be flexible for different metadata formats, the properties are represented as variant maps. Despite this dynamic nature, some degree of standardization should be achieved between formats:

  • PICTURE
    • data: ByteVector with picture data
    • description: String with description
    • pictureType: String with type as specified for ID3v2, e.g. "Front Cover", "Back Cover", "Band"
    • mimeType: String with image format, e.g. "image/jpeg"
    • optionally more information found in the tag, such as "width", "height", "numColors", "colorDepth" int values in FLAC pictures
  • GENERALOBJECT
    • data: ByteVector with object data
    • description: String with description
    • fileName: String with file name
    • mimeType: String with MIME type
    • this is currently only implemented for ID3v2 GEOB frames

Reimplemented from TagLib::Tag.

◆ complexPropertyKeys()

StringList TagLib::ASF::Tag::complexPropertyKeys ( ) const
overridevirtual

Get the keys of complex properties, i.e. properties which cannot be represented simply by a string. Because such properties might be expensive to fetch, there are separate operations to get the available keys - which is expected to be cheap - and getting and setting the property values. The default implementation returns only an empty list. Reimplementations should provide "PICTURE" if embedded cover art is present, and optionally support other properties.

Reimplemented from TagLib::Tag.

◆ contains()

bool TagLib::ASF::Tag::contains ( const String key) const
Returns
true if a value for key is currently set.

◆ copyright()

virtual String TagLib::ASF::Tag::copyright ( ) const
virtual

Returns the copyright information; if no copyright information is present in the tag an empty string will be returned.

◆ genre()

String TagLib::ASF::Tag::genre ( ) const
overridevirtual

Returns the genre name; if no genre is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ isEmpty()

bool TagLib::ASF::Tag::isEmpty ( ) const
overridevirtual

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.

◆ operator=()

Tag & TagLib::ASF::Tag::operator= ( const Tag )
delete

◆ properties()

PropertyMap TagLib::ASF::Tag::properties ( ) const
overridevirtual

Exports the tags of the file as dictionary mapping (human readable) tag names (Strings) to StringLists of tag values. The default implementation in this class considers only the usual built-in tags (artist, album, ...) and only one value per key.

Reimplemented from TagLib::Tag.

◆ rating()

virtual String TagLib::ASF::Tag::rating ( ) const
virtual

Returns the rating.

◆ removeItem()

void TagLib::ASF::Tag::removeItem ( const String key)

Removes the key attribute from the tag

◆ removeUnsupportedProperties()

void TagLib::ASF::Tag::removeUnsupportedProperties ( const StringList properties)
overridevirtual

Removes unsupported properties, or a subset of them, from the tag. The parameter properties must contain only entries from properties().unsupportedData().

Reimplemented from TagLib::Tag.

◆ setAlbum()

void TagLib::ASF::Tag::setAlbum ( const String value)
overridevirtual

Sets the album to value. If value is an empty string then this value will be cleared.

Implements TagLib::Tag.

◆ setArtist()

void TagLib::ASF::Tag::setArtist ( const String value)
overridevirtual

Sets the artist to value.

Implements TagLib::Tag.

◆ setAttribute() [1/2]

void TagLib::ASF::Tag::setAttribute ( const String name,
const Attribute attribute 
)

Sets the name attribute to the value of attribute. If an attribute with the name is already present, it will be replaced.

◆ setAttribute() [2/2]

void TagLib::ASF::Tag::setAttribute ( const String name,
const AttributeList values 
)

Sets multiple values to the key name.

◆ setComment()

void TagLib::ASF::Tag::setComment ( const String value)
overridevirtual

Sets the comment to value.

Implements TagLib::Tag.

◆ setComplexProperties()

bool TagLib::ASF::Tag::setComplexProperties ( const String key,
const List< VariantMap > &  value 
)
overridevirtual

Set all complex properties for a given key using variant maps as value with the same format as returned by complexProperties(). An empty list as value removes all complex properties for key.

Reimplemented from TagLib::Tag.

◆ setCopyright()

virtual void TagLib::ASF::Tag::setCopyright ( const String value)
virtual

Sets the copyright to value.

◆ setGenre()

void TagLib::ASF::Tag::setGenre ( const String value)
overridevirtual

Sets the genre to value.

Implements TagLib::Tag.

◆ setProperties()

PropertyMap TagLib::ASF::Tag::setProperties ( const PropertyMap origProps)
overridevirtual

Sets the tags of this File to those specified in origProps. This default implementation sets only the tags for which setter methods exist in this class (artist, album, ...), and only one value per key; the rest will be contained in the returned PropertyMap.

Reimplemented from TagLib::Tag.

◆ setRating()

virtual void TagLib::ASF::Tag::setRating ( const String value)
virtual

Sets the rating to value.

◆ setTitle()

void TagLib::ASF::Tag::setTitle ( const String value)
overridevirtual

Sets the title to value.

Implements TagLib::Tag.

◆ setTrack()

void TagLib::ASF::Tag::setTrack ( unsigned int  value)
overridevirtual

Sets the track to value. If value is 0 then this value will be cleared.

Implements TagLib::Tag.

◆ setYear()

void TagLib::ASF::Tag::setYear ( unsigned int  value)
overridevirtual

Sets the year to value. If value is 0 then this value will be cleared.

Implements TagLib::Tag.

◆ title()

String TagLib::ASF::Tag::title ( ) const
overridevirtual

Returns the track name.

Implements TagLib::Tag.

◆ track()

unsigned int TagLib::ASF::Tag::track ( ) const
overridevirtual

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

Implements TagLib::Tag.

◆ year()

unsigned int TagLib::ASF::Tag::year ( ) const
overridevirtual

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

Implements TagLib::Tag.

Friends And Related Function Documentation

◆ File

friend class File
friend

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