Move TagType into separate header

So it can be used in different places without creating a dependency loop.
This commit is contained in:
Martchus 2022-06-20 21:21:11 +02:00
parent c4d850825a
commit d17f04864d
3 changed files with 25 additions and 15 deletions

View File

@ -86,6 +86,7 @@ set(HEADER_FILES
size.h
tag.h
tagtarget.h
tagtype.h
tagvalue.h
vorbis/vorbiscomment.h
vorbis/vorbiscommentfield.h

16
tag.h
View File

@ -2,6 +2,7 @@
#define TAG_PARSER_TAG_H
#include "./tagtarget.h"
#include "./tagtype.h"
#include "./tagvalue.h"
#include <c++utilities/io/binaryreader.h>
@ -12,21 +13,6 @@
namespace TagParser {
/*!
* \brief Specifies the tag type.
*
* \sa Tag::type()
*/
enum class TagType : unsigned int {
Unspecified = 0x00, /**< The tag type is unspecified. */
Id3v1Tag = 0x01, /**< The tag is a TagParser::Id3v1Tag. */
Id3v2Tag = 0x02, /**< The tag is a TagParser::Id3v2Tag. */
Mp4Tag = 0x04, /**< The tag is a TagParser::Mp4Tag. */
MatroskaTag = 0x08, /**< The tag is a TagParser::MatroskaTag. */
VorbisComment = 0x10, /**< The tag is a TagParser::VorbisComment. */
OggVorbisComment = 0x20 /**< The tag is a TagParser::OggVorbisComment. */
};
/*!
* \brief Specifies the field.
*

23
tagtype.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef TAG_PARSER_TAG_TYPE_H
#define TAG_PARSER_TAG_TYPE_H
namespace TagParser {
/*!
* \brief Specifies the tag type.
*
* \sa Tag::type()
*/
enum class TagType : unsigned int {
Unspecified = 0x00, /**< The tag type is unspecified. */
Id3v1Tag = 0x01, /**< The tag is a TagParser::Id3v1Tag. */
Id3v2Tag = 0x02, /**< The tag is a TagParser::Id3v2Tag. */
Mp4Tag = 0x04, /**< The tag is a TagParser::Mp4Tag. */
MatroskaTag = 0x08, /**< The tag is a TagParser::MatroskaTag. */
VorbisComment = 0x10, /**< The tag is a TagParser::VorbisComment. */
OggVorbisComment = 0x20 /**< The tag is a TagParser::OggVorbisComment. */
};
} // namespace TagParser
#endif // TAG_PARSER_TAG_TYPE_H