libcdio  0.82
Data Structures | Defines | Enumerations | Functions
cdtext.h File Reference

The top-level header for CD-Text information. Applications include this for CD-Text access. More...

#include <cdio/cdio.h>

Go to the source code of this file.

Data Structures

struct  cdtext
 structure for holding CD-Text information More...

Defines

#define MAX_CDTEXT_FIELDS   13
#define MIN_CDTEXT_FIELD   0

Enumerations

enum  cdtext_field_t {
  CDTEXT_ARRANGER = 0, CDTEXT_COMPOSER = 1, CDTEXT_DISCID = 2, CDTEXT_GENRE = 3,
  CDTEXT_MESSAGE = 4, CDTEXT_ISRC = 5, CDTEXT_PERFORMER = 6, CDTEXT_SIZE_INFO = 7,
  CDTEXT_SONGWRITER = 8, CDTEXT_TITLE = 9, CDTEXT_TOC_INFO = 10, CDTEXT_TOC_INFO2 = 11,
  CDTEXT_UPC_EAN = 12, CDTEXT_INVALID = MAX_CDTEXT_FIELDS
}
 A list of all of the CD-Text fields. Because the interval has no gaps, we can use ++ to iterate over fields. More...

Functions

const char * cdtext_field2str (cdtext_field_t i)
void cdtext_init (cdtext_t *cdtext)
void cdtext_destroy (cdtext_t *cdtext)
char * cdtext_get (cdtext_field_t key, const cdtext_t *cdtext)
const char * cdtext_get_const (cdtext_field_t key, const cdtext_t *cdtext)
cdtext_field_t cdtext_is_keyword (const char *key)
void cdtext_set (cdtext_field_t key, const char *value, cdtext_t *cdtext)

Detailed Description

The top-level header for CD-Text information. Applications include this for CD-Text access.


Define Documentation

#define MAX_CDTEXT_FIELDS   13
#define MIN_CDTEXT_FIELD   0

Enumeration Type Documentation

A list of all of the CD-Text fields. Because the interval has no gaps, we can use ++ to iterate over fields.

Enumerator:
CDTEXT_ARRANGER 

name(s) of the arranger(s)

CDTEXT_COMPOSER 

name(s) of the composer(s)

CDTEXT_DISCID 

disc identification information

CDTEXT_GENRE 

genre identification and genre information

CDTEXT_MESSAGE 

ISRC code of each track

CDTEXT_ISRC 

message(s) from the content provider or artist

CDTEXT_PERFORMER 

name(s) of the performer(s)

CDTEXT_SIZE_INFO 

size information of the block

CDTEXT_SONGWRITER 

name(s) of the songwriter(s)

CDTEXT_TITLE 

title of album name or track titles

CDTEXT_TOC_INFO 

table of contents information

CDTEXT_TOC_INFO2 

second table of contents information

CDTEXT_UPC_EAN 
CDTEXT_INVALID 

Function Documentation

void cdtext_destroy ( cdtext_t cdtext)

Free memory assocated with cdtext

const char* cdtext_field2str ( cdtext_field_t  i)

Return string representation of the enum values above

char* cdtext_get ( cdtext_field_t  key,
const cdtext_t cdtext 
)

returns an allocated string associated with the given field. NULL is returned if key is CDTEXT_INVALID or the field is not set.

The user needs to free the string when done with it.

See also:
cdio_get_const to retrieve a constant string that doesn't have to be freed.
const char* cdtext_get_const ( cdtext_field_t  key,
const cdtext_t cdtext 
)

returns a const string associated with the given field. NULL is returned if key is CDTEXT_INVALID or the field is not set.

Don't use the string when the cdtext object (i.e. the CdIo_t object you got it from) is no longer valid.

See also:
cdio_get to retrieve an allocated string that persists past the cdtext object.
void cdtext_init ( cdtext_t cdtext)

Initialize a new cdtext structure. When the structure is no longer needed, release the resources using cdtext_delete.

cdtext_field_t cdtext_is_keyword ( const char *  key)

returns enum of keyword if key is a CD-Text keyword, returns MAX_CDTEXT_FIELDS non-zero otherwise.

void cdtext_set ( cdtext_field_t  key,
const char *  value,
cdtext_t cdtext 
)

sets cdtext's keyword entry to field


Generated for libcdio by doxygen 1.7.6.1