The pigment plugin exports a DBus API so that external applications can show or hide the viewport window programmatically. In addition, the plugin checks if the command line argument --headless is passed to start Elisa, in which case it starts with the viewport window hidden. Headless mode is the default when Elisa is automatically started by DBus.
The plugin opens a connection to the session bus, under the com.fluendo.Elisa name. Under this name, it registers the /com/fluendo/Elisa/Plugins/Pigment/Frontend object. The object implements the com.fluendo.Elisa.Plugins.Pigment.Frontend interface which can be used to show or hide the viewport.
The poblesec plugin implements a DBus API to programmatically activate specific parts of the user interface.
The plugin opens a connection to the session bus, with the com.fluendo.Elisa name. In the connection it registers an object having the path /com/fluendo/Elisa/Plugins/Poblesec/Browser. The object implements the com.fluendo.Elisa.Plugins.Poblesec.Browser interface, which can be used to browse certain sections of the user interface.
Interface implemented by the object registered at /com/fluendo/Elisa/Plugins/Poblesec/Browser`.
Methods
Open the photo album located at album_path inside Elisa.
| Parameters: |
|
|---|---|
| Returns: | nothing |
Open the photo album located at album_path inside the slideshow.
| Parameters: |
|
|---|---|
| Returns: | nothing |
Open a music album in Elisa. artist_name and album_name must be present in the database.
| Parameters: |
|
|---|---|
| Returns: | nothing |
Open the specified section inside Elisa.
| Parameters: |
|
|---|---|
| Returns: | nothing |
The database plugin exposes a DBus API for external applications to interact with our database without having to use SQL. It also allows to control the media scanning process.
External applications can get a list of photo albums and relative pictures by calling methods on the /com/fluendo/Elisa/Plugins/Database/Photo object, which implements the com.fluendo.Elisa.Plugins.Database.Photo interface.
Interface of the object registered at /com/fluendo/Elisa/Plugins/Database/Photo. It can be used to get a list of photo albums and their pictures.
Methods
Get a range of album names to return from the list of photo albums sorted in alphanumerical order. The range starts at start and contains up to count elements.
| Parameters: |
|
|---|---|
| Returns: | album names |
| Return type: | array of strings |
Get the list of absolute pathnames to the pictures contained in the album album_name. album_name is the name of an album as returned by get_albums(). If the album doesn’t exist in the database, PhotoAlbumNotFoundError is raised.
| Parameters: |
|
|---|---|
| Returns: | absolute paths pointing to pictures belonging to the album |
| Return type: | array of strings |
Get the last displayed picture. Note that only local pictures indexed in the database are returned.
| Returns: | an array containing album_name, picture_path |
|---|---|
| Return type: | array of strings |
Signals
The last_displayed_picture signal is emitted whenever a new picture is shown inside Elisa. Note that the signal is only emitted for local indexed pictures.
| Parameters: |
|
|---|
As for photo, external applications can access music related functionality by calling methods on the /com/fluendo/Elisa/Plugins/Database/Music object. The Music object implements the com.fluendo.Elisa.Plugins.Database.Music interface.
Interface of the object registered at /com/fluendo/Elisa/Plugins/Database/Music. It can be used to get a list of music albums and tracks.
Methods
Get a range of album names to return from the list of music albums sorted in alphanumerical order. The range starts at start and contains up to count elements. The return value is an array of arrays of strings, where inner arrays contain two strings representing artist name and album name respectively.
| Parameters: |
|
|---|---|
| Returns: | array of (artist, album) string pairs |
| Return type: | array of arrays of strings |
Get the absolute path to the artwork image for the given album. If the artist or the album don’t exist, ArtistNotFoundError or MusicAlbumNotFoundError are raised respectively.
| Parameters: |
|
|---|---|
| Returns: | absolute path to the cover artwork image or the empty string |
| Return type: | string |
Get the list of tracks in the album. A track is represented as a (track_name, track_path) string pair. If the artist or the album don’t exist, ArtistNotFoundError or MusicAlbumNotFoundError are raised respectively.
| Parameters: |
|
|---|---|
| Returns: | an array of (track_name, track_path) string pairs |
| Return type: | array of arrays of strings |
Get the last played track. Only local tracks indexed in the database are returned.
| Returns: | an array containing artist_name, album_name, track_title, track_path |
|---|---|
| Return type: | array of strings |
Signals
The last_played_track signal is emitted whenever a new track starts playing within Elisa. The signal is emitted only for local tracks contained in the database.
| Parameters: |
|
|---|
External applications can stop and restart the media scanning process of elisa by calling methods on the /com/fluendo/Elisa/Database/MediaScanner object, which implements the com.fluendo.Elisa.Plugins.Database.MediaScanner interface.
Interface of the object registered at /com/fluendo/Elisa/Plugins/Database/MediaScanner. It allows a basic control of the media scanning process in Elisa.
Methods
(Re-)Start the scanning process from the beginning. If the scanning process is already running nothing happens. This does not stop and restart the scanning process. Please use the stop() method and wait for it before calling start() if you want to restart a running scan process from the beginning.
| Returns: | nothing |
|---|
Stop the scanning process after the current file was beeen processed. Returns as soon as the scanning stopped.
| Returns: | nothing |
|---|
External applications can control the audio player of elisa by calling methods on the /com/fluendo/Elisa/Plugins/Poblesec/AudioPlayer object. The AudioPlayer object implements the com.fluendo.Elisa.Plugins.Poblesec.AudioPlayer interface. This interface provides methods to control the audio player and signals triggered when some states of the audio player change.
Interface of the object registered at /com/fluendo/Elisa/Plugins/Poblesec/AudioPlayer. It can be used to control the playback of audio items in elisa.
Methods
Enqueue all the tracks of the music album identified by artist_name and album_name and start the playback of the first track. If the artist or the album does not exist, ArtistNotFoundError or MusicAlbumNotFoundError is raised respectively.
FIXME: This method should be in the database plugin. A more generic playlist API (like clear_playlist etc.) here and a more explicit implementation for enqueuing (like enqueue_album) in the database plugins would be better.
| Parameters: |
|
|---|---|
| Returns: | nothing |
Enqueue and play the given file.
| Parameters: |
|
|---|---|
| Returns: | nothing |
Toggle between the play/paused state. This is done asynchronously, you can check the result by connecting to the status_changed signal.
| Returns: | nothing |
|---|
Stop the playback. This is done asynchronously, you can check the result by connecting to the status_changed signal.
| Returns: | nothing |
|---|
Stop the playback of the current track and jump to the next one in the playlist.
| Returns: | nothing |
|---|
Stop the playback of the current track and jump to the previous one in the playlist.
| Returns: | nothing |
|---|
Set the volume to volume_level. Do not rely on the volume level you may have set previously, always use the volume_changed signal to know the current volume level (as someone else could have changed it).
| Parameters: |
|
|---|---|
| Returns: | nothing |
Retrieve the current volume level. Instead of doing a looping poll on this method it is mandatory to use the volume_changed signal to stay up to date about changes on the volume level.
| Returns: | the volume level in percent |
|---|---|
| Return type: | integer |
Retrieve the current position during playback. This is typically called in a loop. The position might not be available with some streams. In this case InformationNotAvailableError is raised.
| Returns: | the position in the currently played track (in nanoseconds) |
|---|---|
| Return type: | long |
Retrieve the duration of the currently played track. You might want to update your duration each time the status_changed signal goes to playing to always have the correct information. The duration might not be available with some streams. In this case InformationNotAvailableError is raised.
| Returns: | the duration of the currently played track (in nanoseconds) |
|---|---|
| Return type: | long |
Retrieve metadata about the currently playing track. It returns an array containing the following information:
You probably want to call this method every time the playback starts (and/or continues) so it is suggested to connect to the status_changed signal and call this method each time the state changes to playing.
Note: The information provided by this method may not be in sync with the database, it could have been obtained from another plugin (such as Shoutcast or DAAP). Therefore, you can get metadata for something not in the database.
| Return type: | array of strings |
|---|
Signals
Emitted when the playback state changes.
| Parameters: |
|
|---|
Emitted when the volume level changes.
| Parameters: |
|
|---|