Go to the source code of this file.
Data Structures | |
struct | id3 |
Defines | |
#define | TAG_LENGTH 128 |
#define | SIZE_INFO 30 |
#define | SIZE_YEAR 4 |
#define | SIZE_GENRE 1 |
#define | SIZE_TRACK 1 |
#define | OFFSET_TITLE 3 |
#define | OFFSET_ARTIST 33 |
#define | OFFSET_ALBUM 63 |
#define | OFFSET_YEAR 93 |
#define | OFFSET_COMMENT 97 |
#define | OFFSET_TRACK 126 |
#define | OFFSET_GENRE 127 |
#define | GENRE_MAX 147 |
Functions | |
int | id3_read (const char *_path, struct id3 *_id3) |
int | id3_write (const char *_path, struct id3 *_id3) |
void | id3_print (struct id3 *_id3) |
int | id3_read_tag (const char *_path, char *_tag) |
int | id3_write_tag (FILE *_fp, struct id3 *_id3) |
int | id3_check_tag (const char *_tag) |
int | id3_extract_info (const char *_tag, struct id3 *_id3) |
void | id3_normalize_info (struct id3 *_id3) |
void | id3_get_genre_as_string (struct id3 *_id3, char *_genre) |
static void | remove_trailing_whitespaces (char *_str) |
static void | write_with_padding (FILE *_fp, const char *_str, size_t _len) |
Variables | |
static const char * | genres [] |
#define TAG_LENGTH 128 |
#define SIZE_INFO 30 |
#define SIZE_YEAR 4 |
#define OFFSET_TITLE 3 |
#define OFFSET_ARTIST 33 |
#define OFFSET_ALBUM 63 |
#define OFFSET_YEAR 93 |
#define OFFSET_COMMENT 97 |
#define OFFSET_TRACK 126 |
#define OFFSET_GENRE 127 |
#define GENRE_MAX 147 |
int id3_read | ( | const char * | _path, | |
struct id3 * | _id3 | |||
) |
Definition at line 32 of file id3.c.
References id3_check_tag(), id3_extract_info(), id3_normalize_info(), id3_read_tag(), and TAG_LENGTH.
Referenced by id3_write(), and main().
int id3_write | ( | const char * | _path, | |
struct id3 * | _id3 | |||
) |
Definition at line 53 of file id3.c.
References id3_read(), id3_write_tag(), and TAG_LENGTH.
Referenced by main().
void id3_print | ( | struct id3 * | _id3 | ) |
Definition at line 79 of file id3.c.
References id3::album, id3::artist, id3::comment, id3::genre, id3_get_genre_as_string(), id3::title, id3::track, and id3::year.
Referenced by main().
int id3_read_tag | ( | const char * | _path, | |
char * | _tag | |||
) |
int id3_write_tag | ( | FILE * | _fp, | |
struct id3 * | _id3 | |||
) |
Definition at line 119 of file id3.c.
References id3::album, id3::artist, id3::comment, id3::genre, SIZE_INFO, SIZE_YEAR, id3::title, id3::track, write_with_padding(), and id3::year.
Referenced by id3_write().
int id3_check_tag | ( | const char * | _tag | ) |
int id3_extract_info | ( | const char * | _tag, | |
struct id3 * | _id3 | |||
) |
Definition at line 152 of file id3.c.
References id3::album, id3::artist, id3::comment, id3::genre, OFFSET_ALBUM, OFFSET_ARTIST, OFFSET_COMMENT, OFFSET_GENRE, OFFSET_TITLE, OFFSET_TRACK, OFFSET_YEAR, SIZE_INFO, SIZE_YEAR, id3::title, id3::track, and id3::year.
Referenced by id3_read().
void id3_normalize_info | ( | struct id3 * | _id3 | ) |
Definition at line 193 of file id3.c.
References id3::album, id3::artist, id3::comment, remove_trailing_whitespaces(), and id3::title.
Referenced by id3_read().
void id3_get_genre_as_string | ( | struct id3 * | _id3, | |
char * | _genre | |||
) |
Definition at line 203 of file id3.c.
References id3::genre, GENRE_MAX, and genres.
Referenced by id3_print().
static void remove_trailing_whitespaces | ( | char * | _str | ) | [static] |
static void write_with_padding | ( | FILE * | _fp, | |
const char * | _str, | |||
size_t | _len | |||
) | [static] |
const char* genres[] [static] |