use crate::zbus::proxy;
#[proxy(
interface = "org.freedesktop.login1.Manager",
gen_blocking = false,
default_service = "org.freedesktop.login1",
default_path = "/org/freedesktop/login1"
)]
pub trait Manager {
#[zbus(name = "GetSession")]
fn get_session(
&self,
session_id: String,
) -> crate::zbus::Result<crate::zvariant::OwnedObjectPath>;
#[zbus(name = "GetSessionByPID")]
fn get_session_by_pid(&self, pid: u32)
-> crate::zbus::Result<crate::zvariant::OwnedObjectPath>;
#[zbus(name = "GetUser")]
fn get_user(&self, uid: u32) -> crate::zbus::Result<crate::zvariant::OwnedObjectPath>;
#[zbus(name = "GetUserByPID")]
fn get_user_by_pid(&self, pid: u32) -> crate::zbus::Result<crate::zvariant::OwnedObjectPath>;
#[zbus(name = "GetSeat")]
fn get_seat(&self, seat_id: String) -> crate::zbus::Result<crate::zvariant::OwnedObjectPath>;
#[zbus(name = "ListSessions")]
fn list_sessions(
&self,
) -> crate::zbus::Result<
Vec<(
String,
u32,
String,
String,
crate::zvariant::OwnedObjectPath,
)>,
>;
#[zbus(name = "ListSessionsEx")]
fn list_sessions_ex(
&self,
) -> crate::zbus::Result<
Vec<(
String,
u32,
String,
String,
u32,
String,
String,
bool,
u64,
crate::zvariant::OwnedObjectPath,
)>,
>;
#[zbus(name = "ListUsers")]
fn list_users(
&self,
) -> crate::zbus::Result<Vec<(u32, String, crate::zvariant::OwnedObjectPath)>>;
#[zbus(name = "ListSeats")]
fn list_seats(&self) -> crate::zbus::Result<Vec<(String, crate::zvariant::OwnedObjectPath)>>;
#[zbus(name = "ListInhibitors")]
fn list_inhibitors(
&self,
) -> crate::zbus::Result<Vec<(String, String, String, String, u32, u32)>>;
#[zbus(name = "CreateSession")]
fn create_session(
&self,
uid: u32,
pid: u32,
service: String,
arg_type: String,
class: String,
desktop: String,
seat_id: String,
vtnr: u32,
tty: String,
display: String,
remote: bool,
remote_user: String,
remote_host: String,
properties: Vec<(String, crate::zvariant::OwnedValue)>,
) -> crate::zbus::Result<(
String,
crate::zvariant::OwnedObjectPath,
String,
crate::zvariant::OwnedFd,
u32,
String,
u32,
bool,
)>;
#[zbus(name = "CreateSessionWithPIDFD")]
fn create_session_with_pidfd(
&self,
uid: u32,
pidfd: crate::zvariant::OwnedFd,
service: String,
arg_type: String,
class: String,
desktop: String,
seat_id: String,
vtnr: u32,
tty: String,
display: String,
remote: bool,
remote_user: String,
remote_host: String,
flags: u64,
properties: Vec<(String, crate::zvariant::OwnedValue)>,
) -> crate::zbus::Result<(
String,
crate::zvariant::OwnedObjectPath,
String,
crate::zvariant::OwnedFd,
u32,
String,
u32,
bool,
)>;
#[zbus(name = "ReleaseSession")]
fn release_session(&self, session_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "ActivateSession")]
fn activate_session(&self, session_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "ActivateSessionOnSeat")]
fn activate_session_on_seat(
&self,
session_id: String,
seat_id: String,
) -> crate::zbus::Result<()>;
#[zbus(name = "LockSession")]
fn lock_session(&self, session_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "UnlockSession")]
fn unlock_session(&self, session_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "LockSessions")]
fn lock_sessions(&self) -> crate::zbus::Result<()>;
#[zbus(name = "UnlockSessions")]
fn unlock_sessions(&self) -> crate::zbus::Result<()>;
#[zbus(name = "KillSession")]
fn kill_session(
&self,
session_id: String,
whom: String,
signal_number: i32,
) -> crate::zbus::Result<()>;
#[zbus(name = "KillUser")]
fn kill_user(&self, uid: u32, signal_number: i32) -> crate::zbus::Result<()>;
#[zbus(name = "TerminateSession")]
fn terminate_session(&self, session_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "TerminateUser")]
fn terminate_user(&self, uid: u32) -> crate::zbus::Result<()>;
#[zbus(name = "TerminateSeat")]
fn terminate_seat(&self, seat_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "SetUserLinger")]
fn set_user_linger(&self, uid: u32, enable: bool, interactive: bool)
-> crate::zbus::Result<()>;
#[zbus(name = "AttachDevice")]
fn attach_device(
&self,
seat_id: String,
sysfs_path: String,
interactive: bool,
) -> crate::zbus::Result<()>;
#[zbus(name = "FlushDevices")]
fn flush_devices(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "PowerOff")]
fn power_off(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "PowerOffWithFlags")]
fn power_off_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "Reboot")]
fn reboot(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "RebootWithFlags")]
fn reboot_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "Halt")]
fn halt(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "HaltWithFlags")]
fn halt_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "Suspend")]
fn suspend(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "SuspendWithFlags")]
fn suspend_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "Hibernate")]
fn hibernate(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "HibernateWithFlags")]
fn hibernate_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "HybridSleep")]
fn hybrid_sleep(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "HybridSleepWithFlags")]
fn hybrid_sleep_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "SuspendThenHibernate")]
fn suspend_then_hibernate(&self, interactive: bool) -> crate::zbus::Result<()>;
#[zbus(name = "SuspendThenHibernateWithFlags")]
fn suspend_then_hibernate_with_flags(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "Sleep")]
fn sleep(&self, flags: u64) -> crate::zbus::Result<()>;
#[zbus(name = "CanPowerOff")]
fn can_power_off(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanReboot")]
fn can_reboot(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanHalt")]
fn can_halt(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanSuspend")]
fn can_suspend(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanHibernate")]
fn can_hibernate(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanHybridSleep")]
fn can_hybrid_sleep(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanSuspendThenHibernate")]
fn can_suspend_then_hibernate(&self) -> crate::zbus::Result<String>;
#[zbus(name = "CanSleep")]
fn can_sleep(&self) -> crate::zbus::Result<String>;
#[zbus(name = "ScheduleShutdown")]
fn schedule_shutdown(&self, arg_type: String, usec: u64) -> crate::zbus::Result<()>;
#[zbus(name = "CancelScheduledShutdown")]
fn cancel_scheduled_shutdown(&self) -> crate::zbus::Result<bool>;
#[zbus(name = "Inhibit")]
fn inhibit(
&self,
what: String,
who: String,
why: String,
mode: String,
) -> crate::zbus::Result<crate::zvariant::OwnedFd>;
#[zbus(name = "CanRebootParameter")]
fn can_reboot_parameter(&self) -> crate::zbus::Result<String>;
#[zbus(name = "SetRebootParameter")]
fn set_reboot_parameter(&self, parameter: String) -> crate::zbus::Result<()>;
#[zbus(name = "CanRebootToFirmwareSetup")]
fn can_reboot_to_firmware_setup(&self) -> crate::zbus::Result<String>;
#[zbus(name = "SetRebootToFirmwareSetup")]
fn set_reboot_to_firmware_setup(&self, enable: bool) -> crate::zbus::Result<()>;
#[zbus(name = "CanRebootToBootLoaderMenu")]
fn can_reboot_to_boot_loader_menu(&self) -> crate::zbus::Result<String>;
#[zbus(name = "SetRebootToBootLoaderMenu")]
fn set_reboot_to_boot_loader_menu(&self, timeout: u64) -> crate::zbus::Result<()>;
#[zbus(name = "CanRebootToBootLoaderEntry")]
fn can_reboot_to_boot_loader_entry(&self) -> crate::zbus::Result<String>;
#[zbus(name = "SetRebootToBootLoaderEntry")]
fn set_reboot_to_boot_loader_entry(&self, boot_loader_entry: String)
-> crate::zbus::Result<()>;
#[zbus(name = "SetWallMessage")]
fn set_wall_message(&self, wall_message: String, enable: bool) -> crate::zbus::Result<()>;
#[zbus(signal, name = "SecureAttentionKey")]
fn secure_attention_key(
&self,
seat_id: String,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "SessionNew")]
fn session_new(
&self,
session_id: String,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "SessionRemoved")]
fn session_removed(
&self,
session_id: String,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "UserNew")]
fn user_new(
&self,
uid: u32,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "UserRemoved")]
fn user_removed(
&self,
uid: u32,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "SeatNew")]
fn seat_new(
&self,
seat_id: String,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "SeatRemoved")]
fn seat_removed(
&self,
seat_id: String,
object_path: crate::zvariant::OwnedObjectPath,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "PrepareForShutdown")]
fn prepare_for_shutdown(&self, start: bool) -> crate::zbus::Result<()>;
#[zbus(signal, name = "PrepareForShutdownWithMetadata")]
fn prepare_for_shutdown_with_metadata(
&self,
start: bool,
metadata: ::std::collections::HashMap<String, crate::zvariant::OwnedValue>,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "PrepareForSleep")]
fn prepare_for_sleep(&self, start: bool) -> crate::zbus::Result<()>;
#[zbus(property(emits_changed_signal = "false"), name = "EnableWallMessages")]
fn enable_wall_messages(&self) -> crate::zbus::Result<bool>;
#[zbus(property, name = "EnableWallMessages")]
fn set_property_enable_wall_messages(&self, new_value: bool) -> crate::zbus::Result<()>;
#[zbus(property(emits_changed_signal = "false"), name = "WallMessage")]
fn wall_message(&self) -> crate::zbus::Result<String>;
#[zbus(property, name = "WallMessage")]
fn set_property_wall_message(&self, new_value: String) -> crate::zbus::Result<()>;
#[zbus(property(emits_changed_signal = "const"), name = "NAutoVTs")]
fn n_auto_v_ts(&self) -> crate::zbus::Result<u32>;
#[zbus(property(emits_changed_signal = "const"), name = "KillOnlyUsers")]
fn kill_only_users(&self) -> crate::zbus::Result<Vec<String>>;
#[zbus(property(emits_changed_signal = "const"), name = "KillExcludeUsers")]
fn kill_exclude_users(&self) -> crate::zbus::Result<Vec<String>>;
#[zbus(property(emits_changed_signal = "const"), name = "KillUserProcesses")]
fn kill_user_processes(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "false"), name = "RebootParameter")]
fn reboot_parameter(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "false"),
name = "RebootToFirmwareSetup"
)]
fn reboot_to_firmware_setup(&self) -> crate::zbus::Result<bool>;
#[zbus(
property(emits_changed_signal = "false"),
name = "RebootToBootLoaderMenu"
)]
fn reboot_to_boot_loader_menu(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "false"),
name = "RebootToBootLoaderEntry"
)]
fn reboot_to_boot_loader_entry(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "BootLoaderEntries")]
fn boot_loader_entries(&self) -> crate::zbus::Result<Vec<String>>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleHint")]
fn idle_hint(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleSinceHint")]
fn idle_since_hint(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "true"),
name = "IdleSinceHintMonotonic"
)]
fn idle_since_hint_monotonic(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "true"), name = "BlockInhibited")]
fn block_inhibited(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "BlockWeakInhibited")]
fn block_weak_inhibited(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "DelayInhibited")]
fn delay_inhibited(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "InhibitDelayMaxUSec")]
fn inhibit_delay_max_u_sec(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "UserStopDelayUSec")]
fn user_stop_delay_u_sec(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "SleepOperation")]
fn sleep_operation(&self) -> crate::zbus::Result<Vec<String>>;
#[zbus(property(emits_changed_signal = "const"), name = "HandlePowerKey")]
fn handle_power_key(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandlePowerKeyLongPress"
)]
fn handle_power_key_long_press(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "HandleRebootKey")]
fn handle_reboot_key(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandleRebootKeyLongPress"
)]
fn handle_reboot_key_long_press(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "HandleSuspendKey")]
fn handle_suspend_key(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandleSuspendKeyLongPress"
)]
fn handle_suspend_key_long_press(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "HandleHibernateKey")]
fn handle_hibernate_key(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandleHibernateKeyLongPress"
)]
fn handle_hibernate_key_long_press(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "HandleLidSwitch")]
fn handle_lid_switch(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandleLidSwitchExternalPower"
)]
fn handle_lid_switch_external_power(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandleLidSwitchDocked"
)]
fn handle_lid_switch_docked(&self) -> crate::zbus::Result<String>;
#[zbus(
property(emits_changed_signal = "const"),
name = "HandleSecureAttentionKey"
)]
fn handle_secure_attention_key(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "HoldoffTimeoutUSec")]
fn holdoff_timeout_u_sec(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "IdleAction")]
fn idle_action(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "IdleActionUSec")]
fn idle_action_u_sec(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "false"),
name = "PreparingForShutdown"
)]
fn preparing_for_shutdown(&self) -> crate::zbus::Result<bool>;
#[zbus(
property(emits_changed_signal = "false"),
name = "PreparingForShutdownWithMetadata"
)]
fn preparing_for_shutdown_with_metadata(
&self,
) -> crate::zbus::Result<::std::collections::HashMap<String, crate::zvariant::OwnedValue>>;
#[zbus(property(emits_changed_signal = "false"), name = "PreparingForSleep")]
fn preparing_for_sleep(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "ScheduledShutdown")]
fn scheduled_shutdown(&self) -> crate::zbus::Result<(String, u64)>;
#[zbus(
property(emits_changed_signal = "const"),
name = "DesignatedMaintenanceTime"
)]
fn designated_maintenance_time(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "false"), name = "Docked")]
fn docked(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "LidClosed")]
fn lid_closed(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "false"), name = "OnExternalPower")]
fn on_external_power(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "const"), name = "RemoveIPC")]
fn remove_ipc(&self) -> crate::zbus::Result<bool>;
#[zbus(
property(emits_changed_signal = "const"),
name = "RuntimeDirectorySize"
)]
fn runtime_directory_size(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "const"),
name = "RuntimeDirectoryInodesMax"
)]
fn runtime_directory_inodes_max(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "InhibitorsMax")]
fn inhibitors_max(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "true"), name = "NCurrentInhibitors")]
fn n_current_inhibitors(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "SessionsMax")]
fn sessions_max(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "false"), name = "NCurrentSessions")]
fn n_current_sessions(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "StopIdleSessionUSec")]
fn stop_idle_session_u_sec(&self) -> crate::zbus::Result<u64>;
}
#[proxy(
interface = "org.freedesktop.login1.Seat",
gen_blocking = false,
default_service = "org.freedesktop.login1",
assume_defaults = false
)]
pub trait Seat {
#[zbus(name = "Terminate")]
fn terminate(&self) -> crate::zbus::Result<()>;
#[zbus(name = "ActivateSession")]
fn activate_session(&self, session_id: String) -> crate::zbus::Result<()>;
#[zbus(name = "SwitchTo")]
fn switch_to(&self, vtnr: u32) -> crate::zbus::Result<()>;
#[zbus(name = "SwitchToNext")]
fn switch_to_next(&self) -> crate::zbus::Result<()>;
#[zbus(name = "SwitchToPrevious")]
fn switch_to_previous(&self) -> crate::zbus::Result<()>;
#[zbus(property(emits_changed_signal = "const"), name = "Id")]
fn id(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "ActiveSession")]
fn active_session(&self) -> crate::zbus::Result<(String, crate::zvariant::OwnedObjectPath)>;
#[zbus(property(emits_changed_signal = "const"), name = "CanTTY")]
fn can_tty(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "CanGraphical")]
fn can_graphical(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "false"), name = "Sessions")]
fn sessions(&self) -> crate::zbus::Result<Vec<(String, crate::zvariant::OwnedObjectPath)>>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleHint")]
fn idle_hint(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleSinceHint")]
fn idle_since_hint(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "true"),
name = "IdleSinceHintMonotonic"
)]
fn idle_since_hint_monotonic(&self) -> crate::zbus::Result<u64>;
}
#[proxy(
interface = "org.freedesktop.login1.User",
gen_blocking = false,
default_service = "org.freedesktop.login1",
assume_defaults = false
)]
pub trait User {
#[zbus(name = "Terminate")]
fn terminate(&self) -> crate::zbus::Result<()>;
#[zbus(name = "Kill")]
fn kill(&self, signal_number: i32) -> crate::zbus::Result<()>;
#[zbus(property(emits_changed_signal = "const"), name = "UID")]
fn uid(&self) -> crate::zbus::Result<u32>;
#[zbus(property(emits_changed_signal = "const"), name = "GID")]
fn gid(&self) -> crate::zbus::Result<u32>;
#[zbus(property(emits_changed_signal = "const"), name = "Name")]
fn name(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Timestamp")]
fn timestamp(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "TimestampMonotonic")]
fn timestamp_monotonic(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "RuntimePath")]
fn runtime_path(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Service")]
fn service(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Slice")]
fn slice(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "Display")]
fn display(&self) -> crate::zbus::Result<(String, crate::zvariant::OwnedObjectPath)>;
#[zbus(property(emits_changed_signal = "false"), name = "State")]
fn state(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "false"), name = "Sessions")]
fn sessions(&self) -> crate::zbus::Result<Vec<(String, crate::zvariant::OwnedObjectPath)>>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleHint")]
fn idle_hint(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleSinceHint")]
fn idle_since_hint(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "true"),
name = "IdleSinceHintMonotonic"
)]
fn idle_since_hint_monotonic(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "true"), name = "Linger")]
fn linger(&self) -> crate::zbus::Result<bool>;
}
#[proxy(
interface = "org.freedesktop.login1.Session",
gen_blocking = false,
default_service = "org.freedesktop.login1",
assume_defaults = false
)]
pub trait Session {
#[zbus(name = "Terminate")]
fn terminate(&self) -> crate::zbus::Result<()>;
#[zbus(name = "Activate")]
fn activate(&self) -> crate::zbus::Result<()>;
#[zbus(name = "Lock")]
fn lock(&self) -> crate::zbus::Result<()>;
#[zbus(name = "Unlock")]
fn unlock(&self) -> crate::zbus::Result<()>;
#[zbus(name = "SetIdleHint")]
fn set_idle_hint(&self, idle: bool) -> crate::zbus::Result<()>;
#[zbus(name = "SetLockedHint")]
fn set_locked_hint(&self, locked: bool) -> crate::zbus::Result<()>;
#[zbus(name = "Kill")]
fn kill(&self, whom: String, signal_number: i32) -> crate::zbus::Result<()>;
#[zbus(name = "TakeControl")]
fn take_control(&self, force: bool) -> crate::zbus::Result<()>;
#[zbus(name = "ReleaseControl")]
fn release_control(&self) -> crate::zbus::Result<()>;
#[zbus(name = "SetType")]
fn set_type(&self, arg_type: String) -> crate::zbus::Result<()>;
#[zbus(name = "SetClass")]
fn set_class(&self, class: String) -> crate::zbus::Result<()>;
#[zbus(name = "SetDisplay")]
fn set_display(&self, display: String) -> crate::zbus::Result<()>;
#[zbus(name = "SetTTY")]
fn set_tty(&self, tty_fd: crate::zvariant::OwnedFd) -> crate::zbus::Result<()>;
#[zbus(name = "TakeDevice")]
fn take_device(
&self,
major: u32,
minor: u32,
) -> crate::zbus::Result<(crate::zvariant::OwnedFd, bool)>;
#[zbus(name = "ReleaseDevice")]
fn release_device(&self, major: u32, minor: u32) -> crate::zbus::Result<()>;
#[zbus(name = "PauseDeviceComplete")]
fn pause_device_complete(&self, major: u32, minor: u32) -> crate::zbus::Result<()>;
#[zbus(name = "SetBrightness")]
fn set_brightness(
&self,
subsystem: String,
name: String,
brightness: u32,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "PauseDevice")]
fn pause_device(&self, major: u32, minor: u32, arg_type: String) -> crate::zbus::Result<()>;
#[zbus(signal, name = "ResumeDevice")]
fn resume_device(
&self,
major: u32,
minor: u32,
fd: crate::zvariant::OwnedFd,
) -> crate::zbus::Result<()>;
#[zbus(signal, name = "Lock")]
fn lock(&self) -> crate::zbus::Result<()>;
#[zbus(signal, name = "Unlock")]
fn unlock(&self) -> crate::zbus::Result<()>;
#[zbus(property(emits_changed_signal = "const"), name = "Id")]
fn id(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "User")]
fn user(&self) -> crate::zbus::Result<(u32, crate::zvariant::OwnedObjectPath)>;
#[zbus(property(emits_changed_signal = "const"), name = "Name")]
fn name(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Timestamp")]
fn timestamp(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "TimestampMonotonic")]
fn timestamp_monotonic(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "VTNr")]
fn vt_nr(&self) -> crate::zbus::Result<u32>;
#[zbus(property(emits_changed_signal = "const"), name = "Seat")]
fn seat(&self) -> crate::zbus::Result<(String, crate::zvariant::OwnedObjectPath)>;
#[zbus(property(emits_changed_signal = "true"), name = "TTY")]
fn tty(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "Display")]
fn display(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Remote")]
fn remote(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "const"), name = "RemoteHost")]
fn remote_host(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "RemoteUser")]
fn remote_user(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "ExtraDeviceAccess")]
fn extra_device_access(&self) -> crate::zbus::Result<Vec<String>>;
#[zbus(property(emits_changed_signal = "const"), name = "Service")]
fn service(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Desktop")]
fn desktop(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Scope")]
fn scope(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "const"), name = "Leader")]
fn leader(&self) -> crate::zbus::Result<u32>;
#[zbus(property(emits_changed_signal = "const"), name = "LeaderPIDFDId")]
fn leader_pidfd_id(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "Audit")]
fn audit(&self) -> crate::zbus::Result<u32>;
#[zbus(property(emits_changed_signal = "true"), name = "Type")]
fn type_property(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "Class")]
fn class(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "Active")]
fn active(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "State")]
fn state(&self) -> crate::zbus::Result<String>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleHint")]
fn idle_hint(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "IdleSinceHint")]
fn idle_since_hint(&self) -> crate::zbus::Result<u64>;
#[zbus(
property(emits_changed_signal = "true"),
name = "IdleSinceHintMonotonic"
)]
fn idle_since_hint_monotonic(&self) -> crate::zbus::Result<u64>;
#[zbus(property(emits_changed_signal = "const"), name = "CanIdle")]
fn can_idle(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "const"), name = "CanLock")]
fn can_lock(&self) -> crate::zbus::Result<bool>;
#[zbus(property(emits_changed_signal = "true"), name = "LockedHint")]
fn locked_hint(&self) -> crate::zbus::Result<bool>;
}