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