Unity 8
 All Classes Functions Properties
DBusUnitySessionService Class Reference

#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 ()
 

Detailed Description

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.

Member Function Documentation

void DBusUnitySessionService::Logout ( )
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.

39 {
40  Q_EMIT logoutReady();
41 }
void DBusUnitySessionService::logoutReady ( )
signal

logoutReady signal

This signal is emitted when all the apps are closed. And the system is safe to logout.

void DBusUnitySessionService::logoutRequested ( bool  have_inhibitors)
signal

logoutRequested signal

This signal is emitted when some applications request the system to logout.

Parameters
have_inhibitorsif there are any special running applications which inhibit the logout.
void DBusUnitySessionService::RequestLogout ( )
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.

44 {
45  Q_EMIT logoutRequested(false);
46 }
void logoutRequested(bool have_inhibitors)

The documentation for this class was generated from the following files: