Database Playlist
[Database]


Functions

int mpd_database_delete_playlist (MpdObj *mi, const char *path)
int mpd_database_save_playlist (MpdObj *mi, const char *name)
MpdDatampd_database_get_playlist_content (MpdObj *mi, const char *playlist)
void mpd_database_playlist_list_add (MpdObj *mi, const char *path, const char *file)
void mpd_database_playlist_list_delete (MpdObj *mi, const char *path, int pos)
void mpd_database_playlist_clear (MpdObj *mi, const char *path)
void mpd_database_playlist_rename (MpdObj *mi, const char *old_name, const char *new_name)
int mpd_database_playlist_move (MpdObj *mi, const char *playlist, int old_pos, int new_pos)
MpdDatampd_database_playlist_list (MpdObj *mi)

Function Documentation

int mpd_database_delete_playlist ( MpdObj mi,
const char *  path 
)

Parameters:
mi A MpdObj
path path of the playlist
Deletes a playlist.
Returns:
a MpdError

MpdData* mpd_database_get_playlist_content ( MpdObj mi,
const char *  playlist 
)

Parameters:
mi a MpdObj
playlist the playlist you need the content of.
Needs mpd 0.12.0 or higher.

Returns:
a MpdData list

void mpd_database_playlist_clear ( MpdObj mi,
const char *  path 
)

Parameters:
mi a MpdObj
path a string containing the path of the playlist
Clears the content of a stored playlist, also used to create an empty playlist Needs mpd 0.13.0

MpdData* mpd_database_playlist_list ( MpdObj mi  ) 

void mpd_database_playlist_list_add ( MpdObj mi,
const char *  path,
const char *  file 
)

Parameters:
mi a MpdObj
path a string contains the path of the playlist
file a string contains the path of the song to add
Add a path to a stored playlist. Needs 0.13.0

void mpd_database_playlist_list_delete ( MpdObj mi,
const char *  path,
int  pos 
)

Parameters:
mi a MpdObj
path a string containing the path of the playlist
pos an int representing the position of a song
Deletes the song at position pos from a playlist. Needs mpd 0.13.0

int mpd_database_playlist_move ( MpdObj mi,
const char *  playlist,
int  old_pos,
int  new_pos 
)

Parameters:
mi a MpdObj
playlist a string containing the path of the playlist
old_pos an integer representing old position
new_pos an integer representing the position to move old_pos to.
Moves songs in a stored playlist Needs mpd 0.13.0

void mpd_database_playlist_rename ( MpdObj mi,
const char *  old_name,
const char *  new_name 
)

Parameters:
mi a MpdObj
old a string, old playlist name
new a string, new playlist name
Renames a stored playlist Needs mpd 0.13.0

int mpd_database_save_playlist ( MpdObj mi,
const char *  name 
)

Parameters:
mi a MpdObj
name The name of the playlist
Saves the current playlist to a file.

Returns:
a MpdError. MPD_OK if successful, MPD_DATABASE_PLAYLIST_EXIST when the playlist already exists.


Copyright 2006 Qball Cow