Command Queue
[Playlist]


Functions

int mpd_playlist_queue_add (MpdObj *mi, const char *path)
int mpd_playlist_queue_load (MpdObj *mi, const char *path)
int mpd_playlist_queue_delete_id (MpdObj *mi, int id)
int mpd_playlist_queue_delete_pos (MpdObj *mi, int songpos)
int mpd_playlist_queue_commit (MpdObj *mi)

Detailed Description

These functions allow you to queue commands, and send them in one command list to mpd. This is very efficient. It's advised to use these for large deletions and additions. These functions don't cause an extra overhead compared to the non_queue functions. Because the non_queue functions just wrap the following.

Function Documentation

int mpd_playlist_queue_add ( MpdObj mi,
const char *  path 
)

Parameters:
mi a MpdObj
path The path to a song to add
This queues an add command. The actual add isn't done until mpd_playlist_queue_commit is called

Returns:
a MpdError

int mpd_playlist_queue_commit ( MpdObj mi  ) 

Parameters:
mi a MpdObj
Commits the queue'd commands in a command list. This is an efficient way of doing a lot of adds/removes.

Returns:
a MpdError

int mpd_playlist_queue_delete_id ( MpdObj mi,
int  id 
)

Parameters:
mi a MpdObj
id The songid of the song you want to delete
This queues a delete song from playlist command. The actually delete isn't done until mpd_playlist_queue_commit is called
Returns:
a MpdError

int mpd_playlist_queue_delete_pos ( MpdObj mi,
int  songpos 
)

Parameters:
mi a MpdObj
songpos a song pos.
Queues the deletion of a single song by it's position.

Returns:
a MpdError

int mpd_playlist_queue_load ( MpdObj mi,
const char *  path 
)

Parameters:
mi a MpdObj
path The path to a playlist to load
This queues a load command. The actual load isn't done until mpd_playlist_queue_commit is called

Returns:
a MpdError


Copyright 2006 Qball Cow