2 * Copyright (C) 2014 Canonical, Ltd.
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#ifndef DBUSUNITYSESSIONSERVICE_H
18#define DBUSUNITYSESSIONSERVICE_H
23 * DBusUnitySessionService provides com.canonical.Unity.Session dbus
26 * com.canonical.Unity.Session interface provides public methods
27 * and signals to handle Logout/Reboot/Shutdown.
29class DBusUnitySessionService : public QObject
32 Q_CLASSINFO("D-Bus Interface", "com.canonical.Unity.Session")
35 DBusUnitySessionService();
36 ~DBusUnitySessionService();
40 * logoutRequested signal
42 * This signal is emitted when some applications request the system to
44 * @param have_inhibitors if there are any special running applications
45 * which inhibit the logout.
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);
73 * This signal is emitted when all the apps are closed. And the system
82 * This method directly logout the system without user's confirmation.
83 * Ordinary applications should avoid calling this method. Please call
84 * RequestLogout() to ask the user to decide logout or not.
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();
107 * Issue a logout request.
109 * This method emit the logoutRequested signal to the shell with a boolean
110 * which indicates if there's any inhibitors. The shell should receive
111 * this signal and display a dialog to ask the user to confirm the logout
112 * action. If confirmed, shell can call Logout() method to logout.
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();
139#endif // DBUSUNITYSESSIONSERVICE_H
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list