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

@ -39,7 +39,7 @@ using namespace TagLib;
namespace
{
enum { MPCAPEIndex, MPCID3v1Index };
enum { MPCAPEIndex = 0, MPCID3v1Index = 1 };
}
class MPC::File::FilePrivate
@ -256,6 +256,15 @@ void MPC::File::remove(int tags)
strip(tags);
}
bool MPC::File::hasID3v1Tag() const
{
return d->hasID3v1;
}
bool MPC::File::hasAPETag() const
{
return d->hasAPE;
}
////////////////////////////////////////////////////////////////////////////////
// private members

View File

@ -187,6 +187,16 @@ namespace TagLib {
*/
void remove(int tags = AllTags);
/*!
* 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 APE tag.
*/
bool hasAPETag() const;
private:
File(const File &);
File &operator=(const File &);