#include <id3v2frame.h>
Public Member Functions | |
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 |
ByteVector | render () const |
Static Public Member Functions | |
uint | size () |
uint | size (uint version) |
The ID3v2 Frame Header (Structure, 4)
Every ID3v2::Frame has an associated header that gives some general properties of the frame and also makes it possible to identify the frame type.
As such when reading an ID3v2 tag ID3v2::FrameFactory first creates the frame headers and then creates the appropriate Frame subclass based on the type and attaches the header.
|
Construct a Frame Header based on data. data must at least contain a 4 byte frame ID, and optionally can contain flag data and the frame size. i.e. Just the frame id -- "TALB" -- is a valid value.
|
|
Construct a Frame Header based on data. data must at least contain a 4 byte frame ID, and optionally can contain flag data and the frame size. i.e. Just the frame id -- "TALB" -- is a valid value. version should be the ID3v2 version of the tag. |
|
Destroys this Header instance. |
|
|
Returns the size of the frame data portion, as set when setData() was called or set explicity via setFrameSize(). |
|
Render the Header back to binary format in a ByteVector. |
|
Sets the data for the Header. version should indicate the ID3v2 version number of the tag that this frame is contained in. |
|
Sets the data for the Header.
|
|
Sets the frame's ID to id. Only the first four bytes of id will be used.
|
|
Sets the size of the frame data portion. |
|
Returns the size of the frame header in bytes for the ID3v2 version that's given.
|
|
Returns the size of the frame header in bytes.
|
|
Returns the ID3v2 version of the header (as passed in from the construction of the header). |