mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 04:54:19 -04:00
Add accessors for the image description.
BUG:94258 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@437378 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -95,6 +95,16 @@ void AttachedPictureFrame::setType(Type t)
|
||||
d->type = t;
|
||||
}
|
||||
|
||||
String AttachedPictureFrame::description() const
|
||||
{
|
||||
return d->description;
|
||||
}
|
||||
|
||||
void AttachedPictureFrame::setDescription(const String &desc)
|
||||
{
|
||||
d->description = desc;
|
||||
}
|
||||
|
||||
ByteVector AttachedPictureFrame::picture() const
|
||||
{
|
||||
return d->data;
|
||||
@ -122,8 +132,10 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
|
||||
pos += 1;
|
||||
|
||||
int offset = data.find(textDelimiter(String::Latin1), pos);
|
||||
|
||||
if(offset < pos)
|
||||
return;
|
||||
|
||||
d->mimeType = String(data.mid(pos, offset - pos), String::Latin1);
|
||||
pos = offset + 1;
|
||||
|
||||
@ -131,8 +143,10 @@ void AttachedPictureFrame::parseFields(const ByteVector &data)
|
||||
pos += 1;
|
||||
|
||||
offset = data.find(textDelimiter(d->textEncoding), pos);
|
||||
|
||||
if(offset < pos)
|
||||
return;
|
||||
|
||||
d->description = String(data.mid(pos, offset - pos), d->textEncoding);
|
||||
pos = offset + 1;
|
||||
|
||||
|
@ -156,6 +156,26 @@ namespace TagLib {
|
||||
*/
|
||||
void setType(Type t);
|
||||
|
||||
/*!
|
||||
* Returns a text description of the image.
|
||||
*
|
||||
* \see setDescription()
|
||||
* \see textEncoding()
|
||||
* \see setTextEncoding()
|
||||
*/
|
||||
|
||||
String description() const;
|
||||
|
||||
/*!
|
||||
* Sets a textual description of the image to \a desc.
|
||||
*
|
||||
* \see description()
|
||||
* \see textEncoding()
|
||||
* \see setTextEncoding()
|
||||
*/
|
||||
|
||||
void setDescription(const String &desc);
|
||||
|
||||
/*!
|
||||
* Returns the image data as a ByteVector.
|
||||
*
|
||||
|
Reference in New Issue
Block a user