zbus_systemd 0.26000.0

A pure-Rust library to interact with systemd DBus services
Documentation
// This file is autogenerated, do not manually edit.

use crate::zbus::proxy;

/// Proxy object for `org.freedesktop.import1.Manager`.
#[proxy(
    interface = "org.freedesktop.import1.Manager",
    gen_blocking = false,
    default_service = "org.freedesktop.import1",
    default_path = "/org/freedesktop/import1"
)]
pub trait Manager {
    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ImportTar()) Call interface method `ImportTar`.
    #[zbus(name = "ImportTar")]
    fn import_tar(
        &self,
        fd: crate::zvariant::OwnedFd,
        local_name: String,
        force: bool,
        read_only: bool,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ImportTarEx()) Call interface method `ImportTarEx`.
    #[zbus(name = "ImportTarEx")]
    fn import_tar_ex(
        &self,
        fd: crate::zvariant::OwnedFd,
        local_name: String,
        class: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ImportRaw()) Call interface method `ImportRaw`.
    #[zbus(name = "ImportRaw")]
    fn import_raw(
        &self,
        fd: crate::zvariant::OwnedFd,
        local_name: String,
        force: bool,
        read_only: bool,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ImportRawEx()) Call interface method `ImportRawEx`.
    #[zbus(name = "ImportRawEx")]
    fn import_raw_ex(
        &self,
        fd: crate::zvariant::OwnedFd,
        local_name: String,
        class: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ImportFileSystem()) Call interface method `ImportFileSystem`.
    #[zbus(name = "ImportFileSystem")]
    fn import_file_system(
        &self,
        fd: crate::zvariant::OwnedFd,
        local_name: String,
        force: bool,
        read_only: bool,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ImportFileSystemEx()) Call interface method `ImportFileSystemEx`.
    #[zbus(name = "ImportFileSystemEx")]
    fn import_file_system_ex(
        &self,
        fd: crate::zvariant::OwnedFd,
        local_name: String,
        class: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ExportTar()) Call interface method `ExportTar`.
    #[zbus(name = "ExportTar")]
    fn export_tar(
        &self,
        local_name: String,
        fd: crate::zvariant::OwnedFd,
        format: String,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ExportTarEx()) Call interface method `ExportTarEx`.
    #[zbus(name = "ExportTarEx")]
    fn export_tar_ex(
        &self,
        local_name: String,
        class: String,
        fd: crate::zvariant::OwnedFd,
        format: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ExportRaw()) Call interface method `ExportRaw`.
    #[zbus(name = "ExportRaw")]
    fn export_raw(
        &self,
        local_name: String,
        fd: crate::zvariant::OwnedFd,
        format: String,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ExportRawEx()) Call interface method `ExportRawEx`.
    #[zbus(name = "ExportRawEx")]
    fn export_raw_ex(
        &self,
        local_name: String,
        class: String,
        fd: crate::zvariant::OwnedFd,
        format: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#PullTar()) Call interface method `PullTar`.
    #[zbus(name = "PullTar")]
    fn pull_tar(
        &self,
        url: String,
        local_name: String,
        verify_mode: String,
        force: bool,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#PullTarEx()) Call interface method `PullTarEx`.
    #[zbus(name = "PullTarEx")]
    fn pull_tar_ex(
        &self,
        url: String,
        local_name: String,
        class: String,
        verify_mode: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#PullRaw()) Call interface method `PullRaw`.
    #[zbus(name = "PullRaw")]
    fn pull_raw(
        &self,
        url: String,
        local_name: String,
        verify_mode: String,
        force: bool,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#PullRawEx()) Call interface method `PullRawEx`.
    #[zbus(name = "PullRawEx")]
    fn pull_raw_ex(
        &self,
        url: String,
        local_name: String,
        class: String,
        verify_mode: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#PullOci()) Call interface method `PullOci`.
    #[zbus(name = "PullOci")]
    fn pull_oci(
        &self,
        arg_ref: String,
        local_name: String,
        class: String,
        flags: u64,
    ) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ListTransfers()) Call interface method `ListTransfers`.
    #[zbus(name = "ListTransfers")]
    fn list_transfers(
        &self,
    ) -> crate::zbus::Result<
        Vec<(
            u32,
            String,
            String,
            String,
            f64,
            crate::zvariant::OwnedObjectPath,
        )>,
    >;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ListTransfersEx()) Call interface method `ListTransfersEx`.
    #[zbus(name = "ListTransfersEx")]
    fn list_transfers_ex(
        &self,
        class: String,
        flags: u64,
    ) -> crate::zbus::Result<
        Vec<(
            u32,
            String,
            String,
            String,
            String,
            f64,
            crate::zvariant::OwnedObjectPath,
        )>,
    >;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#CancelTransfer()) Call interface method `CancelTransfer`.
    #[zbus(name = "CancelTransfer")]
    fn cancel_transfer(&self, transfer_id: u32) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ListImages()) Call interface method `ListImages`.
    #[zbus(name = "ListImages")]
    fn list_images(
        &self,
        class: String,
        flags: u64,
    ) -> crate::zbus::Result<
        Vec<(
            String,
            String,
            String,
            String,
            bool,
            u64,
            u64,
            u64,
            u64,
            u64,
            u64,
        )>,
    >;

    /// Receive `TransferNew` signal.
    #[zbus(signal, name = "TransferNew")]
    fn transfer_new(
        &self,
        transfer_id: u32,
        transfer_path: crate::zvariant::OwnedObjectPath,
    ) -> crate::zbus::Result<()>;

    /// Receive `TransferRemoved` signal.
    #[zbus(signal, name = "TransferRemoved")]
    fn transfer_removed(
        &self,
        transfer_id: u32,
        transfer_path: crate::zvariant::OwnedObjectPath,
        result: String,
    ) -> crate::zbus::Result<()>;
}

/// Proxy object for `org.freedesktop.import1.Transfer`.
#[proxy(
    interface = "org.freedesktop.import1.Transfer",
    gen_blocking = false,
    default_service = "org.freedesktop.import1",
    assume_defaults = false
)]
pub trait Transfer {
    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#Cancel()) Call interface method `Cancel`.
    #[zbus(name = "Cancel")]
    fn cancel(&self) -> crate::zbus::Result<()>;

    /// Receive `LogMessage` signal.
    #[zbus(signal, name = "LogMessage")]
    fn log_message(&self, priority: u32, line: String) -> crate::zbus::Result<()>;

    /// Receive `ProgressUpdate` signal.
    #[zbus(signal, name = "ProgressUpdate")]
    fn progress_update(&self, progress: f64) -> crate::zbus::Result<()>;

    /// Get property `Id`.
    #[zbus(property(emits_changed_signal = "const"), name = "Id")]
    fn id(&self) -> crate::zbus::Result<u32>;

    /// Get property `Local`.
    #[zbus(property(emits_changed_signal = "const"), name = "Local")]
    fn local(&self) -> crate::zbus::Result<String>;

    /// Get property `Remote`.
    #[zbus(property(emits_changed_signal = "const"), name = "Remote")]
    fn remote(&self) -> crate::zbus::Result<String>;

    /// Get property `Type`.
    #[zbus(property(emits_changed_signal = "const"), name = "Type")]
    fn type_property(&self) -> crate::zbus::Result<String>;

    /// Get property `Verify`.
    #[zbus(property(emits_changed_signal = "const"), name = "Verify")]
    fn verify(&self) -> crate::zbus::Result<String>;

    /// Get property `Progress`.
    #[zbus(property(emits_changed_signal = "false"), name = "Progress")]
    fn progress(&self) -> crate::zbus::Result<f64>;
}