147 #define XSPF_LIST_FOREACH_TRACK(l,t) \ 148 for ((t) = (l)->tracks; (t) != NULL; (t) = (t)->next) 152 #define XSPF_TRACK_FOREACH_LOCATION(t,l) \ 153 for ((l) = (t)->locations; (l) != NULL; (l) = (l)->next) 157 #define XSPF_TRACK_FOREACH_IDENTIFIER(t,i) \ 158 for ((i) = (t)->identifiers; (i) != NULL; (i) = (i)->next) struct xspf_mvalue * xspf_new_mvalue_before(struct xspf_mvalue **mvalue)
Insert a new mvalue to the linked list before the specified one. This routine can also be used to ins...
struct xspf_list * xspf_parse_memory(char const *memory, int len_bytes, char const *baseuri)
Parse an XSPF file from memory.
void * pdata
Private data that can be freely used.
int tracknum
Track number.
Linked list for values inside tracks or lists with string values.
struct xspf_mvalue * identifiers
Unique track identifiers.
char * license
Playlist's license.
struct xspf_list * xspf_parse(char const *filename, char const *baseuri)
Parse an XSPF file by filename.
Single track in an XSPF list.
int duration
Track duration in milliseconds.
struct xspf_track * tracks
Linked list of tracks inside the playlist.
char * album
Album or collection of origin.
void * pdata
Private data that can be freely used.
char * identifier
Playlist's unique indentifier.
char * title
Track's display name.
struct xspf_mvalue * next
Pointer to next object in the list.
void * pdata
Private data that can be freely used.
char * location
Playlist's file location.
struct xspf_list * xspf_new(void)
Create a new empty XSPF playlist.
char * creator
Track's creator.
struct xspf_track * xspf_new_track_before(struct xspf_track **track)
Insert a new track to the linked list before the specified one. This routine can also be used to inse...
void xspf_setvalue(char **str, char const *nstr)
Set or overwrite a value in the xspf_list, xspf_track or xspf_mvalue structures. Passing NULL will un...
int xspf_write(struct xspf_list *list, char const *filename, char const *baseuri)
Write the Xspf playlist to a file.
struct xspf_mvalue * locations
Track's file locations.
struct xspf_track * next
Pointer to next track.
void xspf_free(struct xspf_list *list)
Free the parser results.
char * value
Value of the current list entry.