9#include <KConfigWatcher>
12#include "kworkspace_export.h"
13#include "sessionmanagement.h"
15class OrgFreedesktopLogin1ManagerInterface;
32 virtual void shutdown() = 0;
33 virtual void reboot() = 0;
35 virtual void hybridSuspend() = 0;
36 virtual void hibernate() = 0;
37 virtual void suspendThenHibernate() = 0;
39 virtual bool canShutdown()
const = 0;
40 virtual bool canReboot()
const = 0;
41 virtual bool canSuspend()
const = 0;
42 virtual bool canHybridSuspend()
const = 0;
43 virtual bool canHibernate()
const = 0;
44 virtual bool canSuspendThenHibernate()
const = 0;
46 virtual bool canSwitchUser()
const;
48 bool confirmLogout()
const;
52 void canShutdownChanged();
53 void canRebootChanged();
54 void canSuspendChanged();
55 void canHybridSuspendChanged();
56 void canHibernateChanged();
57 void canSuspendThenHibernateChanged();
59 void aboutToSuspend();
60 void resumingFromSuspend();
67 KConfigWatcher::Ptr m_kserverConfig;
79 LogindSessionBackend();
82 void shutdown()
override;
83 void reboot()
override;
84 void suspend()
override;
85 void hybridSuspend()
override;
86 void hibernate()
override;
87 void suspendThenHibernate()
override;
88 bool canShutdown()
const override;
89 bool canReboot()
const override;
90 bool canSuspend()
const override;
91 bool canHybridSuspend()
const override;
92 bool canHibernate()
const override;
93 bool canSuspendThenHibernate()
const override;
94 bool canSwitchUser()
const override;
97 OrgFreedesktopLogin1ManagerInterface *m_login1;
99 bool m_canShutdown =
false;
100 bool m_canReboot =
false;
101 bool m_canSuspend =
false;
102 bool m_canHybridSuspend =
false;
103 bool m_canHibernate =
false;
104 bool m_canSuspendThenHibernate =
false;
105 uint m_pendingJobs = 0;
112 DummySessionBackend();
118 void shutdown()
override
121 void reboot()
override
124 void suspend()
override
127 void hybridSuspend()
override
130 void hibernate()
override
133 void suspendThenHibernate()
override
136 bool canShutdown()
const override
140 bool canReboot()
const override
144 bool canSuspend()
const override
148 bool canHybridSuspend()
const override
152 bool canHibernate()
const override
156 bool canSuspendThenHibernate()
const override
166 TestSessionBackend();
172 void shutdown()
override;
173 void reboot()
override;
174 void suspend()
override;
175 void hybridSuspend()
override;
176 void hibernate()
override;
177 void suspendThenHibernate()
override;
179 bool canShutdown()
const override
183 bool canReboot()
const override
187 bool canSuspend()
const override
191 bool canHybridSuspend()
const override
195 bool canHibernate()
const override
199 bool canSuspendThenHibernate()
const override
Performs direct system actions that could kill the session.
@ Loading
The backend is loading canXyz functions may not represent the true state.
@ Error
Error creating a suitable backend, no actions will be available.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:59 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.