namespace
{
- enum { ApeAPEIndex, ApeID3v1Index };
+ enum { ApeAPEIndex = 0, ApeID3v1Index = 1 };
}
class APE::File::FilePrivate
}
}
+bool APE::File::hasAPETag() const
+{
+ return d->hasAPE;
+}
+
+bool APE::File::hasID3v1Tag() const
+{
+ return d->hasID3v1;
+}
+
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
*/
void strip(int tags = AllTags);
+ /*!
+ * Returns whether or not the file on disk contains an APE tag.
+ */
+ bool hasAPETag() const;
+
+ /*!
+ * Returns whether or not the file on disk contains an ID3v1 tag.
+ */
+ bool hasID3v1Tag() const;
+
private:
File(const File &);
File &operator=(const File &);
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;
+}
*/
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 &);
namespace
{
- enum { MPCAPEIndex, MPCID3v1Index };
+ enum { MPCAPEIndex = 0, MPCID3v1Index = 1 };
}
class MPC::File::FilePrivate
strip(tags);
}
+bool MPC::File::hasID3v1Tag() const
+{
+ return d->hasID3v1;
+}
+
+bool MPC::File::hasAPETag() const
+{
+ return d->hasAPE;
+}
////////////////////////////////////////////////////////////////////////////////
// private members
*/
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 &);
long lastFrameOffset();
/*!
- * Returns whether or not the file on disk contains ID3v1 tag.
+ * Returns whether or not the file on disk contains an ID3v1 tag.
*/
bool hasID3v1Tag() const;
/*!
- * Returns whether or not the file on disk contains ID3v2 tag.
+ * Returns whether or not the file on disk contains an ID3v2 tag.
*/
bool hasID3v2Tag() const;
/*!
- * Returns whether or not the file on disk contains APE tag.
+ * Returns whether or not the file on disk contains an APE tag.
*/
bool hasAPETag() const;
d->scanned = true;
}
+
+bool Ogg::FLAC::File::hasXiphComment() const
+{
+ return d->hasXiphComment;
+}
*/
long streamLength();
+ /*!
+ * Returns whether or not the file on disk contains a Xiph comment.
+ */
+ bool hasXiphComment() const;
+
private:
File(const File &);
File &operator=(const File &);
return true;
}
+
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
*/
virtual bool save();
+ /*!
+ * Returns whether or not the file on disk contains an ID3v2 tag.
+ */
+ bool hasID3v2Tag() const;
+
private:
File(const File &);
File &operator=(const File &);
public:
FilePrivate() :
properties(0),
- tagChunkID("ID3 ")
+ tagChunkID("ID3 "),
+ hasID3v2(false),
+ hasInfo(false)
{
}
ByteVector tagChunkID;
TagUnion tag;
+
+ bool hasID3v2;
+ bool hasInfo;
};
////////////////////////////////////////////////////////////////////////////////
ID3v2::Tag *id3v2tag = d->tag.access<ID3v2::Tag>(ID3v2Index, false);
if(!id3v2tag->isEmpty()) {
- if(tags & ID3v2)
+ if(tags & ID3v2) {
setChunkData(d->tagChunkID, id3v2tag->render(id3v2Version));
+ d->hasID3v2 = true;
+ }
}
Info::Tag *infotag = d->tag.access<Info::Tag>(InfoIndex, false);
setChunkData(chunkId, infotag->render());
else
setChunkData("LIST", infotag->render(), true);
+
+ d->hasInfo = true;
}
}
return true;
}
+bool RIFF::WAV::File::hasID3v2Tag() const
+{
+ return d->hasID3v2;
+}
+
+bool RIFF::WAV::File::hasInfoTag() const
+{
+ return d->hasInfo;
+}
+
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
if(name == "ID3 " || name == "id3 ") {
d->tagChunkID = chunkName(i);
d->tag.set(ID3v2Index, new ID3v2::Tag(this, chunkOffset(i)));
+ d->hasID3v2 = true;
}
else if(name == "fmt " && readProperties)
formatData = chunkData(i);
ByteVector data = chunkData(i);
ByteVector type = data.mid(0, 4);
- if(type == "INFO")
+ if(type == "INFO") {
d->tag.set(InfoIndex, new RIFF::Info::Tag(data));
+ d->hasInfo = true;
+ }
}
}
virtual bool save();
bool save(TagTypes tags, bool stripOthers = true, int id3v2Version = 4);
+
+ /*!
+ * Returns whether or not the file on disk contains an ID3v2 tag.
+ */
+ bool hasID3v2Tag() const;
+
+ /*!
+ * Returns whether or not the file on disk contains an RIFF INFO tag.
+ */
+ bool hasInfoTag() const;
private:
File(const File &);
}
}
+bool TrueAudio::File::hasID3v1Tag() const
+{
+ return d->hasID3v1;
+}
+
+bool TrueAudio::File::hasID3v2Tag() const
+{
+ return d->hasID3v2;
+}
+
////////////////////////////////////////////////////////////////////////////////
// private members
* \note In order to make the removal permanent save() still needs to be called
*/
void strip(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 ID3v2 tag.
+ */
+ bool hasID3v2Tag() const;
+
private:
File(const File &);
File &operator=(const File &);
}
}
+bool WavPack::File::hasID3v1Tag() const
+{
+ return d->hasID3v1;
+}
+
+bool WavPack::File::hasAPETag() const
+{
+ return d->hasAPE;
+}
+
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
* \note In order to make the removal permanent save() still needs to be called
*/
void strip(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 &);