Methods
ActivatePlaylist | (o: PlaylistId) | → | nothing | |
GetPlaylists | (u: Index, u: MaxCount, s: Order, b: ReverseOrder) | → | a(oss): Playlists |
Signals
PlaylistChanged | ((oss): Playlist) |
Properties
PlaylistCount | u | Read only | ||
Orderings | as (Playlist_Ordering_List) | Read only | ||
ActivePlaylist | (b(oss)) (Maybe_Playlist) | Read only |
Types
Playlist_Id | Simple Type | o | |
Uri | Simple Type | s | |
Playlist_Ordering | Enum | s | |
Playlist | Struct | (oss) | |
Maybe_Playlist | Struct | (b(oss)) |
Description
Provides access to the media player's playlists.
Since D-Bus does not provide an easy way to check for what interfaces are exported on an object, clients should attempt to get one of the properties on this interface to see if it is implemented.
Methods
ActivatePlaylist (o: PlaylistId) → nothing
Parameters
- PlaylistId — o
The id of the playlist to activate.
Starts playing the given playlist.
Note that this must be implemented. If the media player does not allow clients to change the playlist, it should not implement this interface at all.
It is up to the media player whether this completely replaces the current tracklist, or whether it is merely inserted into the tracklist and the first track starts. For example, if the media player is operating in a "jukebox" mode, it may just append the playlist to the list of upcoming tracks, and skip to the first track in the playlist.
GetPlaylists (u: Index, u: MaxCount, s: Order, b: ReverseOrder) → a(oss): Playlists
Parameters
- Index — u
- MaxCount — u
- Order — s (Playlist_Ordering)
- ReverseOrder — b
The index of the first playlist to be fetched (according to the ordering).
The maximum number of playlists to fetch.
The ordering that should be used.
Whether the order should be reversed.
Returns
- Playlists — a(oss) (Playlist_List)
A list of (at most MaxCount) playlists.
Gets a set of playlists.
Signals
PlaylistChanged ((oss): Playlist)
Parameters
- Playlist — (oss) (Playlist)
Indicates that either the Name or Icon attribute of a playlist has changed.
Client implementations should be aware that this signal may not be implemented.
Rationale:
Properties
PlaylistCount — u
org.freedesktop.DBus.Properties.PropertiesChanged
signal is emitted with the new value.
The number of playlists available.
Orderings — as (Playlist_Ordering_List)
org.freedesktop.DBus.Properties.PropertiesChanged
signal is emitted with the new value.
The available orderings. At least one must be offered.
Rationale:
Media players may not have access to all the data required for some orderings. For example, creation times are not available on UNIX filesystems (don't let the ctime fool you!). On the other hand, clients should have some way to get the "most recent" playlists.
ActivePlaylist — (b(oss)) (Maybe_Playlist)
org.freedesktop.DBus.Properties.PropertiesChanged
signal is emitted with the new value.
The currently-active playlist.
If there is no currently-active playlist, the structure's Valid field will be false, and the Playlist details are undefined.
Note that this may not have a value even after ActivatePlaylist is called with a valid playlist id as ActivatePlaylist implementations have the option of simply inserting the contents of the playlist into the current tracklist.
Types
Playlist_Id — o
Unique playlist identifier.
Rationale:
Multiple playlists may have the same name.
This is a D-Bus object id as that is the definitive way to have unique identifiers on D-Bus. It also allows for future optional expansions to the specification where tracks are exported to D-Bus with an interface similar to org.gnome.UPnP.MediaItem2.
Playlist_Ordering — s
Specifies the ordering of returned playlists.
- Alphabetical (Alphabetical)
- CreationDate (Created)
- ModifiedDate (Modified)
- LastPlayDate (Played)
- UserDefined (User)
Alphabetical ordering by name, ascending.
Ordering by creation date, oldest first.
Ordering by last modified date, oldest first.
Ordering by date of last playback, oldest first.
A user-defined ordering.
Rationale:
Some media players may allow users to order playlists as they wish. This ordering allows playlists to be retreived in that order.
Playlist — (oss)
A data structure describing a playlist.
- Id — o (Playlist_Id)
- Name — s
- Icon — s (Uri)
A unique identifier for the playlist.
This should remain the same if the playlist is renamed.
The name of the playlist, typically given by the user.
The URI of an (optional) icon.
Maybe_Playlist — (b(oss))
A data structure describing a playlist, or nothing.
Rationale:
D-Bus does not (at the time of writing) support a MAYBE type, so we are forced to invent our own.
- Valid — b
- Playlist — (oss) (Playlist)
Whether this structure refers to a valid playlist.
The playlist, providing Valid is true, otherwise undefined.
When constructing this type, it should be noted that the playlist ID must be a valid object path, or D-Bus implementations may reject it. This is true even when Valid is false. It is suggested that "/" is used as the playlist ID in this case.