zbus_systemd 0.25900.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.home1.Manager`.
#[proxy(
    interface = "org.freedesktop.home1.Manager",
    gen_blocking = false,
    default_service = "org.freedesktop.home1",
    default_path = "/org/freedesktop/home1"
)]
pub trait Manager {
    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#GetHomeByName()) Call interface method `GetHomeByName`.
    #[zbus(name = "GetHomeByName")]
    fn get_home_by_name(
        &self,
        user_name: String,
    ) -> crate::zbus::Result<(
        u32,
        String,
        u32,
        String,
        String,
        String,
        crate::zvariant::OwnedObjectPath,
    )>;

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

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

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

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

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

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

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

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

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

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

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

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#CreateHomeEx()) Call interface method `CreateHomeEx`.
    #[zbus(name = "CreateHomeEx")]
    fn create_home_ex(
        &self,
        user_record: String,
        blobs: ::std::collections::HashMap<String, crate::zvariant::OwnedFd>,
        flags: u64,
    ) -> crate::zbus::Result<()>;

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

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

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

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

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

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#UpdateHomeEx()) Call interface method `UpdateHomeEx`.
    #[zbus(name = "UpdateHomeEx")]
    fn update_home_ex(
        &self,
        user_record: String,
        blobs: ::std::collections::HashMap<String, crate::zvariant::OwnedFd>,
        flags: u64,
    ) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ResizeHome()) Call interface method `ResizeHome`.
    #[zbus(name = "ResizeHome")]
    fn resize_home(&self, user_name: String, size: u64, secret: String) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#ChangePasswordHome()) Call interface method `ChangePasswordHome`.
    #[zbus(name = "ChangePasswordHome")]
    fn change_password_home(
        &self,
        user_name: String,
        new_secret: String,
        old_secret: String,
    ) -> crate::zbus::Result<()>;

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

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

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#AcquireHome()) Call interface method `AcquireHome`.
    #[zbus(name = "AcquireHome")]
    fn acquire_home(
        &self,
        user_name: String,
        secret: String,
        please_suspend: bool,
    ) -> crate::zbus::Result<crate::zvariant::OwnedFd>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#RefHome()) Call interface method `RefHome`.
    #[zbus(name = "RefHome")]
    fn ref_home(
        &self,
        user_name: String,
        please_suspend: bool,
    ) -> crate::zbus::Result<crate::zvariant::OwnedFd>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#RefHomeUnrestricted()) Call interface method `RefHomeUnrestricted`.
    #[zbus(name = "RefHomeUnrestricted")]
    fn ref_home_unrestricted(
        &self,
        user_name: String,
        please_suspend: bool,
    ) -> crate::zbus::Result<crate::zvariant::OwnedFd>;

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

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

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

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

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

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

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

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

    /// Get property `AutoLogin`.
    #[zbus(property(emits_changed_signal = "true"), name = "AutoLogin")]
    fn auto_login(
        &self,
    ) -> crate::zbus::Result<Vec<(String, String, crate::zvariant::OwnedObjectPath)>>;
}

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

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

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

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

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

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

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

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

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

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#UpdateEx()) Call interface method `UpdateEx`.
    #[zbus(name = "UpdateEx")]
    fn update_ex(
        &self,
        user_record: String,
        blobs: ::std::collections::HashMap<String, crate::zvariant::OwnedFd>,
        flags: u64,
    ) -> crate::zbus::Result<()>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#Resize()) Call interface method `Resize`.
    #[zbus(name = "Resize")]
    fn resize(&self, size: u64, secret: String) -> crate::zbus::Result<()>;

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

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

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

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#Acquire()) Call interface method `Acquire`.
    #[zbus(name = "Acquire")]
    fn acquire(
        &self,
        secret: String,
        please_suspend: bool,
    ) -> crate::zbus::Result<crate::zvariant::OwnedFd>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#Ref()) Call interface method `Ref`.
    #[zbus(name = "Ref")]
    fn reference(&self, please_suspend: bool) -> crate::zbus::Result<crate::zvariant::OwnedFd>;

    /// [📖](https://www.freedesktop.org/software/systemd/man/systemd.directives.html#RefUnrestricted()) Call interface method `RefUnrestricted`.
    #[zbus(name = "RefUnrestricted")]
    fn ref_unrestricted(
        &self,
        please_suspend: bool,
    ) -> crate::zbus::Result<crate::zvariant::OwnedFd>;

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

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

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

    /// Get property `UnixRecord`.
    #[zbus(property(emits_changed_signal = "true"), name = "UnixRecord")]
    fn unix_record(&self) -> crate::zbus::Result<(String, u32, u32, String, String, String)>;

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

    /// Get property `UserRecord`.
    #[zbus(property(emits_changed_signal = "invalidates"), name = "UserRecord")]
    fn user_record(&self) -> crate::zbus::Result<(String, bool)>;
}