TagLib API Documentation

TagLib::ID3v2::Frame::Header Class Reference

ID3v2 frame header implementation. More...

#include <id3v2frame.h>

List of all members.

Public Member Functions

 Header (const ByteVector &data, bool synchSafeInts=true)
virtual ~Header ()
void setData (const ByteVector &data, bool synchSafeInts=true)
ByteVector frameID () const
void setFrameID (const ByteVector &id)
uint frameSize () const
void setFrameSize (uint size)
ByteVector render () const

Static Public Member Functions

uint size ()


Detailed Description

ID3v2 frame header implementation.

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.

Definition at line 183 of file id3v2frame.h.


Constructor & Destructor Documentation

TagLib::ID3v2::Frame::Header::Header const ByteVector data,
bool  synchSafeInts = true
[explicit]
 

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.

virtual TagLib::ID3v2::Frame::Header::~Header  )  [virtual]
 

Destroys this Header instance.


Member Function Documentation

void TagLib::ID3v2::Frame::Header::setData const ByteVector data,
bool  synchSafeInts = true
 

Sets the data for the Header.

ByteVector TagLib::ID3v2::Frame::Header::frameID  )  const
 

Returns the Frame ID (Structure, 4) (Frames, 4)

void TagLib::ID3v2::Frame::Header::setFrameID const ByteVector id  ) 
 

Sets the frame's ID to id. Only the first four bytes of id will be used.

Warning:
This method should in general be avoided. It exists simply to provide a mechanism for transforming frames from a deprecated frame type to a newer one -- i.e. TYER to TDRC from ID3v2.3 to ID3v2.4.

uint TagLib::ID3v2::Frame::Header::frameSize  )  const
 

Returns the size of the frame data portion, as set when setData() was called or set explicity via setFrameSize().

void TagLib::ID3v2::Frame::Header::setFrameSize uint  size  ) 
 

Sets the size of the frame data portion.

uint TagLib::ID3v2::Frame::Header::size  )  [static]
 

Returns the size of the frame header in bytes. Currently this is always 10.

ByteVector TagLib::ID3v2::Frame::Header::render  )  const
 

Render the Header back to binary format in a ByteVector.


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for TagLib Version 1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Jan 22 05:44:22 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2003