dbus-settings-bindings/accounts-zbus/src/user.rs
2024-12-04 16:09:57 +01:00

249 lines
6.8 KiB
Rust

// Copyright 2024 System76 <info@system76.com>
// SPDX-License-Identifier: MPL-2.0
//! # D-Bus interface proxy for: `org.freedesktop.Accounts.User`
//!
//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
//! Source: `Interface '/org/freedesktop/Accounts/User1000' from service 'org.freedesktop.Accounts' 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 = "org.freedesktop.Accounts.User",
default_service = "org.freedesktop.Accounts",
// default_path = "/org/freedesktop/Accounts/User1000"
)]
trait User {
/// GetPasswordExpirationPolicy method
fn get_password_expiration_policy(&self) -> zbus::Result<(i64, i64, i64, i64, i64, i64)>;
/// SetAccountType method
fn set_account_type(&self, account_type: i32) -> zbus::Result<()>;
/// SetAutomaticLogin method
fn set_automatic_login(&self, enabled: bool) -> zbus::Result<()>;
/// SetBackgroundFile method
fn set_background_file(&self, filename: &str) -> zbus::Result<()>;
/// SetEmail method
fn set_email(&self, email: &str) -> zbus::Result<()>;
/// SetFormatsLocale method
fn set_formats_locale(&self, formats_locale: &str) -> zbus::Result<()>;
/// SetHomeDirectory method
fn set_home_directory(&self, homedir: &str) -> zbus::Result<()>;
/// SetIconFile method
fn set_icon_file(&self, filename: &str) -> zbus::Result<()>;
/// SetInputSources method
fn set_input_sources(
&self,
sources: &[std::collections::HashMap<&str, &str>],
) -> zbus::Result<()>;
/// SetLanguage method
fn set_language(&self, language: &str) -> zbus::Result<()>;
/// SetLanguages method
fn set_languages(&self, languages: &[&str]) -> zbus::Result<()>;
/// SetLocation method
fn set_location(&self, location: &str) -> zbus::Result<()>;
/// SetLocked method
fn set_locked(&self, locked: bool) -> zbus::Result<()>;
/// SetPassword method
fn set_password(&self, password: &str, hint: &str) -> zbus::Result<()>;
/// SetPasswordExpirationPolicy method
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<()>;
/// SetPasswordHint method
fn set_password_hint(&self, hint: &str) -> zbus::Result<()>;
/// SetPasswordMode method
fn set_password_mode(&self, mode: i32) -> zbus::Result<()>;
/// SetRealName method
fn set_real_name(&self, name: &str) -> zbus::Result<()>;
/// SetSession method
fn set_session(&self, session: &str) -> zbus::Result<()>;
/// SetSessionType method
fn set_session_type(&self, session_type: &str) -> zbus::Result<()>;
/// SetShell method
fn set_shell(&self, shell: &str) -> zbus::Result<()>;
/// SetUserExpirationPolicy method
fn set_user_expiration_policy(&self, expiration_time: i64) -> zbus::Result<()>;
/// SetUserName method
fn set_user_name(&self, name: &str) -> zbus::Result<()>;
/// SetXHasMessages method
#[zbus(name = "SetXHasMessages")]
fn set_xhas_messages(&self, has_messages: bool) -> zbus::Result<()>;
/// SetXKeyboardLayouts method
#[zbus(name = "SetXKeyboardLayouts")]
fn set_xkeyboard_layouts(&self, layouts: &[&str]) -> zbus::Result<()>;
/// SetXSession method
#[zbus(name = "SetXSession")]
fn set_xsession(&self, x_session: &str) -> zbus::Result<()>;
/// Changed signal
#[zbus(signal)]
fn changed(&self) -> zbus::Result<()>;
/// AccountType property
#[zbus(property)]
fn account_type(&self) -> zbus::Result<i32>;
/// AutomaticLogin property
#[zbus(property)]
fn automatic_login(&self) -> zbus::Result<bool>;
/// BackgroundFile property
#[zbus(property)]
fn background_file(&self) -> zbus::Result<String>;
/// Email property
#[zbus(property)]
fn email(&self) -> zbus::Result<String>;
/// FormatsLocale property
#[zbus(property)]
fn formats_locale(&self) -> zbus::Result<String>;
/// HomeDirectory property
#[zbus(property)]
fn home_directory(&self) -> zbus::Result<String>;
/// IconFile property
#[zbus(property)]
fn icon_file(&self) -> zbus::Result<String>;
/// InputSources property
#[zbus(property)]
fn input_sources(&self) -> zbus::Result<Vec<std::collections::HashMap<String, String>>>;
/// Language property
#[zbus(property)]
fn language(&self) -> zbus::Result<String>;
/// Languages property
#[zbus(property)]
fn languages(&self) -> zbus::Result<Vec<String>>;
/// LocalAccount property
#[zbus(property)]
fn local_account(&self) -> zbus::Result<bool>;
/// Location property
#[zbus(property)]
fn location(&self) -> zbus::Result<String>;
/// Locked property
#[zbus(property)]
fn locked(&self) -> zbus::Result<bool>;
/// LoginFrequency property
#[zbus(property)]
fn login_frequency(&self) -> zbus::Result<u64>;
/// LoginHistory property
#[zbus(property)]
fn login_history(
&self,
) -> zbus::Result<
Vec<(
i64,
i64,
std::collections::HashMap<String, zbus::zvariant::OwnedValue>,
)>,
>;
/// LoginTime property
#[zbus(property)]
fn login_time(&self) -> zbus::Result<i64>;
/// PasswordHint property
#[zbus(property)]
fn password_hint(&self) -> zbus::Result<String>;
/// PasswordMode property
#[zbus(property)]
fn password_mode(&self) -> zbus::Result<i32>;
/// RealName property
#[zbus(property)]
fn real_name(&self) -> zbus::Result<String>;
/// Saved property
#[zbus(property)]
fn saved(&self) -> zbus::Result<bool>;
/// Session property
#[zbus(property)]
fn session(&self) -> zbus::Result<String>;
/// SessionType property
#[zbus(property)]
fn session_type(&self) -> zbus::Result<String>;
/// Shell property
#[zbus(property)]
fn shell(&self) -> zbus::Result<String>;
/// SystemAccount property
#[zbus(property)]
fn system_account(&self) -> zbus::Result<bool>;
/// Uid property
#[zbus(property)]
fn uid(&self) -> zbus::Result<u64>;
/// UserName property
#[zbus(property)]
fn user_name(&self) -> zbus::Result<String>;
/// XHasMessages property
#[zbus(property, name = "XHasMessages")]
fn xhas_messages(&self) -> zbus::Result<bool>;
/// XKeyboardLayouts property
#[zbus(property, name = "XKeyboardLayouts")]
fn xkeyboard_layouts(&self) -> zbus::Result<Vec<String>>;
/// XSession property
#[zbus(property, name = "XSession")]
fn xsession(&self) -> zbus::Result<String>;
}