Playlists

The playlist daemon
Creating playlists
Removing playlists
Handling playlists elements
Inserting items
Removing items
Moving items
Getting information from playlists
Synchronously without metadata
Asynchronously with metadata
Shuffle and unshuffle

The playlist daemon

MAFW playlists are shared, this means they are stored and exposed by the mafw-playlist-daemon, which makes them available for all MAFW based applications, that can access and manipulate them concurrently through its API.

Because the playlists are always remote objects stored and handled by a separate process, whenever the application needs to deal with a playlist there is a need for inter-process communications. However these communications are hidden to developers by using a proxy object. These proxy objects allow developers to interact with the playlists as if they were local objects, making the underlying communications with the playlist daemon transparent for the application developer.

Operations like creating or removing a playlist or obtaining the list of available playlists, are done through the MafwPlaylistManager object. This object acts as a proxy of the playlist daemon, for playlist related operations that do not deal with a particular playlist. A reference to this object can be obtained like this:

MafwPlaylistManager *manager = mafw_playlist_manager_get ();
     

The following sections explain in more detail how to use the MafwPlaylistManager and proxy playlist objects.