#include <id3v2frame.h>
Inheritance diagram for TagLib::ID3v2::Frame:
Public Member Functions | |
virtual | ~Frame () |
ByteVector | frameID () const |
uint | size () const |
void | setData (const ByteVector &data) |
virtual void | setText (const String &text) |
virtual String | toString () const =0 |
ByteVector | render () const |
Static Public Member Functions | |
uint | headerSize () |
uint | headerSize (uint version) |
ByteVector | textDelimiter (String::Type t) |
Protected Member Functions | |
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 |
This class is the main ID3v2 frame implementation. In ID3v2, a tag is split between a collection of frames (which are in turn split into fields (Structure, 4) (Frames). This class provides an API for gathering information about and modifying ID3v2 frames. Funtionallity specific to a given frame type is handed in one of the many subclasses.
|
Destroys this Frame instance. |
|
Constructs an ID3v2 frame using data to read the header information. All other processing of data should be handled in a subclass.
|
|
This creates an Frame using the header h. The ownership of this header will be assigned to the frame and the header will be deleted when the frame is destroyed. |
|
|
Returns a pointer to the frame header. |
|
Returns the size of the frame header for the given ID3v2 version.
|
|
Returns the size of the frame header
|
|
Called by setData() to parse the frame data. It makes this information available through the public API. |
|
Called by parse() to parse the field data. It makes this information available through the public API. This must be overridden by the subclasses. Implemented in TagLib::ID3v2::CommentsFrame, TagLib::ID3v2::TextIdentificationFrame, and TagLib::ID3v2::UnknownFrame. |
|
Render the frame back to its binary format in a ByteVector. |
|
Render the field data back to a binary format in a ByteVector. This must be overridden by subclasses. Implemented in TagLib::ID3v2::CommentsFrame, TagLib::ID3v2::TextIdentificationFrame, and TagLib::ID3v2::UnknownFrame. |
|
Sets the data that will be used as the frame. Since the length is not known before the frame has been parsed, this should just be a pointer to the first byte of the frame. It will determine the length internally and make that available through size(). |
|
Sets the header to h. If deleteCurrent is true, this will free the memory of the current header. The ownership of this header will be assigned to the frame and the header will be deleted when the frame is destroyed. |
|
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 in TagLib::ID3v2::CommentsFrame, and TagLib::ID3v2::TextIdentificationFrame. |
|
Returns the size of the frame. |
|
Returns the text delimiter that is used between fields for the string type t. |
|
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. Implemented in TagLib::ID3v2::CommentsFrame, TagLib::ID3v2::TextIdentificationFrame, and TagLib::ID3v2::UnknownFrame. |