TagLib::ID3v2::Frame Class Reference
ID3v2 frame implementation.
More...
#include <id3v2frame.h>
Inheritance diagram for TagLib::ID3v2::Frame:
List of all members.
Detailed Description
ID3v2 frame implementation.
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.
Definition at line 45 of file id3v2frame.h.
Constructor & Destructor Documentation
virtual TagLib::ID3v2::Frame::~Frame |
( |
|
) |
[virtual] |
|
|
Destroys this Frame instance. |
TagLib::ID3v2::Frame::Frame |
( |
const ByteVector & |
data |
) |
[explicit, protected] |
|
|
Constructs an ID3v2 frame using data to read the header information. All other processing of data should be handled in a subclass.
- Note:
- This need not contain anything more than a frame ID, but must constain at least that.
|
TagLib::ID3v2::Frame::Frame |
( |
Header * |
h |
) |
[protected] |
|
|
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. |
Member Function Documentation
ByteVector TagLib::ID3v2::Frame::frameID |
( |
|
) |
const |
|
|
Returns the Frame ID (Structure, 4) (Frames, 4) |
uint TagLib::ID3v2::Frame::size |
( |
|
) |
const |
|
|
Returns the size of the frame. |
uint TagLib::ID3v2::Frame::headerSize |
( |
|
) |
[static] |
|
|
Returns the size of the frame header |
void TagLib::ID3v2::Frame::setData |
( |
const ByteVector & |
data |
) |
|
|
|
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(). |
virtual void TagLib::ID3v2::Frame::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 in TagLib::ID3v2::CommentsFrame, and TagLib::ID3v2::TextIdentificationFrame. |
virtual String TagLib::ID3v2::Frame::toString |
( |
|
) |
const [pure virtual] |
|
|
Render the frame back to its binary format in a ByteVector. |
|
Returns the text delimiter that is used between fields for the string type t. |
Header* TagLib::ID3v2::Frame::header |
( |
|
) |
const [protected] |
|
|
Returns a pointer to the frame header. |
void TagLib::ID3v2::Frame::setHeader |
( |
Header * |
h, |
|
|
bool |
deleteCurrent = true |
|
) |
[protected] |
|
|
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. |
void TagLib::ID3v2::Frame::parse |
( |
const ByteVector & |
data |
) |
[protected] |
|
|
Called by setData() to parse the frame data. It makes this information available through the public API. |
virtual void TagLib::ID3v2::Frame::parseFields |
( |
const ByteVector & |
data |
) |
[protected, pure virtual] |
|
virtual ByteVector TagLib::ID3v2::Frame::renderFields |
( |
|
) |
const [protected, pure virtual] |
|
Friends And Related Function Documentation
The documentation for this class was generated from the following file:
This file is part of the documentation for TagLib Version 1.0.