id3dev 26.01 An ID3 metadata library

Loading...
Searching...
No Matches
id3v2Context.h
Go to the documentation of this file.
1
11
12#ifndef ID3V2_CONTEXT
13#define ID3V2_CONTEXT
14
15#ifdef __cplusplus
16 extern "C"{
17#endif
18
19#include "id3v2Types.h"
20
21 unsigned long id3v2djb2(const char *str);
22
23//mem
24
25 Id3v2ContentContext *id3v2CreateContentContext(Id3v2ContextType type, size_t key, size_t max, size_t min);
26
27 void id3v2DestroyContentContext(Id3v2ContentContext **toDelete);
28
29
30// List/Hash API required functions
31
32 void id3v2DeleteContentContext(void *toBeDeleted);
33
34 int id3v2CompareContentContext(const void *first, const void *second);
35
36 char *id3v2PrintContentContext(const void *toBePrinted);
37
38 void *id3v2CopyContentContext(const void *toBeCopied);
39
40
41 void id3v2DeleteContentContextList(void *toBeDeleted);
42
43 char *id3v2PrintContentContextList(const void *toBePrinted);
44
45 void *id3v2CopyContentContextList(const void *toBeCopied);
46
47// context generators
48
49List *id3v2CreateTextFrameContext(void);
50
51List *id3v2CreateUserDefinedTextFrameContext(void);
52
53List *id3v2CreateURLFrameContext(void);
54
55List *id3v2CreateUserDefinedURLFrameContext(void);
56
57List *id3v2CreateAttachedPictureFrameContext(unsigned int version);
58
59List *id3v2CreateAudioEncryptionFrameContext(void);
60
61List *id3v2CreateAudioSeekPointIndexFrameContext(void);
62
63List *id3v2CreateCommentFrameContext(void);
64
65List *id3v2CreateCommercialFrameContext(void);
66
67List *id3v2CreateEncryptedMetaFrameContext(void);
68
69List *id3v2CreateRegistrationFrameContext(void); //ENCR GRID
70List *id3v2CreateMusicCDIdentifierFrameContext(void);
71
72List *id3v2CreatePlayCounterFrameContext(void);
73
74List *id3v2CreateEqualizationFrameContext(unsigned int version);
75
76List *id3v2CreateEventTimingCodesFrameContext(void);
77
78List *id3v2CreateGeneralEncapsulatedObjectFrameContext(void);
79
80List *id3v2CreateInvolvedPeopleListFrameContext(void);
81
82List *id3v2CreateLinkedInformationFrameContext(void);
83
84List *id3v2CreateMPEGLocationLookupTableFrameContext(void);
85
86List *id3v2CreateOwnershipFrameContext(void);
87
88List *id3v2CreatePopularimeterFrameContext(void);
89
90List *id3v2CreatePositionSynchronisationFrameContext(void);
91
92List *id3v2CreatePrivateFrameContext(void);
93
94List *id3v2CreateRecommendedBufferSizeFrameContext(void);
95
96List *id3v2CreateRelativeVolumeAdjustmentFrameContext(unsigned int version);
97
98List *id3v2CreateReverbFrameContext(void);
99
100List *id3v2CreateSeekFrameContext(void);
101
102List *id3v2CreateSignatureFrameContext(void);
103
104List *id3v2CreateSynchronisedLyricFrameContext(void);
105
106List *id3v2CreateSynchronisedTempoCodesFrameContext(void);
107
108List *id3v2CreateUniqueFileIdentifierFrameContext(void);
109
110List *id3v2CreateTermsOfUseFrameContext(void);
111
112List *id3v2CreateUnsynchronisedLyricFrameContext(void);
113
114List *id3v2CreateGenericFrameContext(void);
115
116// pairings
117
118HashTable *id3v2CreateDefaultIdentifierContextPairings(unsigned int version);
119
120 bool id3v2InsertIdentifierContextPair(HashTable *identifierContextPairs, char key[ID3V2_FRAME_ID_MAX_SIZE],
121 List *context);
122
123
124// convi
125
126uint8_t *id3v2ContextSerialize(Id3v2ContentContext *cc, size_t *outl);
127
128 char *id3v2ContextToJSON(const Id3v2ContentContext *cc);
129
130#ifdef __cplusplus
131} //extern c end
132#endif
133
134#endif
id3v2CreateGeneralEncapsulatedObjectFrameContext
List * id3v2CreateGeneralEncapsulatedObjectFrameContext(void)
Creates a context definition list for general encapsulated object frames (GEOB).
Definition id3v2Context.c:783
id3v2CreateURLFrameContext
List * id3v2CreateURLFrameContext(void)
Creates a context definition list for standard ID3v2 URL frames.
Definition id3v2Context.c:295
id3v2CreateAudioSeekPointIndexFrameContext
List * id3v2CreateAudioSeekPointIndexFrameContext(void)
Creates a context definition list for Audio Seek Point Index frames (ASPI).
Definition id3v2Context.c:406
id3v2CreateRecommendedBufferSizeFrameContext
List * id3v2CreateRecommendedBufferSizeFrameContext(void)
Creates a context definition list for recommended buffer size frames (RBUF).
Definition id3v2Context.c:1034
id3v2InsertIdentifierContextPair
bool id3v2InsertIdentifierContextPair(HashTable *identifierContextPairs, char key[ID3V2_FRAME_ID_MAX_SIZE], List *context)
Inserts a new frame identifier and context pairing into an existing frame mapping table.
Definition id3v2Context.c:1942
id3v2CreateCommentFrameContext
List * id3v2CreateCommentFrameContext(void)
Creates a context definition list for comment frames (COMM).
Definition id3v2Context.c:464
id3v2DeleteContentContext
void id3v2DeleteContentContext(void *toBeDeleted)
List/Hash API required functions.
Definition id3v2Context.c:100
id3v2CreateUniqueFileIdentifierFrameContext
List * id3v2CreateUniqueFileIdentifierFrameContext(void)
Creates a context definition list for unique file identifier frames (UFID).
Definition id3v2Context.c:1288
id3v2CreateEncryptedMetaFrameContext
List * id3v2CreateEncryptedMetaFrameContext(void)
Creates a context definition list for encrypted metadata frames (ENCR).
Definition id3v2Context.c:559
id3v2CreateSynchronisedLyricFrameContext
List * id3v2CreateSynchronisedLyricFrameContext(void)
Creates a context definition list for synchronised lyrics/text frames (SYLT).
Definition id3v2Context.c:1207
id3v2djb2
unsigned long id3v2djb2(const char *str)
Computes a DJB2 hash value for a null-terminated string.
Definition id3v2Context.c:32
id3v2CreateOwnershipFrameContext
List * id3v2CreateOwnershipFrameContext(void)
Creates a context definition list for ownership frames (OWNE).
Definition id3v2Context.c:911
id3v2CreateDefaultIdentifierContextPairings
HashTable * id3v2CreateDefaultIdentifierContextPairings(unsigned int version)
Creates a default mapping of frame identifiers to their corresponding parse contexts for all ID3v2 ve...
Definition id3v2Context.c:1416
id3v2CreateSignatureFrameContext
List * id3v2CreateSignatureFrameContext(void)
Creates a context definition list for signature frames (SIGN).
Definition id3v2Context.c:1176
id3v2CopyContentContextList
void * id3v2CopyContentContextList(const void *toBeCopied)
Creates a deep copy of a content context list.
Definition id3v2Context.c:222
id3v2CreateMPEGLocationLookupTableFrameContext
List * id3v2CreateMPEGLocationLookupTableFrameContext(void)
Creates a context definition list for MPEG location lookup table frames (MLLT).
Definition id3v2Context.c:887
id3v2CreateEqualizationFrameContext
List * id3v2CreateEqualizationFrameContext(unsigned int version)
Creates a context definition list for equalization frames (EQU/EQUA/EQU2).
Definition id3v2Context.c:672
id3v2CreateUserDefinedTextFrameContext
List * id3v2CreateUserDefinedTextFrameContext(void)
Creates a context definition list for user-defined text frames (TXXX).
Definition id3v2Context.c:268
id3v2CreateGenericFrameContext
List * id3v2CreateGenericFrameContext(void)
Creates a context definition list for generic frames with unknown or unrecognized structure.
Definition id3v2Context.c:1387
id3v2CreatePrivateFrameContext
List * id3v2CreatePrivateFrameContext(void)
Creates a context definition list for private frames (PRIV).
Definition id3v2Context.c:1006
id3v2DestroyContentContext
void id3v2DestroyContentContext(Id3v2ContentContext **toDelete)
Frees all memory allocated for a content context and nullifies the pointer.
Definition id3v2Context.c:79
id3v2ContextSerialize
uint8_t * id3v2ContextSerialize(Id3v2ContentContext *cc, size_t *outl)
Creates a binary representation of a content context structure for serialization.
Definition id3v2Context.c:1970
id3v2CreateRegistrationFrameContext
List * id3v2CreateRegistrationFrameContext(void)
Creates a context definition list for encryption method registration (ENCR) or group identification (...
Definition id3v2Context.c:590
id3v2CreateMusicCDIdentifierFrameContext
List * id3v2CreateMusicCDIdentifierFrameContext(void)
Creates a context definition list for music CD identifier frames (MCDI).
Definition id3v2Context.c:620
id3v2CreateTextFrameContext
List * id3v2CreateTextFrameContext(void)
Context list generation.
Definition id3v2Context.c:243
id3v2CreateSeekFrameContext
List * id3v2CreateSeekFrameContext(void)
Creates a context definition list for seek frames (SEEK).
Definition id3v2Context.c:1152
id3v2CreateAttachedPictureFrameContext
List * id3v2CreateAttachedPictureFrameContext(unsigned int version)
Creates a context definition list for attached picture frames (APIC/PIC).
Definition id3v2Context.c:352
id3v2CreateLinkedInformationFrameContext
List * id3v2CreateLinkedInformationFrameContext(void)
Creates a context definition list for linked information frames (LINK).
Definition id3v2Context.c:860
id3v2CreateUserDefinedURLFrameContext
List * id3v2CreateUserDefinedURLFrameContext(void)
Creates a context definition list for user-defined URL frames (WXXX).
Definition id3v2Context.c:318
id3v2PrintContentContext
char * id3v2PrintContentContext(const void *toBePrinted)
Generates a string representation of a content context for debugging.
Definition id3v2Context.c:151
id3v2CreateEventTimingCodesFrameContext
List * id3v2CreateEventTimingCodesFrameContext(void)
Creates a context definition list for event timing codes frames (ETCO).
Definition id3v2Context.c:745
id3v2CreateReverbFrameContext
List * id3v2CreateReverbFrameContext(void)
Creates a context definition list for reverb frames (RVRB).
Definition id3v2Context.c:1094
id3v2PrintContentContextList
char * id3v2PrintContentContextList(const void *toBePrinted)
Generates a string representation of a content context list for debugging.
Definition id3v2Context.c:208
id3v2CreatePositionSynchronisationFrameContext
List * id3v2CreatePositionSynchronisationFrameContext(void)
Creates a context definition list for position synchronisation frames (POSS).
Definition id3v2Context.c:978
id3v2CreateAudioEncryptionFrameContext
List * id3v2CreateAudioEncryptionFrameContext(void)
Creates a context definition list for Audio Encryption frames (AENC).
Definition id3v2Context.c:429
id3v2CreatePopularimeterFrameContext
List * id3v2CreatePopularimeterFrameContext(void)
Creates a context definition list for popularimeter frames (POPM).
Definition id3v2Context.c:947
id3v2CreateInvolvedPeopleListFrameContext
List * id3v2CreateInvolvedPeopleListFrameContext(void)
Creates a context definition list for involved people list frames (IPLS) in ID3v2....
Definition id3v2Context.c:824
id3v2DeleteContentContextList
void id3v2DeleteContentContextList(void *toBeDeleted)
Frees all memory allocated for a list of content contexts.
Definition id3v2Context.c:194
id3v2CreateSynchronisedTempoCodesFrameContext
List * id3v2CreateSynchronisedTempoCodesFrameContext(void)
Creates a context definition list for synchronised tempo codes frames (SYTC).
Definition id3v2Context.c:1260
id3v2CreateTermsOfUseFrameContext
List * id3v2CreateTermsOfUseFrameContext(void)
Creates a context definition list for terms of use frames (USER).
Definition id3v2Context.c:1317
id3v2ContextToJSON
char * id3v2ContextToJSON(const Id3v2ContentContext *cc)
Converts a content context structure to its JSON representation.
Definition id3v2Context.c:2033
id3v2CreateUnsynchronisedLyricFrameContext
List * id3v2CreateUnsynchronisedLyricFrameContext(void)
Creates a context definition list for unsynchronised lyrics/text frames (USLT).
Definition id3v2Context.c:1352
id3v2CreatePlayCounterFrameContext
List * id3v2CreatePlayCounterFrameContext(void)
Creates a context definition list for play counter frames (PCNT).
Definition id3v2Context.c:642
id3v2CreateRelativeVolumeAdjustmentFrameContext
List * id3v2CreateRelativeVolumeAdjustmentFrameContext(unsigned int version)
Creates a context definition list for relative volume adjustment frames (RVA/RVAD/RVA2).
Definition id3v2Context.c:1068
id3v2CreateCommercialFrameContext
List * id3v2CreateCommercialFrameContext(void)
Creates a context definition list for commercial frames (COMR).
Definition id3v2Context.c:503
id3v2CreateContentContext
Id3v2ContentContext * id3v2CreateContentContext(Id3v2ContextType type, size_t key, size_t max, size_t min)
Creates a content context structure defining entry constraints and metadata.
Definition id3v2Context.c:60
id3v2CompareContentContext
int id3v2CompareContentContext(const void *first, const void *second)
Performs comparison of two content context structures.
Definition id3v2Context.c:115
id3v2CopyContentContext
void * id3v2CopyContentContext(const void *toBeCopied)
Creates a deep copy of a content context structure.
Definition id3v2Context.c:174
id3v2Types.h
Definitions for ID3v2.x tag structure, constants, and genre enumeration.
Id3v2ContentContext
struct _Id3v2ContentContext Id3v2ContentContext
Parsing instructions for a single field within an ID3v2 frame.
ID3V2_FRAME_ID_MAX_SIZE
#define ID3V2_FRAME_ID_MAX_SIZE
Maximum size in bytes for a frame ID field (4 bytes).
Definition id3v2Types.h:70
Id3v2ContextType
enum _Id3v2ContextType Id3v2ContextType
Context types for parsing and writing ID3v2 frame content fields.