#![allow(non_snake_case)]
#![allow(clippy::type_complexity)]
pub mod accounts {
use zbus::proxy;
#[proxy(
interface = "org.freedesktop.Accounts",
default_service = "org.freedesktop.Accounts",
default_path = "/org/freedesktop/Accounts"
)]
pub trait Accounts {
fn cache_user(&self, name: &str) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
fn create_user(
&self,
name: &str,
fullname: &str,
accountType: i32,
) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
fn delete_user(&self, id: i64, removeFiles: bool) -> zbus::Result<()>;
fn find_user_by_id(&self, id: i64) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
fn find_user_by_name(&self, name: &str) -> zbus::Result<zbus::zvariant::OwnedObjectPath>;
fn get_users_languages(&self) -> zbus::Result<Vec<String>>;
fn list_cached_users(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
fn uncache_user(&self, name: &str) -> zbus::Result<()>;
#[zbus(signal)]
fn user_added(&self, user: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
#[zbus(signal)]
fn user_deleted(&self, user: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>;
#[zbus(property)]
fn automatic_login_users(&self) -> zbus::Result<Vec<zbus::zvariant::OwnedObjectPath>>;
#[zbus(property)]
fn daemon_version(&self) -> zbus::Result<String>;
#[zbus(property)]
fn has_multiple_users(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn has_no_users(&self) -> zbus::Result<bool>;
}
}
pub mod user {
use zbus::proxy;
#[proxy(
default_service = "org.freedesktop.Accounts",
interface = "org.freedesktop.Accounts.User"
)]
pub trait User {
fn get_password_expiration_policy(&self) -> zbus::Result<(i64, i64, i64, i64, i64, i64)>;
fn set_account_type(&self, accountType: i32) -> zbus::Result<()>;
fn set_automatic_login(&self, enabled: bool) -> zbus::Result<()>;
fn set_email(&self, email: &str) -> zbus::Result<()>;
fn set_home_directory(&self, homedir: &str) -> zbus::Result<()>;
fn set_icon_file(&self, filename: &str) -> zbus::Result<()>;
fn set_language(&self, language: &str) -> zbus::Result<()>;
fn set_languages(&self, languages: &[&str]) -> zbus::Result<()>;
fn set_location(&self, location: &str) -> zbus::Result<()>;
fn set_locked(&self, locked: bool) -> zbus::Result<()>;
fn set_password(&self, password: &str, hint: &str) -> zbus::Result<()>;
fn set_password_expiration_policy(
&self,
min_days_between_changes: i64,
max_days_between_changes: i64,
days_to_warn: i64,
days_after_expiration_until_lock: i64,
) -> zbus::Result<()>;
fn set_password_hint(&self, hint: &str) -> zbus::Result<()>;
fn set_password_mode(&self, mode: i32) -> zbus::Result<()>;
fn set_real_name(&self, name: &str) -> zbus::Result<()>;
fn set_session(&self, session: &str) -> zbus::Result<()>;
fn set_session_type(&self, session_type: &str) -> zbus::Result<()>;
fn set_shell(&self, shell: &str) -> zbus::Result<()>;
fn set_user_expiration_policy(&self, expiration_time: i64) -> zbus::Result<()>;
fn set_user_name(&self, name: &str) -> zbus::Result<()>;
#[zbus(name = "SetXSession")]
fn set_xsession(&self, x_session: &str) -> zbus::Result<()>;
#[zbus(signal)]
fn changed(&self) -> zbus::Result<()>;
#[zbus(property)]
fn account_type(&self) -> zbus::Result<i32>;
#[zbus(property)]
fn automatic_login(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn email(&self) -> zbus::Result<String>;
#[zbus(property)]
fn home_directory(&self) -> zbus::Result<String>;
#[zbus(property)]
fn icon_file(&self) -> zbus::Result<String>;
#[zbus(property)]
fn language(&self) -> zbus::Result<String>;
#[zbus(property)]
fn languages(&self) -> zbus::Result<Vec<String>>;
#[zbus(property)]
fn local_account(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn location(&self) -> zbus::Result<String>;
#[zbus(property)]
fn locked(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn login_frequency(&self) -> zbus::Result<u64>;
#[zbus(property)]
fn login_history(
&self,
) -> zbus::Result<
Vec<(
i64,
i64,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
#[zbus(property)]
fn login_time(&self) -> zbus::Result<i64>;
#[zbus(property)]
fn password_hint(&self) -> zbus::Result<String>;
#[zbus(property)]
fn password_mode(&self) -> zbus::Result<i32>;
#[zbus(property)]
fn real_name(&self) -> zbus::Result<String>;
#[zbus(property)]
fn saved(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn session(&self) -> zbus::Result<String>;
#[zbus(property)]
fn session_type(&self) -> zbus::Result<String>;
#[zbus(property)]
fn shell(&self) -> zbus::Result<String>;
#[zbus(property)]
fn system_account(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn uid(&self) -> zbus::Result<u64>;
#[zbus(property)]
fn user_name(&self) -> zbus::Result<String>;
#[zbus(property, name = "XSession")]
fn xsession(&self) -> zbus::Result<String>;
}
}