Tag Parser  6.1.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
id3v1tag.h
Go to the documentation of this file.
1 #ifndef ID3V1TAG_H
2 #define ID3V1TAG_H
3 
4 #include "../tag.h"
5 
6 namespace Media
7 {
8 
10 {
11 public:
12  Id3v1Tag();
13 
14  TagType type() const;
15  const char *typeName() const;
16  bool canEncodingBeUsed(TagTextEncoding encoding) const;
17  const TagValue &value(KnownField value) const;
18  bool setValue(KnownField field, const TagValue &value);
19  bool setValueConsideringTypeInfo(KnownField field, const TagValue &value, const std::string &typeInfo);
20  bool hasField(KnownField field) const;
21  void removeAllFields();
22  unsigned int fieldCount() const;
23  bool supportsField(KnownField field) const;
24  void ensureTextValuesAreProperlyEncoded();
25 
26  void parse(std::istream &sourceStream, bool autoSeek);
27  void parse(std::iostream &sourceStream);
28  void make(std::ostream &targetStream);
29 
30 private:
31  void readValue(TagValue &value, size_t maxLength, const char *buffer);
32  void writeValue(const TagValue &value, size_t length, char *buffer, std::ostream &targetStream);
33 
34  TagValue m_title;
35  TagValue m_artist;
36  TagValue m_album;
37  TagValue m_year;
38  TagValue m_comment;
39  TagValue m_trackPos;
40  TagValue m_genre;
41 };
42 
43 }
44 
45 #endif // ID3V1TAG_H
The TagValue class wraps values of different types.
Definition: tagvalue.h:64
KnownField
Specifies the field.
Definition: tag.h:42
TagTextEncoding
Specifies the text encoding.
Definition: tagvalue.h:22
The Tag class is used to store, read and write tag information.
Definition: tag.h:98
Implementation of Media::Tag for ID3v1 tags.
Definition: id3v1tag.h:9
TagType
Specifies the tag type.
Definition: tag.h:21
Contains all classes and functions of the TagInfo library.
Definition: exceptions.h:9
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.