APE-tags for mp3s.

Currently they are for special purposes only, and thus not used as a part
of the union tag.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@338184 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Allan Sandfeld Jensen
2004-08-15 21:14:12 +00:00
parent 60959a1b5b
commit bdee6dcf73
3 changed files with 118 additions and 10 deletions

View File

@ -30,6 +30,7 @@ namespace TagLib {
namespace ID3v2 { class Tag; class FrameFactory; }
namespace ID3v1 { class Tag; }
namespace APE { class Tag; }
//! An implementation of TagLib::File with MPEG (MP3) specific methods
@ -57,6 +58,8 @@ namespace TagLib {
ID3v1 = 0x0001,
//! Matches ID3v2 tags.
ID3v2 = 0x0002,
//! Matches APE tags.
APE = 0x0004,
//! Matches all tag types.
AllTags = 0xffff
};
@ -103,6 +106,7 @@ namespace TagLib {
*
* \see ID3v1Tag()
* \see ID3v2Tag()
* \see APETag()
*/
virtual Tag *tag() const;
@ -166,6 +170,19 @@ namespace TagLib {
*/
ID3v1::Tag *ID3v1Tag(bool create = false);
/*!
* Returns a pointer to the APE tag of the file.
*
* If \a create is false (the default) this will return a null pointer
* if there is no valid APE tag. If \a create is true it will create
* an APE tag if one does not exist.
*
* \note The Tag <b>is still</b> owned by the MPEG::File and should not be
* deleted by the user. It will be deleted when the file (object) is
* destroyed.
*/
APE::Tag *APETag(bool create = false);
/*!
* This will strip the tags that match the OR-ed together TagTypes from the
* file. By default it strips all tags. It returns true if the tags are
@ -173,7 +190,7 @@ namespace TagLib {
*
* This is equivalent to strip(tags, true)
*
* \note This will also invalidate pointers to the ID3v2 and ID3v1 tags
* \note This will also invalidate pointers to the ID3 and APE tags
* as their memory will be freed.
*/
bool strip(int tags = AllTags);
@ -183,7 +200,7 @@ namespace TagLib {
* file. By default it strips all tags. It returns true if the tags are
* successfully stripped.
*
* If \a freeMemory is true the ID3v1 and ID3v2 tags will be deleted and
* If \a freeMemory is true the ID3 and APE tags will be deleted and
* pointers to them will be invalidated.
*/
// BIC: merge with the method above
@ -225,6 +242,7 @@ namespace TagLib {
void read(bool readProperties, Properties::ReadStyle propertiesStyle);
long findID3v2();
long findID3v1();
long findAPE();
/*!
* MPEG frames can be recognized by the bit pattern 11111111 111, so the