TagLib 1.7.2 (TagLib::ID3v2::UserTextIdentificationFrame Class Reference)

TagLib::ID3v2::UserTextIdentificationFrame Class Reference

An ID3v2 custom text identification frame implementationx. More...

#include <textidentificationframe.h>

Inheritance diagram for TagLib::ID3v2::UserTextIdentificationFrame:
Collaboration diagram for TagLib::ID3v2::UserTextIdentificationFrame:

List of all members.

Public Member Functions

 UserTextIdentificationFrame (String::Type encoding=String::Latin1)
 UserTextIdentificationFrame (const ByteVector &data)
virtual String toString () const
String description () const
void setDescription (const String &s)
StringList fieldList () const
void setText (const String &text)
void setText (const StringList &fields)
- Public Member Functions inherited from TagLib::ID3v2::TextIdentificationFrame
 TextIdentificationFrame (const ByteVector &type, String::Type encoding)
 TextIdentificationFrame (const ByteVector &data)
virtual ~TextIdentificationFrame ()
String::Type textEncoding () const
void setTextEncoding (String::Type encoding)
- Public Member Functions inherited from TagLib::ID3v2::Frame
virtual ~Frame ()
ByteVector frameID () const
uint size () const
void setData (const ByteVector &data)
ByteVector render () const
 Header (const ByteVector &data, bool synchSafeInts)
 Header (const ByteVector &data, uint version=4)
virtual ~Header ()
void setData (const ByteVector &data, bool synchSafeInts)
void setData (const ByteVector &data, uint version=4)
ByteVector frameID () const
void setFrameID (const ByteVector &id)
uint frameSize () const
void setFrameSize (uint size)
uint version () const
bool tagAlterPreservation () const
void setTagAlterPreservation (bool discard)
bool fileAlterPreservation () const
bool readOnly () const
bool groupingIdentity () const
bool compression () const
bool encryption () const
bool unsynchronisation () const
bool dataLengthIndicator () const
ByteVector render () const
bool frameAlterPreservation () const

Static Public Member Functions

static
UserTextIdentificationFrame
find (Tag *tag, const String &description)

Friends

class FrameFactory

Additional Inherited Members

- Protected Member Functions inherited from TagLib::ID3v2::TextIdentificationFrame
virtual void parseFields (const ByteVector &data)
virtual ByteVector renderFields () const
 TextIdentificationFrame (const ByteVector &data, Header *h)
- Protected Member Functions inherited from TagLib::ID3v2::Frame
 Frame (const ByteVector &data)
 Frame (Header *h)
Headerheader () const
void setHeader (Header *h, bool deleteCurrent=true)
void parse (const ByteVector &data)
ByteVector fieldData (const ByteVector &frameData) const
String readStringField (const ByteVector &data, String::Type encoding, int *positon=0)

Detailed Description

An ID3v2 custom text identification frame implementationx.

This is a specialization of text identification frames that allows for user defined entries. Each entry has a description in addition to the normal list of fields that a text identification frame has.

This description identifies the frame and must be unique.


Constructor & Destructor Documentation

TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame ( String::Type  encoding = String::Latin1)
explicit

Constructs an empty user defined text identification frame. For this to be a useful frame both a description and text must be set.

TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame ( const ByteVector data)
explicit

Creates a frame based on data.


Member Function Documentation

String TagLib::ID3v2::UserTextIdentificationFrame::description ( ) const

Returns the description for this frame.

StringList TagLib::ID3v2::UserTextIdentificationFrame::fieldList ( ) const

Returns a list of the strings in this frame.

Reimplemented from TagLib::ID3v2::TextIdentificationFrame.

static UserTextIdentificationFrame* TagLib::ID3v2::UserTextIdentificationFrame::find ( Tag tag,
const String description 
)
static

Searches for the user defined text frame with the description description in tag. This returns null if no matching frames were found.

void TagLib::ID3v2::UserTextIdentificationFrame::setDescription ( const String s)

Sets the description of the frame to s. s must be unique. You can check for the presence of another user defined text frame of the same type using find() and testing for null.

void TagLib::ID3v2::UserTextIdentificationFrame::setText ( const String text)
virtual

Set the text of frame in the sanest way possible. This should only be reimplemented in frames where there is some logical mapping to text.

Note:
If the frame type supports multiple text encodings, this will not change the text encoding of the frame; the string will be converted to that frame's encoding. Please use the specific APIs of the frame types to set the encoding if that is desired.

Reimplemented from TagLib::ID3v2::TextIdentificationFrame.

void TagLib::ID3v2::UserTextIdentificationFrame::setText ( const StringList l)

Text identification frames are a list of string fields.

This function will accept either a StringList or a String (using the StringList constructor that accepts a single String).

Note:
This will not change the text encoding of the frame even if the strings passed in are not of the same encoding. Please use setEncoding(s.type()) if you wish to change the encoding of the frame.

Reimplemented from TagLib::ID3v2::TextIdentificationFrame.

virtual String TagLib::ID3v2::UserTextIdentificationFrame::toString ( ) const
virtual

This returns the textual representation of the data in the frame. Subclasses must reimplement this method to provide a string representation of the frame's data.

Reimplemented from TagLib::ID3v2::TextIdentificationFrame.


Friends And Related Function Documentation

friend class FrameFactory
friend

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