1 #ifndef TAG_PARSER_TAG_H 2 #define TAG_PARSER_TAG_H 7 #include <c++utilities/conversion/types.h> 8 #include <c++utilities/io/binaryreader.h> 11 #include <type_traits> 43 Invalid = std::numeric_limits<unsigned int>::max(),
103 virtual const char *typeName()
const;
104 std::string toString()
const;
108 virtual std::vector<const TagValue *> values(
KnownField field)
const;
110 virtual bool setValues(
KnownField field,
const std::vector<TagValue> &values);
111 virtual bool hasField(
KnownField field)
const = 0;
112 virtual void removeAllFields() = 0;
113 const std::string &
version()
const;
115 virtual bool supportsTarget()
const;
119 const char *targetLevelName()
const;
121 std::string targetString()
const;
122 virtual unsigned int fieldCount()
const = 0;
123 virtual bool supportsField(
KnownField field)
const = 0;
125 virtual bool supportsDescription(
KnownField field)
const;
126 virtual bool supportsMimeType(
KnownField field)
const;
127 virtual bool supportsMultipleValues(
KnownField field)
const;
128 virtual unsigned int insertValues(
const Tag &from,
bool overwrite);
129 virtual void ensureTextValuesAreProperlyEncoded() = 0;
146 return "unspecified";
246 #endif // TAG_PARSER_TAG_H
virtual bool supportsMultipleValues(KnownField field) const
Returns an indications whether the specified field supports multiple values.
Implementation of TagParser::Tag for the MP4 container.
std::string toString(const std::function< TagTargetLevel(uint64)> &tagTargetMapping) const
Returns the string representation of the current instance.
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.
std::string targetString() const
Returns the string representation for the assigned tag target.
The Tag class is used to store, read and write tag information.
bool isTargetingLevel(TagTargetLevel tagTargetLevel) const
Returns whether the tag is targeting the specified tagTargetLevel.
virtual TagTextEncoding proposedTextEncoding() const
Returns the proposed text encoding.
virtual const char * typeName() const
Returns the type name of the tag as C-style string.
TagDataType
Specifies the data type.
virtual bool supportsMimeType(KnownField field) const
Returns an indications whether the specified field supports mime types.
KnownField
Specifies the field.
virtual TagType type() const
Returns the type of the tag as TagParser::TagType.
constexpr KnownField firstKnownField
The first valid entry in the TagParser::KnownField enum.
virtual bool supportsTarget() const
Returns an indication whether a target is supported by the tag.
TAG_PARSER_EXPORT const char * tagTargetLevelName(TagTargetLevel tagTargetLevel)
Returns a string representation for the specified tagTargetLevel.
const char * targetLevelName() const
Returns the name of the current target level.
The TagTarget class specifies the target of a tag.
virtual TagTargetLevel targetLevel() const
Returns the name of the current tag target level.
constexpr KnownField lastKnownField
The last valid entry in the TagParser::KnownField enum.
const std::string & version() const
Returns the version of the tag as std::string.
Implementation of TagParser::Tag for the Matroska container.
constexpr unsigned int knownFieldArraySize
The number of valid entries in the TagParser::KnownField enum.
Implementation of TagParser::Tag for ID3v2 tags.
Implementation of TagParser::Tag for ID3v1 tags.
uint32 size() const
Returns the size of the tag in bytes.
void setTarget(const TagTarget &target)
Sets the target of tag.
virtual TagDataType proposedDataType(KnownField field) const
Returns the proposed data type for the specified field as TagDataType.
virtual bool supportsDescription(KnownField field) const
Returns an indications whether the specified field supports descriptions.
constexpr KnownField nextKnownField(KnownField field)
Returns the next known field.
The TagValue class wraps values of different types.
TagType
Specifies the tag type.
const TagTarget & target() const
Returns the target of tag.
TagTextEncoding
Specifies the text encoding.
Contains all classes and functions of the TagInfo library.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
virtual bool canEncodingBeUsed(TagTextEncoding encoding) const
Returns an indication whether the specified encoding can be used to provide string values for the tag...