Unity 8
|
#include <plugins/Unity/Session/dbusunitysessionservice.h>
Inherits QObject.
Public Slots | |
Q_SCRIPTABLE void | Logout () |
Q_SCRIPTABLE void | RequestLogout () |
Signals | |
void | logoutRequested (bool have_inhibitors) |
void | logoutReady () |
DBusUnitySessionService provides com.canonical.Unity.Session dbus interface.
com.canonical.Unity.Session interface provides public methods and signals to handle Logout/Reboot/Shutdown.
Definition at line 29 of file dbusunitysessionservice.h.
|
slot |
Logout the system.
This method directly logout the system without user's confirmation. Ordinary applications should avoid calling this method. Please call RequestLogout() to ask the user to decide logout or not. This method will stop all the running applications and then signal logoutReady when all the apps stopped.
Definition at line 38 of file dbusunitysessionservice.cpp.
|
signal |
logoutReady signal
This signal is emitted when all the apps are closed. And the system is safe to logout.
|
signal |
logoutRequested signal
This signal is emitted when some applications request the system to logout.
have_inhibitors | if there are any special running applications which inhibit the logout. |
|
slot |
Issue a logout request.
This method emit the logoutRequested signal to the shell with a boolean which indicates if there's any inhibitors. The shell should receive this signal and display a dialog to ask the user to confirm the logout action. If confirmed, shell can call Logout() method to kill the apps and then logout
Definition at line 43 of file dbusunitysessionservice.cpp.