Convert DeviceKit/Power support to UPower support and remove conditional compilation
[lxde/lxsession.git] / lxsession-logout / dbus-interface.h
1 /**
2 * Copyright (c) 2010 LxDE Developers, see the file AUTHORS for details.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef _DBUS_INTERFACE_H
20 #define _DBUS_INTERFACE_H
21
22 #include <glib.h>
23
24 /* Interface to ConsoleKit for shutdown and reboot. */
25 extern gboolean dbus_ConsoleKit_CanStop(void);
26 extern gboolean dbus_ConsoleKit_CanRestart(void);
27 extern char * dbus_ConsoleKit_Stop(void);
28 extern char * dbus_ConsoleKit_Restart(void);
29
30 /* Interface to UPower for suspend and hibernate. */
31 extern gboolean dbus_UPower_CanSuspend(void);
32 extern gboolean dbus_UPower_CanHibernate(void);
33 extern char * dbus_UPower_Suspend(void);
34 extern char * dbus_UPower_Hibernate(void);
35
36 /* Interface to HAL for shutdown, reboot, suspend, and hibernate.
37 * HAL is being replaced by the above two mechanisms; this support is legacy. */
38 extern gboolean dbus_HAL_CanShutdown(void);
39 extern gboolean dbus_HAL_CanReboot(void);
40 extern gboolean dbus_HAL_CanSuspend(void);
41 extern gboolean dbus_HAL_CanHibernate(void);
42 extern char * dbus_HAL_Shutdown(void);
43 extern char * dbus_HAL_Reboot(void);
44 extern char * dbus_HAL_Suspend(void);
45 extern char * dbus_HAL_Hibernate(void);
46
47 #endif