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:
Scott Wheeler
2005-07-21 17:27:37 +00:00
parent c756813a21
commit a2972c8ae0
2 changed files with 34 additions and 0 deletions

View File

@ -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;

View File

@ -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.
*