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 suspend, hibernate, shutdown and reboot. */
25 extern gboolean dbus_ConsoleKit_CanPowerOff(void);
26 extern gboolean dbus_ConsoleKit_CanReboot(void);
27 extern gboolean dbus_ConsoleKit_CanSuspend(void);
28 extern gboolean dbus_ConsoleKit_CanHibernate(void);
29 extern void dbus_ConsoleKit_PowerOff(GError **);
30 extern void dbus_ConsoleKit_Reboot(GError **);
31 extern void dbus_ConsoleKit_Suspend(GError **);
32 extern void dbus_ConsoleKit_Hibernate(GError **);
33 
34 /* Interface to UPower for suspend and hibernate. */
35 extern gboolean dbus_UPower_CanSuspend(void);
36 extern gboolean dbus_UPower_CanHibernate(void);
37 extern gboolean dbus_UPower_Suspend(GError **);
38 extern gboolean dbus_UPower_Hibernate(GError **);
39 
40 /* Interface to systemd for suspend, hibernate, shutdown and reboot. */
41 extern gboolean dbus_systemd_CanPowerOff(void);
42 extern gboolean dbus_systemd_CanReboot(void);
43 extern gboolean dbus_systemd_CanSuspend(void);
44 extern gboolean dbus_systemd_CanHibernate(void);
45 extern void dbus_systemd_PowerOff(GError **);
46 extern void dbus_systemd_Reboot(GError **);
47 extern void dbus_systemd_Suspend(GError **);
48 extern void dbus_systemd_Hibernate(GError **);
49 
50 /* Interface to lightdm for switch user. */
51 extern gboolean dbus_Lightdm_SwitchToGreeter (GError **error);
52 
53 /* Interface to lxde for logout. */
54 extern gboolean dbus_LXDE_Logout (GError **error);
55 
56 #endif
57