An ID3v2 attached picture frame implementation. More...
#include <attachedpictureframe.h>
Public Member Functions | |
AttachedPictureFrame () | |
AttachedPictureFrame (const ByteVector &data) | |
~AttachedPictureFrame () override | |
AttachedPictureFrame (const AttachedPictureFrame &)=delete | |
AttachedPictureFrame & | operator= (const AttachedPictureFrame &)=delete |
String | toString () const override |
StringList | toStringList () const override |
String::Type | textEncoding () const |
void | setTextEncoding (String::Type t) |
String | mimeType () const |
void | setMimeType (const String &m) |
Type | type () const |
void | setType (Type t) |
String | description () const |
void | setDescription (const String &desc) |
ByteVector | picture () const |
void | setPicture (const ByteVector &p) |
Public Member Functions inherited from TagLib::ID3v2::Frame | |
virtual | ~Frame () |
Frame (const Frame &)=delete | |
Frame & | operator= (const Frame &)=delete |
ByteVector | frameID () const |
unsigned int | size () const |
unsigned int | headerSize () const |
void | setData (const ByteVector &data) |
virtual void | setText (const String &text) |
virtual String | toString () const =0 |
virtual StringList | toStringList () const |
ByteVector | render () const |
Header * | header () const |
Header (const ByteVector &data, unsigned int version=4) | |
virtual | ~Header () |
Header (const Header &)=delete | |
Header & | operator= (const Header &)=delete |
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) |
unsigned int | size () const |
bool | tagAlterPreservation () const |
void | setTagAlterPreservation (bool preserve) |
bool | fileAlterPreservation () const |
bool | readOnly () const |
bool | groupingIdentity () const |
bool | compression () const |
bool | encryption () const |
bool | unsynchronisation () const |
bool | dataLengthIndicator () const |
ByteVector | render () const |
Protected Member Functions | |
void | parseFields (const ByteVector &data) override |
ByteVector | renderFields () const override |
Protected Member Functions inherited from TagLib::ID3v2::Frame | |
Frame (const ByteVector &data) | |
Frame (Header *h) | |
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 *position=nullptr) |
String::Type | checkTextEncoding (const StringList &fields, String::Type encoding) const |
virtual PropertyMap | asProperties () const |
Protected Attributes | |
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr< AttachedPictureFramePrivate > | d |
Friends | |
class | FrameFactory |
Additional Inherited Members | |
Static Public Member Functions inherited from TagLib::ID3v2::Frame | |
static ByteVector | textDelimiter (String::Type t) |
static ByteVector | keyToFrameID (const String &) |
static String | frameIDToKey (const ByteVector &) |
Static Public Attributes inherited from TagLib::ID3v2::Frame | |
static const String | instrumentPrefix |
static const String | commentPrefix |
static const String | lyricsPrefix |
static const String | urlPrefix |
Static Protected Member Functions inherited from TagLib::ID3v2::Frame | |
static void | splitProperties (const PropertyMap &original, PropertyMap &singleFrameProperties, PropertyMap &tiplProperties, PropertyMap &tmclProperties) |
An ID3v2 attached picture frame implementation.
This is an implementation of ID3v2 attached pictures. Pictures may be included in tags, one per APIC frame (but there may be multiple APIC frames in a single tag). These pictures are usually in either JPEG or PNG format.
TagLib::ID3v2::AttachedPictureFrame::AttachedPictureFrame | ( | ) |
Constructs an empty picture frame. The description, content and text encoding should be set manually.
|
explicit |
Constructs an AttachedPicture frame based on data.
|
override |
Destroys the AttachedPictureFrame instance.
|
delete |
String TagLib::ID3v2::AttachedPictureFrame::description | ( | ) | const |
Returns a text description of the image.
String TagLib::ID3v2::AttachedPictureFrame::mimeType | ( | ) | const |
Returns the mime type of the image. This should in most cases be "image/png" or "image/jpeg".
|
delete |
|
overrideprotectedvirtual |
Called by parse() to parse the field data. It makes this information available through the public API. This must be overridden by the subclasses.
Implements TagLib::ID3v2::Frame.
Reimplemented in TagLib::ID3v2::AttachedPictureFrameV22.
ByteVector TagLib::ID3v2::AttachedPictureFrame::picture | ( | ) | const |
Returns the image data as a ByteVector.
const char *
which should make it easy to export this data to external programs.
|
overrideprotectedvirtual |
Render the field data back to a binary format in a ByteVector. This must be overridden by subclasses.
Implements TagLib::ID3v2::Frame.
void TagLib::ID3v2::AttachedPictureFrame::setDescription | ( | const String & | desc | ) |
Sets a textual description of the image to desc.
void TagLib::ID3v2::AttachedPictureFrame::setMimeType | ( | const String & | m | ) |
Sets the mime type of the image. This should in most cases be "image/png" or "image/jpeg".
void TagLib::ID3v2::AttachedPictureFrame::setPicture | ( | const ByteVector & | p | ) |
Sets the image data to p. p should be of the type specified in this frame's mime-type specification.
void TagLib::ID3v2::AttachedPictureFrame::setTextEncoding | ( | String::Type | t | ) |
Set the text encoding used for the description.
void TagLib::ID3v2::AttachedPictureFrame::setType | ( | Type | t | ) |
Sets the type for the image.
String::Type TagLib::ID3v2::AttachedPictureFrame::textEncoding | ( | ) | const |
Returns the text encoding used for the description.
|
overridevirtual |
Returns a string containing the description and mime-type
Implements TagLib::ID3v2::Frame.
|
overridevirtual |
Returns a string list containing the description and mime-type.
Reimplemented from TagLib::ID3v2::Frame.
Type TagLib::ID3v2::AttachedPictureFrame::type | ( | ) | const |
Returns the type of the image.
|
friend |
|
protected |