![]() |
|
An ID3v2 custom text identification frame implementation. More...
#include <textidentificationframe.h>
Public Member Functions | |
UserTextIdentificationFrame (String::Type encoding=String::Latin1) | |
UserTextIdentificationFrame (const ByteVector &data) | |
UserTextIdentificationFrame (const String &description, const StringList &values, String::Type encoding=String::UTF8) | |
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) |
PropertyMap | asProperties () const |
![]() | |
TextIdentificationFrame (const ByteVector &type, String::Type encoding) | |
TextIdentificationFrame (const ByteVector &data) | |
virtual | ~TextIdentificationFrame () |
void | setText (const StringList &l) |
virtual void | setText (const String &s) |
virtual String | toString () const |
String::Type | textEncoding () const |
void | setTextEncoding (String::Type encoding) |
StringList | fieldList () const |
PropertyMap | asProperties () const |
![]() | |
virtual | ~Frame () |
ByteVector | frameID () const |
unsigned int | size () const |
void | setData (const ByteVector &data) |
virtual void | setText (const String &text) |
virtual String | toString () const =0 |
ByteVector | render () const |
Header (const ByteVector &data, bool synchSafeInts) | |
Header (const ByteVector &data, unsigned int version=4) | |
virtual | ~Header () |
void | setData (const ByteVector &data, bool synchSafeInts) |
void | setData (const ByteVector &data, unsigned int version=4) |
ByteVector | frameID () const |
void | setFrameID (const ByteVector &id) |
unsigned int | frameSize () const |
void | setFrameSize (unsigned int size) |
unsigned int | version () const |
void | setVersion (unsigned int version) |
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) |
![]() | |
static TextIdentificationFrame * | createTIPLFrame (const PropertyMap &properties) |
static TextIdentificationFrame * | createTMCLFrame (const PropertyMap &properties) |
static const KeyConversionMap & | involvedPeopleMap () |
![]() | |
static Frame * | createTextualFrame (const String &key, const StringList &values) |
static unsigned int | headerSize () |
static unsigned int | headerSize (unsigned int version) |
static ByteVector | textDelimiter (String::Type t) |
static unsigned int | size () |
static unsigned int | size (unsigned int version) |
Friends | |
class | FrameFactory |
Additional Inherited Members | |
![]() | |
static const String | instrumentPrefix |
static const String | commentPrefix |
static const String | lyricsPrefix |
static const String | urlPrefix |
![]() | |
virtual void | parseFields (const ByteVector &data) |
virtual ByteVector | renderFields () const |
TextIdentificationFrame (const ByteVector &data, Header *h) | |
![]() | |
Frame (const ByteVector &data) | |
Frame (Header *h) | |
Header * | header () const |
void | setHeader (Header *h, bool deleteCurrent=true) |
void | parse (const ByteVector &data) |
virtual void | parseFields (const ByteVector &data)=0 |
virtual ByteVector | renderFields () const =0 |
ByteVector | fieldData (const ByteVector &frameData) const |
String | readStringField (const ByteVector &data, String::Type encoding, int *positon=0) |
String::Type | checkTextEncoding (const StringList &fields, String::Type encoding) const |
PropertyMap | asProperties () const |
![]() | |
static String::Type | checkEncoding (const StringList &fields, String::Type encoding) |
static String::Type | checkEncoding (const StringList &fields, String::Type encoding, unsigned int version) |
static ByteVector | keyToFrameID (const String &) |
static String | frameIDToKey (const ByteVector &) |
static String | keyToTXXX (const String &) |
static String | txxxToKey (const String &) |
static void | splitProperties (const PropertyMap &original, PropertyMap &singleFrameProperties, PropertyMap &tiplProperties, PropertyMap &tmclProperties) |
An ID3v2 custom text identification frame implementation.
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.
|
explicit |
Constructs an empty user defined text identification frame. For this to be a useful frame both a description and text must be set.
|
explicit |
Creates a frame based on data.
TagLib::ID3v2::UserTextIdentificationFrame::UserTextIdentificationFrame | ( | const String & | description, |
const StringList & | values, | ||
String::Type | encoding = String::UTF8 |
||
) |
Creates a user defined text identification frame with the given description and values.
PropertyMap TagLib::ID3v2::UserTextIdentificationFrame::asProperties | ( | ) | const |
A UserTextIdentificationFrame is parsed into a PropertyMap as follows:
String TagLib::ID3v2::UserTextIdentificationFrame::description | ( | ) | const |
Returns the description for this frame.
StringList TagLib::ID3v2::UserTextIdentificationFrame::fieldList | ( | ) | const |
|
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.
|
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.
Reimplemented from TagLib::ID3v2::TextIdentificationFrame.
void TagLib::ID3v2::UserTextIdentificationFrame::setText | ( | const StringList & | fields | ) |
|
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.
|
friend |