id3dev 26.01
An ID3 metadata library
Loading...
Searching...
No Matches
id3v1.h
Go to the documentation of this file.
1
10
11#ifndef ID3V1
12#define ID3V1
13
14#ifdef __cplusplus
15extern "C"{
16#endif
17
18#include "id3v1Types.h"
19
20Id3v1Tag *id3v1TagFromFile(const char *filePath);
21
23
24
25//functions to change values within an id3v1 structure
26
27int id3v1WriteTitle(const char *title, Id3v1Tag *tag);
28
29int id3v1WriteArtist(const char *artist, Id3v1Tag *tag);
30
31int id3v1WriteAlbum(const char *album, Id3v1Tag *tag);
32
33int id3v1WriteYear(int year, Id3v1Tag *tag);
34
35int id3v1WriteComment(const char *comment, Id3v1Tag *tag);
36
37int id3v1WriteGenre(Genre genre, Id3v1Tag *tag);
38
39int id3v1WriteTrack(int track, Id3v1Tag *tag);
40
41//util functions
42
43bool id3v1CompareTag(const Id3v1Tag *tag1, const Id3v1Tag *tag2);
44
45char *id3v1GenreFromTable(Genre val);
46
47//compatability functions a.k.a getters
48
49char *id3v1ReadTitle(const Id3v1Tag *tag);
50
51char *id3v1ReadArtist(const Id3v1Tag *tag);
52
53char *id3v1ReadAlbum(const Id3v1Tag *tag);
54
55int id3v1ReadYear(const Id3v1Tag *tag);
56
57char *id3v1ReadComment(const Id3v1Tag *tag);
58
59Genre id3v1ReadGenre(const Id3v1Tag *tag);
60
61int id3v1ReadTrack(const Id3v1Tag *tag);
62
63//writes
64
65char *id3v1ToJSON(const Id3v1Tag *tag);
66
67int id3v1WriteTagToFile(const char *filePath, const Id3v1Tag *tag);
68
69#ifdef __cplusplus
70} //extern c end
71#endif
72
73#endif
Id3v1Tag * id3v1CopyTag(Id3v1Tag *toCopy)
Creates a deep copy of an Id3v1Tag structure.
Definition id3v1.c:64
char * id3v1ReadComment(const Id3v1Tag *tag)
Reads the comment member from an Id3v1Tag.
Definition id3v1.c:679
int id3v1ReadTrack(const Id3v1Tag *tag)
Reads a track number from a tag.
Definition id3v1.c:701
char * id3v1GenreFromTable(Genre val)
Converts a Genre enum value to it's string representation.
Definition id3v1.c:235
int id3v1WriteArtist(const char *artist, Id3v1Tag *tag)
Writes an artist to an Id3v1Tag.
Definition id3v1.c:111
char * id3v1ReadArtist(const Id3v1Tag *tag)
Reads the artist member from an Id3v1Tag.
Definition id3v1.c:645
int id3v1WriteGenre(Genre genre, Id3v1Tag *tag)
Writes a Genre to an Id3v1Tag.
Definition id3v1.c:160
Genre id3v1ReadGenre(const Id3v1Tag *tag)
Reads a Genre from a tag.
Definition id3v1.c:691
int id3v1WriteTagToFile(const char *filePath, const Id3v1Tag *tag)
Writes/Overwrites an Id3v1Tag to the bottom of a file .
Definition id3v1.c:759
char * id3v1ToJSON(const Id3v1Tag *tag)
Converts an Id3v1Tag to a JSON string representation.
Definition id3v1.c:713
int id3v1WriteComment(const char *comment, Id3v1Tag *tag)
Writes a comment to an Id3v1Tag.
Definition id3v1.c:149
char * id3v1ReadTitle(const Id3v1Tag *tag)
Reads the title member from an Id3v1Tag.
Definition id3v1.c:633
int id3v1ReadYear(const Id3v1Tag *tag)
Reads the year member from an Id3v1Tag.
Definition id3v1.c:669
int id3v1WriteAlbum(const char *album, Id3v1Tag *tag)
Writes an album to an Id3v1Tag.
Definition id3v1.c:122
int id3v1WriteTitle(const char *title, Id3v1Tag *tag)
Writes a title to an Id3v1Tag.
Definition id3v1.c:100
Id3v1Tag * id3v1TagFromFile(const char *filePath)
Creates an Id3v1Tag from a provided file path.
Definition id3v1.c:29
int id3v1WriteTrack(int track, Id3v1Tag *tag)
Writes a track number to an Id3v1Tag.
Definition id3v1.c:176
int id3v1WriteYear(int year, Id3v1Tag *tag)
Writes a year to an Id3v1Tag.
Definition id3v1.c:133
bool id3v1CompareTag(const Id3v1Tag *tag1, const Id3v1Tag *tag2)
Compares two Id3v1Tag structures for equality.
Definition id3v1.c:192
char * id3v1ReadAlbum(const Id3v1Tag *tag)
Reads the album member from an Id3v1Tag.
Definition id3v1.c:657
Definitions for ID3v1 tag structure, constants, and genre enumeration.
enum _Genre Genre
ID3v1 genre enumeration with Winamp extensions (genres 0-191).
struct _Id3v1Tag Id3v1Tag
ID3v1/ID3v1.1 tag structure containing all metadata fields.