3
Listens for Power changes from org.gnome.SettingsDaemon.Power on Dbus
5
Copyright 2012 Canonical Ltd.
8
Javier Jardon <javier.jardon@codethink.co.uk>
9
Charles Kerr <charles.kerr@canonical.com>
11
This library is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
version 3.0 as published by the Free Software Foundation.
15
This library is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License version 3.0 for more details.
20
You should have received a copy of the GNU General Public
21
License along with this library. If not, see
22
<http://www.gnu.org/licenses/>.
25
#ifndef __INDICATOR_POWER_DBUS_LISTENER_H__
26
#define __INDICATOR_POWER_DBUS_LISTENER_H__
28
#include <glib-object.h>
29
#include <libupower-glib/upower.h>
33
#define INDICATOR_POWER_DBUS_LISTENER_TYPE (indicator_power_dbus_listener_get_type ())
34
#define INDICATOR_POWER_DBUS_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_POWER_DBUS_LISTENER_TYPE, IndicatorPowerDbusListener))
35
#define INDICATOR_POWER_DBUS_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_POWER_DBUS_LISTENER_TYPE, IndicatorPowerDbusListenerClass))
36
#define INDICATOR_IS_POWER_DBUS_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_POWER_DBUS_LISTENER_TYPE))
37
#define INDICATOR_IS_POWER_DBUS_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_POWER_DBUS_LISTENER_TYPE))
38
#define INDICATOR_POWER_DBUS_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_POWER_DBUS_LISTENER_TYPE, IndicatorPowerDbusListenerClass))
40
typedef struct _IndicatorPowerDbusListener IndicatorPowerDbusListener;
41
typedef struct _IndicatorPowerDbusListenerClass IndicatorPowerDbusListenerClass;
42
typedef struct _IndicatorPowerDbusListenerPrivate IndicatorPowerDbusListenerPrivate;
44
#define GSD_SERVICE "org.gnome.SettingsDaemon"
45
#define GSD_PATH "/org/gnome/SettingsDaemon"
46
#define GSD_POWER_DBUS_INTERFACE GSD_SERVICE ".Power"
47
#define GSD_POWER_DBUS_PATH GSD_PATH "/Power"
50
#define INDICATOR_POWER_DBUS_LISTENER_DEVICES_ENUMERATED "devices-enumerated"
53
* IndicatorPowerDbusListenerClass:
54
* @parent_class: #GObjectClass
56
struct _IndicatorPowerDbusListenerClass
58
GObjectClass parent_class;
60
void (* devices_enumerated) (IndicatorPowerDbusListener*, GSList * devices);
64
* IndicatorPowerDbusListener:
66
* @priv: A cached reference to the private data for the instance.
68
struct _IndicatorPowerDbusListener
71
IndicatorPowerDbusListenerPrivate * priv;
78
GType indicator_power_dbus_listener_get_type (void);