summaryrefslogtreecommitdiffstats
path: root/src/dbus/playerctld.rs
blob: 383faead1ce2f08e9975360104aa52bd6b104f6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! # D-Bus interface proxy for: `com.github.altdesktop.playerctld`
//!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
//! Source: `Interface '/org/mpris/MediaPlayer2' from service 'org.mpris.MediaPlayer2.playerctld' on system bus`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the [Writing a client proxy] section of the zbus
//! documentation.
//!
//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
//! following zbus API can be used:
//!
//! * [`zbus::fdo::PropertiesProxy`]
//! * [`zbus::fdo::IntrospectableProxy`]
//! * [`zbus::fdo::PeerProxy`]
//!
//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
//!
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
use zbus::proxy;
#[proxy(
    interface = "com.github.altdesktop.playerctld",
    default_service = "org.mpris.MediaPlayer2.playerctld",
    default_path = "/org/mpris/MediaPlayer2"
)]
trait Playerctld {
    /// Shift method
    fn shift(&self) -> zbus::Result<String>;

    /// Unshift method
    fn unshift(&self) -> zbus::Result<String>;

    /// ActivePlayerChangeBegin signal
    #[zbus(signal)]
    fn active_player_change_begin(&self, name: &str) -> zbus::Result<()>;

    /// ActivePlayerChangeEnd signal
    #[zbus(signal)]
    fn active_player_change_end(&self, name: &str) -> zbus::Result<()>;

    /// PlayerNames property
    #[zbus(property)]
    fn player_names(&self) -> zbus::Result<Vec<String>>;
}