systemd-zbus 5.3.0

A dbus client (using zbus) for systemd
Documentation
//! # DBus interface proxy for: `org.freedesktop.systemd1.Job`
//!
//! This code was generated by `zbus-xmlgen` `3.1.0` from DBus introspection data.
//! Source: `org.freedesktop.systemd1.Job.xml`.
//!
//! 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::PeerProxy`]
//! * [`zbus::fdo::IntrospectableProxy`]
//! * [`zbus::fdo::PropertiesProxy`]
//!
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.

use zbus::proxy;

use crate::{Job, JobState, JobType, KeyValue};

#[proxy(
    interface = "org.freedesktop.systemd1.Job",
    default_service = "org.freedesktop.systemd1",
    default_path = "/org/freedesktop/systemd1/job"
)]
pub trait Job {
    /// Cancel method
    fn cancel(&self) -> zbus::Result<()>;

    /// GetAfter method
    fn get_after(&self) -> zbus::Result<Vec<Job>>;

    /// GetBefore method
    fn get_before(&self) -> zbus::Result<Vec<Job>>;

    /// ActivationDetails property
    #[zbus(property)]
    fn activation_details(&self) -> zbus::Result<Vec<KeyValue<String, String>>>;

    /// Id property
    #[zbus(property)]
    fn id(&self) -> zbus::Result<u32>;

    /// JobType property
    #[zbus(property)]
    fn job_type(&self) -> zbus::Result<JobType>;

    /// State property
    #[zbus(property)]
    fn state(&self) -> zbus::Result<JobState>;

    /// Unit property
    #[zbus(property)]
    fn unit(&self) -> zbus::Result<(String, zbus::zvariant::OwnedObjectPath)>;
}