D-Bus Phase 3/4: upgrade sessiond, services, add StatusNotifierWatcher, consolidate configs
- redbear-sessiond: add Manager.Inhibit (pipe FD), CanPowerOff/CanReboot/ CanSuspend/CanHibernate/CanHybridSleep/CanSleep (return na), PowerOff/ Reboot/Suspend stubs, GetSessionByPID, ListUsers, ListSeats, ListInhibitors, ActivateSession/LockSession/UnlockSession/TerminateSession - redbear-sessiond: add Session SetIdleHint, SetLockedHint, SetType, Terminate methods; wire PauseDevice/ResumeDevice/Lock/Unlock signal emission via SignalEmitter injection; add dynamic device enumeration scanning /scheme/drm/card* and /dev/input/event* at startup - redbear-sessiond: replace infinite pending() with stoppable shutdown via tokio watch channel + control socket shutdown command - redbear-upower: add Changed signal emission with 30s periodic polling and power state snapshot comparison - redbear-notifications: add ActionInvoked signal, expand capabilities to body + body-markup + actions - redbear-polkit, redbear-udisks: replace pending() with stoppable shutdown via signal handling + watch channel - Add redbear-statusnotifierwatcher: new session bus service implementing org.freedesktop.StatusNotifierWatcher for KDE system tray - Add D-Bus activation file for StatusNotifierWatcher - KWin session.cpp: try LogindSession before NoopSession fallback - Consolidate config profiles: remove obsolete redbear-desktop, redbear-kde, redbear-live-*, redbear-minimal-*, redbear-wayland configs; simplify to three supported targets (redbear-full, redbear-mini, redbear-grub) - Update DBUS-INTEGRATION-PLAN.md and DESKTOP-STACK-CURRENT-STATUS.md with Phase 3/4 fragility assessment, KWin readiness matrix, and completeness gap analysis
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct InhibitorEntry {
|
||||
pub what: String,
|
||||
pub who: String,
|
||||
pub why: String,
|
||||
pub mode: String,
|
||||
pub pid: u32,
|
||||
pub uid: u32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SessionRuntime {
|
||||
pub session_id: String,
|
||||
@@ -11,6 +21,10 @@ pub struct SessionRuntime {
|
||||
pub state: String,
|
||||
pub active: bool,
|
||||
pub preparing_for_shutdown: bool,
|
||||
pub idle_hint: bool,
|
||||
pub locked_hint: bool,
|
||||
pub session_type: String,
|
||||
pub inhibitors: Vec<InhibitorEntry>,
|
||||
}
|
||||
|
||||
impl Default for SessionRuntime {
|
||||
@@ -25,6 +39,10 @@ impl Default for SessionRuntime {
|
||||
state: String::from("online"),
|
||||
active: true,
|
||||
preparing_for_shutdown: false,
|
||||
idle_hint: false,
|
||||
locked_hint: false,
|
||||
session_type: String::from("wayland"),
|
||||
inhibitors: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user