id3dev 26.01 An ID3 metadata library

Loading...
Searching...
No Matches
id3v2TagIdentity.h
Go to the documentation of this file.
1
11
12#ifndef ID3V2_TAG_IDENTITY
13#define ID3V2_TAG_IDENTITY
14
15#ifdef __cplusplus
16 extern "C"{
17#endif
18
19
20#include "id3v2Types.h"
21
22
23/*
24 Tag Header
25*/
26
27//mem functions
28
29 Id3v2TagHeader *id3v2CreateTagHeader(uint8_t majorVersion, uint8_t minorVersion, uint8_t flags,
30 Id3v2ExtendedTagHeader *extendedHeader);
31
32 void id3v2DestroyTagHeader(Id3v2TagHeader **toDelete);
33
34//flag functions
35
36 bool id3v2WriteUnsynchronisationIndicator(Id3v2TagHeader *header, bool bit);
37
38 bool id3v2WriteCompressionIndicator(Id3v2TagHeader *header, bool bit);
39
40 bool id3v2WriteExtendedHeaderIndicator(Id3v2TagHeader *header, bool bit);
41
42 bool id3v2WriteExperimentalIndicator(Id3v2TagHeader *header, bool bit);
43
44 bool id3v2WriteFooterIndicator(Id3v2TagHeader *header, bool bit);
45
46 int id3v2ReadUnsynchronisationIndicator(Id3v2TagHeader *header);
47
48 int id3v2ReadCompressionIndicator(Id3v2TagHeader *header);
49
50 int id3v2ReadExtendedHeaderIndicator(Id3v2TagHeader *header);
51
52 int id3v2ReadExperimentalIndicator(Id3v2TagHeader *header);
53
54 int id3v2ReadFooterIndicator(Id3v2TagHeader *header);
55
56/*
57 Extended Tag Header
58*/
59
60//mem functions
61
62 Id3v2ExtendedTagHeader *id3v2CreateExtendedTagHeader(uint32_t padding, uint32_t crc, bool update, bool tagRestrictions,
63 uint8_t restrictions);
64
65 void id3v2DestroyExtendedTagHeader(Id3v2ExtendedTagHeader **toDelete);
66
67//tag restriction functions
68
69 bool id3v2WriteTagSizeRestriction(Id3v2TagHeader *header, uint8_t bits);
70
71 bool id3v2WriteTextEncodingRestriction(Id3v2TagHeader *header, bool bit);
72
73 bool id3v2WriteTextFieldsSizeRestriction(Id3v2TagHeader *header, uint8_t bits);
74
75 bool id3v2WriteImageEncodingRestriction(Id3v2TagHeader *header, bool bit);
76
77 bool id3v2WriteImageSizeRestriction(Id3v2TagHeader *header, uint8_t bits);
78
79 int id3v2ReadTagSizeRestriction(Id3v2TagHeader *header);
80
81 int id3v2ReadTextEncodingRestriction(Id3v2TagHeader *header);
82
83 int id3v2ReadTextFieldsSizeRestriction(Id3v2TagHeader *header);
84
85 int id3v2ReadImageEncodingRestriction(Id3v2TagHeader *header);
86
87 int id3v2ReadImageSizeRestriction(Id3v2TagHeader *header);
88
89 bool id3v2ClearTagRestrictions(Id3v2TagHeader *header);
90
91/*
92 Tag
93*/
94
95//mem
96
97 Id3v2Tag *id3v2CreateTag(Id3v2TagHeader *header, List *frames);
98
99 void id3v2DestroyTag(Id3v2Tag **toDelete);
100
101
102/*
103 output
104*/
105
106uint8_t *id3v2ExtendedTagHeaderSerialize(Id3v2ExtendedTagHeader *ext, uint8_t version, size_t *outl);
107
108 char *id3v2ExtendedTagHeaderToJSON(const Id3v2ExtendedTagHeader *ext, uint8_t version);
109
110uint8_t *id3v2TagHeaderSerialize(Id3v2TagHeader *header, uint32_t uintSize, size_t *outl);
111
112 char *id3v2TagHeaderToJSON(const Id3v2TagHeader *header);
113
114
115#ifdef __cplusplus
116} //extern c end
117#endif
118
119#endif
id3v2TagHeaderToJSON
char * id3v2TagHeaderToJSON(const Id3v2TagHeader *header)
Converts an ID3v2 tag header structure to JSON string representation.
Definition id3v2TagIdentity.c:980
id3v2CreateTag
Id3v2Tag * id3v2CreateTag(Id3v2TagHeader *header, List *frames)
Creates and allocates an ID3v2 tag structure.
Definition id3v2TagIdentity.c:630
id3v2ReadImageSizeRestriction
int id3v2ReadImageSizeRestriction(Id3v2TagHeader *header)
Reads the image size restriction from an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:578
id3v2DestroyTag
void id3v2DestroyTag(Id3v2Tag **toDelete)
Frees an ID3v2 tag and all associated resources, nullifying the pointer.
Definition id3v2TagIdentity.c:646
id3v2WriteUnsynchronisationIndicator
bool id3v2WriteUnsynchronisationIndicator(Id3v2TagHeader *header, bool bit)
Sets or clears the unsynchronisation flag in the tag header.
Definition id3v2TagIdentity.c:63
id3v2ReadFooterIndicator
int id3v2ReadFooterIndicator(Id3v2TagHeader *header)
Reads the footer presence flag from an ID3v2.4 tag header.
Definition id3v2TagIdentity.c:256
id3v2ReadTextFieldsSizeRestriction
int id3v2ReadTextFieldsSizeRestriction(Id3v2TagHeader *header)
Reads the text fields size restriction from an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:530
id3v2CreateExtendedTagHeader
Id3v2ExtendedTagHeader * id3v2CreateExtendedTagHeader(uint32_t padding, uint32_t crc, bool update, bool tagRestrictions, uint8_t restrictions)
Creates and allocates an ID3v2 extended tag header structure.
Definition id3v2TagIdentity.c:280
id3v2ReadImageEncodingRestriction
int id3v2ReadImageEncodingRestriction(Id3v2TagHeader *header)
Reads the image encoding restriction from an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:558
id3v2ReadUnsynchronisationIndicator
int id3v2ReadUnsynchronisationIndicator(Id3v2TagHeader *header)
Reads the unsynchronisation flag from a tag header.
Definition id3v2TagIdentity.c:176
id3v2WriteExtendedHeaderIndicator
bool id3v2WriteExtendedHeaderIndicator(Id3v2TagHeader *header, bool bit)
Sets or clears the extended header flag in ID3v2.3/ID3v2.4 tag headers.
Definition id3v2TagIdentity.c:102
id3v2ReadExperimentalIndicator
int id3v2ReadExperimentalIndicator(Id3v2TagHeader *header)
Reads the experimental indicator flag from an ID3v2.3/ID3v2.4 tag header.
Definition id3v2TagIdentity.c:233
id3v2DestroyTagHeader
void id3v2DestroyTagHeader(Id3v2TagHeader **toDelete)
Frees an ID3v2 tag header and nullifies the pointer.
Definition id3v2TagIdentity.c:47
id3v2ExtendedTagHeaderSerialize
uint8_t * id3v2ExtendedTagHeaderSerialize(Id3v2ExtendedTagHeader *ext, uint8_t version, size_t *outl)
Serializes an ID3v2 extended tag header into a byte stream.
Definition id3v2TagIdentity.c:676
id3v2WriteFooterIndicator
bool id3v2WriteFooterIndicator(Id3v2TagHeader *header, bool bit)
Sets or clears the footer presence flag in ID3v2.4 tag headers.
Definition id3v2TagIdentity.c:154
id3v2WriteCompressionIndicator
bool id3v2WriteCompressionIndicator(Id3v2TagHeader *header, bool bit)
Sets or clears the compression flag in ID3v2.2 tag headers.
Definition id3v2TagIdentity.c:81
id3v2WriteTextEncodingRestriction
bool id3v2WriteTextEncodingRestriction(Id3v2TagHeader *header, bool bit)
Sets the text encoding restriction in an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:353
id3v2DestroyExtendedTagHeader
void id3v2DestroyExtendedTagHeader(Id3v2ExtendedTagHeader **toDelete)
Frees an ID3v2 extended tag header and nullifies the pointer.
Definition id3v2TagIdentity.c:301
id3v2CreateTagHeader
Id3v2TagHeader * id3v2CreateTagHeader(uint8_t majorVersion, uint8_t minorVersion, uint8_t flags, Id3v2ExtendedTagHeader *extendedHeader)
Creates and allocates an ID3v2 tag header structure.
Definition id3v2TagIdentity.c:29
id3v2WriteExperimentalIndicator
bool id3v2WriteExperimentalIndicator(Id3v2TagHeader *header, bool bit)
Sets or clears the experimental indicator flag in ID3v2.3/ID3v2.4 tag headers.
Definition id3v2TagIdentity.c:128
id3v2ReadExtendedHeaderIndicator
int id3v2ReadExtendedHeaderIndicator(Id3v2TagHeader *header)
Reads the extended header flag from an ID3v2.3/ID3v2.4 tag header.
Definition id3v2TagIdentity.c:209
id3v2WriteImageSizeRestriction
bool id3v2WriteImageSizeRestriction(Id3v2TagHeader *header, uint8_t bits)
Sets the image size restriction in an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:451
id3v2ReadTextEncodingRestriction
int id3v2ReadTextEncodingRestriction(Id3v2TagHeader *header)
Reads the text encoding restriction from an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:510
id3v2TagHeaderSerialize
uint8_t * id3v2TagHeaderSerialize(Id3v2TagHeader *header, uint32_t uintSize, size_t *outl)
Serializes an ID3v2 tag header into a byte stream.
Definition id3v2TagIdentity.c:883
id3v2ReadCompressionIndicator
int id3v2ReadCompressionIndicator(Id3v2TagHeader *header)
Reads the compression flag from an ID3v2.2 tag header.
Definition id3v2TagIdentity.c:190
id3v2ExtendedTagHeaderToJSON
char * id3v2ExtendedTagHeaderToJSON(const Id3v2ExtendedTagHeader *ext, uint8_t version)
Converts an ID3v2 extended tag header structure to JSON string representation.
Definition id3v2TagIdentity.c:804
id3v2WriteImageEncodingRestriction
bool id3v2WriteImageEncodingRestriction(Id3v2TagHeader *header, bool bit)
Sets the image encoding restriction in an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:419
id3v2WriteTagSizeRestriction
bool id3v2WriteTagSizeRestriction(Id3v2TagHeader *header, uint8_t bits)
Sets the tag size restriction in an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:319
id3v2ReadTagSizeRestriction
int id3v2ReadTagSizeRestriction(Id3v2TagHeader *header)
Reads the tag size restriction from an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:483
id3v2ClearTagRestrictions
bool id3v2ClearTagRestrictions(Id3v2TagHeader *header)
Clears all tag restrictions from an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:606
id3v2WriteTextFieldsSizeRestriction
bool id3v2WriteTextFieldsSizeRestriction(Id3v2TagHeader *header, uint8_t bits)
Sets the text encoding restriction in an ID3v2.4 extended header.
Definition id3v2TagIdentity.c:385
id3v2Types.h
Definitions for ID3v2.x tag structure, constants, and genre enumeration.
Id3v2Tag
struct _Id3v2Tag Id3v2Tag
Complete ID3v2 tag structure containing header and metadata frames.
Id3v2ExtendedTagHeader
struct _Id3v2ExtendedTagHeader Id3v2ExtendedTagHeader
Optional ID3v2 extended header containing supplementary tag metadata.
Id3v2TagHeader
struct _Id3v2TagHeader Id3v2TagHeader
ID3v2 tag header containing version and parsing information.