@@ -46,6 +46,27 @@ Q_SIGNALS:
47 void logoutRequested(bool have_inhibitors);
47 void logoutRequested(bool have_inhibitors);
50+ * rebootRequested signal
52+ * This signal is emitted when some applications request the system to
54+ * @param have_inhibitors if there are any special running applications
55+ * which inhibit the reboot.
57+ void rebootRequested(bool have_inhibitors);
60+ * shutdownRequested signal
62+ * This signal is emitted when some applications request the system to
64+ * @param have_inhibitors if there are any special running applications
65+ * which inhibit the shutdown.
67+ void shutdownRequested(bool have_inhibitors);
50 * logoutReady signal
71 * logoutReady signal
@@ -61,22 +82,58 @@ public Q_SLOTS:
61 * This method directly logout the system without user's confirmation.
82 * This method directly logout the system without user's confirmation.
62 * Ordinary applications should avoid calling this method. Please call
83 * Ordinary applications should avoid calling this method. Please call
63 * RequestLogout() to ask the user to decide logout or not.
84 * RequestLogout() to ask the user to decide logout or not.
64− * This method will stop all the running applications and then signal
65− * logoutReady when all the apps stopped.
67 Q_SCRIPTABLE void Logout();
86 Q_SCRIPTABLE void Logout();
91+ * This method directly reboot the system without user's confirmation.
92+ * Ordinary applications should avoid calling this method. Please call
93+ * RequestReboot() to ask the user to decide reboot or not.
95+ Q_SCRIPTABLE void Reboot();
98+ * Shutdown the system.
100+ * This method directly shutdown the system without user's confirmation.
101+ * Ordinary applications should avoid calling this method. Please call
102+ * RequestShutdown() to ask the user to decide shutdown or not.
104+ Q_SCRIPTABLE void Shutdown();
70 * Issue a logout request.
107 * Issue a logout request.
72 * This method emit the logoutRequested signal to the shell with a boolean
109 * This method emit the logoutRequested signal to the shell with a boolean
73 * which indicates if there's any inhibitors. The shell should receive
110 * which indicates if there's any inhibitors. The shell should receive
74 * this signal and display a dialog to ask the user to confirm the logout
111 * this signal and display a dialog to ask the user to confirm the logout
75− * action. If confirmed, shell can call Logout() method to kill the apps
112+ * action. If confirmed, shell can call Logout() method to logout.
78 Q_SCRIPTABLE void RequestLogout();
114 Q_SCRIPTABLE void RequestLogout();
117+ * Issue a reboot request.
119+ * This method emit the rebootRequested signal to the shell with a boolean
120+ * which indicates if there's any inhibitors. The shell should receive
121+ * this signal and display a dialog to ask the user to confirm the reboot
122+ * action. If confirmed, shell can call Reboot() method to reboot
124+ Q_SCRIPTABLE void RequestReboot();
127+ * Issue a shutdown request.
129+ * This method emit the shutdownRequested signal to the shell with a
130+ * boolean which indicates if there's any inhibitors.
131+ * The shell should receive
132+ * this signal and display a dialog to ask the user to confirm the reboot
133+ * action. If confirmed, shell can call Shutdown() method to reboot
135+ Q_SCRIPTABLE void RequestShutdown();
82#endif // DBUSUNITYSESSIONSERVICE_H
139#endif // DBUSUNITYSESSIONSERVICE_H