// SPDX-License-Identifier: MPL-2.0 //! # DBus interface proxies for: `org.mpris.MediaPlayer2`, `org.mpris.MediaPlayer2.Player`, `org.mpris.MediaPlayer2.TrackList`, `org.mpris.MediaPlayer2.Playlists` //! //! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data. //! Source: `Interface '/org/mpris/MediaPlayer2' from service 'org.mpris.MediaPlayer2.org.gnome.Music' on session bus`. //! //! You may prefer to adapt it, instead of using it verbatim. //! //! More information can be found in the //! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) //! section of the zbus documentation. //! //! This DBus object implements //! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html), //! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used: //! //! * [`zbus::fdo::IntrospectableProxy`] //! * [`zbus::fdo::PropertiesProxy`] //! //! …consequently `zbus-xmlgen` did not generate code for the above interfaces. use crate::playlists::{id::PlaylistId, ordering::PlaylistOrdering, playlist::Playlist}; use zbus::dbus_proxy; #[dbus_proxy( interface = "org.mpris.MediaPlayer2.Playlists", default_path = "/org/mpris/MediaPlayer2" )] trait Playlists { /// ActivatePlaylist method fn activate_playlist(&self, playlist_id: &PlaylistId) -> zbus::Result<()>; /// GetPlaylists method fn get_playlists( &self, index: u32, max_count: u32, order: PlaylistOrdering, reverse_order: bool, ) -> zbus::Result>; /// PlaylistChanged signal #[dbus_proxy(signal)] fn playlist_changed(&self, playlist: Playlist) -> zbus::Result<()>; /// ActivePlaylist property #[dbus_proxy(property)] fn active_playlist(&self) -> zbus::Result<(bool, Playlist)>; /// Orderings property #[dbus_proxy(property)] fn orderings(&self) -> zbus::Result>; /// PlaylistCount property #[dbus_proxy(property)] fn playlist_count(&self) -> zbus::Result; }