Back to index

indicator-power  12.10.0
dbus-listener.h
Go to the documentation of this file.
00001 /*
00002 
00003 Listens for Power changes from org.gnome.SettingsDaemon.Power on Dbus
00004 
00005 Copyright 2012 Canonical Ltd.
00006 
00007 Authors:
00008     Javier Jardon <javier.jardon@codethink.co.uk>
00009     Charles Kerr <charles.kerr@canonical.com>
00010 
00011 This library is free software; you can redistribute it and/or
00012 modify it under the terms of the GNU General Public License
00013 version 3.0 as published by the Free Software Foundation.
00014 
00015 This library is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License version 3.0 for more details.
00019 
00020 You should have received a copy of the GNU General Public
00021 License along with this library. If not, see
00022 <http://www.gnu.org/licenses/>.
00023 */
00024 
00025 #ifndef __INDICATOR_POWER_DBUS_LISTENER_H__
00026 #define __INDICATOR_POWER_DBUS_LISTENER_H__
00027 
00028 #include <glib-object.h>
00029 #include <libupower-glib/upower.h>
00030 
00031 G_BEGIN_DECLS
00032 
00033 #define INDICATOR_POWER_DBUS_LISTENER_TYPE            (indicator_power_dbus_listener_get_type ())
00034 #define INDICATOR_POWER_DBUS_LISTENER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_POWER_DBUS_LISTENER_TYPE, IndicatorPowerDbusListener))
00035 #define INDICATOR_POWER_DBUS_LISTENER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  INDICATOR_POWER_DBUS_LISTENER_TYPE, IndicatorPowerDbusListenerClass))
00036 #define INDICATOR_IS_POWER_DBUS_LISTENER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_POWER_DBUS_LISTENER_TYPE))
00037 #define INDICATOR_IS_POWER_DBUS_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  INDICATOR_POWER_DBUS_LISTENER_TYPE))
00038 #define INDICATOR_POWER_DBUS_LISTENER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  INDICATOR_POWER_DBUS_LISTENER_TYPE, IndicatorPowerDbusListenerClass))
00039 
00040 typedef struct _IndicatorPowerDbusListener IndicatorPowerDbusListener;
00041 typedef struct _IndicatorPowerDbusListenerClass IndicatorPowerDbusListenerClass;
00042 typedef struct _IndicatorPowerDbusListenerPrivate IndicatorPowerDbusListenerPrivate;
00043 
00044 #define GSD_SERVICE               "org.gnome.SettingsDaemon"
00045 #define GSD_PATH                  "/org/gnome/SettingsDaemon"
00046 #define GSD_POWER_DBUS_INTERFACE  GSD_SERVICE ".Power"
00047 #define GSD_POWER_DBUS_PATH       GSD_PATH "/Power"
00048 
00049 /* signals */
00050 #define INDICATOR_POWER_DBUS_LISTENER_DEVICES_ENUMERATED  "devices-enumerated"
00051 
00056 struct _IndicatorPowerDbusListenerClass
00057 {
00058   GObjectClass parent_class;
00059 
00060   void (* devices_enumerated) (IndicatorPowerDbusListener*, GSList * devices);
00061 };
00062 
00068 struct _IndicatorPowerDbusListener
00069 {
00070   GObject parent;
00071   IndicatorPowerDbusListenerPrivate * priv;
00072 };
00073 
00074 /***
00075 ****
00076 ***/
00077 
00078 GType indicator_power_dbus_listener_get_type (void);
00079 
00080 G_END_DECLS
00081 
00082 #endif