summaryrefslogtreecommitdiff
path: root/common/xfpm-power-common.h
blob: b2c0514cbd0d0743d201145e070ba86758f102d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * * Copyright (C) 2010-2011 Ali <aliov@xfce.org>
 *
 * Licensed under the GNU General Public License Version 2
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef XFPM_UPOWER_COMMON
#define XFPM_UPOWER_COMMON

#define UPOWER_NAME 	      "org.freedesktop.UPower"
#define UPOWER_PATH 	      "/org/freedesktop/UPower"

#define UPOWER_IFACE 	      "org.freedesktop.UPower"
#define UPOWER_IFACE_DEVICE   "org.freedesktop.UPower.Device"
#define UPOWER_PATH_DEVICE    "/org/freedesktop/UPower/devices/"

#define UPOWER_PATH_WAKEUPS   "/org/freedesktop/UPower/Wakeups"
#define UPOWER_IFACE_WAKEUPS  "org.freedesktop.UPower.Wakeups"

#define POLKIT_AUTH_SUSPEND_UPOWER	"org.freedesktop.upower.suspend"
#define POLKIT_AUTH_HIBERNATE_UPOWER	"org.freedesktop.upower.hibernate"

#define POLKIT_AUTH_SUSPEND_LOGIND	"org.freedesktop.login1.suspend"
#define POLKIT_AUTH_HIBERNATE_LOGIND	"org.freedesktop.login1.hibernate"

#define POLKIT_AUTH_SUSPEND_XFPM	"org.xfce.power.xfce4-pm-helper"
#define POLKIT_AUTH_HIBERNATE_XFPM	"org.xfce.power.xfce4-pm-helper"

#define POLKIT_AUTH_SUSPEND_CONSOLEKIT2   "org.freedesktop.consolekit.system.suspend"
#define POLKIT_AUTH_HIBERNATE_CONSOLEKIT2 "org.freedesktop.consolekit.system.hibernate"

const gchar *xfpm_power_translate_device_type         (guint         type);
const gchar *xfpm_power_translate_technology          (guint         value);
gchar       *xfpm_battery_get_time_string             (guint         seconds);
gchar       *get_device_panel_icon_name               (UpClient     *upower,
                                                       UpDevice     *device);
gchar       *get_device_icon_name                     (UpClient     *upower,
                                                       UpDevice     *device,
                                                       gboolean      is_panel);
gchar       *get_device_description                   (UpClient     *upower,
                                                       UpDevice     *device);

#endif /* XFPM_UPOWER_COMMON */