Added the methods to check which kind of tags the file actually has.

This commit is contained in:
Tsuda Kageyu
2013-07-04 18:11:33 +09:00
parent 7e866e11ad
commit 1503909824
17 changed files with 164 additions and 8 deletions

View File

@ -552,3 +552,17 @@ void FLAC::File::removePictures()
d->blocks = newBlocks;
}
bool FLAC::File::hasXiphComment() const
{
return d->hasXiphComment;
}
bool FLAC::File::hasID3v1Tag() const
{
return d->hasID3v1;
}
bool FLAC::File::hasID3v2Tag() const
{
return d->hasID3v2;
}

View File

@ -246,6 +246,21 @@ namespace TagLib {
*/
void addPicture(Picture *picture);
/*!
* Returns whether or not the file on disk contains a Xiph comment.
*/
bool hasXiphComment() const;
/*!
* Returns whether or not the file on disk contains an ID3v1 tag.
*/
bool hasID3v1Tag() const;
/*!
* Returns whether or not the file on disk contains an ID3v2 tag.
*/
bool hasID3v2Tag() const;
private:
File(const File &);
File &operator=(const File &);