id3.h File Reference

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 Documentation

#define TAG_LENGTH   128

Definition at line 29 of file id3.h.

Referenced by id3_read(), id3_read_tag(), and id3_write().

#define SIZE_INFO   30

Definition at line 31 of file id3.h.

Referenced by id3_extract_info(), and id3_write_tag().

#define SIZE_YEAR   4

Definition at line 32 of file id3.h.

Referenced by id3_extract_info(), and id3_write_tag().

#define SIZE_GENRE   1

Definition at line 33 of file id3.h.

#define SIZE_TRACK   1

Definition at line 34 of file id3.h.

#define OFFSET_TITLE   3

Definition at line 36 of file id3.h.

Referenced by id3_extract_info().

#define OFFSET_ARTIST   33

Definition at line 37 of file id3.h.

Referenced by id3_extract_info().

#define OFFSET_ALBUM   63

Definition at line 38 of file id3.h.

Referenced by id3_extract_info().

#define OFFSET_YEAR   93

Definition at line 39 of file id3.h.

Referenced by id3_extract_info().

#define OFFSET_COMMENT   97

Definition at line 40 of file id3.h.

Referenced by id3_extract_info().

#define OFFSET_TRACK   126

Definition at line 41 of file id3.h.

Referenced by id3_extract_info().

#define OFFSET_GENRE   127

Definition at line 42 of file id3.h.

Referenced by id3_extract_info().

#define GENRE_MAX   147

Definition at line 44 of file id3.h.

Referenced by id3_get_genre_as_string().


Function Documentation

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 
)

Definition at line 96 of file id3.c.

References TAG_LENGTH.

Referenced by id3_read().

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  ) 

Definition at line 141 of file id3.c.

Referenced by id3_read().

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]


Variable Documentation

const char* genres[] [static]

Definition at line 46 of file id3.h.

Referenced by id3_get_genre_as_string().


Generated on Thu Jul 19 13:36:09 2007 for libv by  doxygen 1.5.1-p1. Thank you, SourceForge.net Logo