aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-05-28 11:33:07 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-05-28 11:33:07 -0500
commitb9a6194c12bf39fb6317edc1126ea32e890da583 (patch)
tree77ee861b8290309219a0911270f1f87d282e1129 /src
parent23a2672a1a763cdef67ccc5cb9f8fec7daf021be (diff)
downloadayatana-indicator-power-b9a6194c12bf39fb6317edc1126ea32e890da583.tar.gz
ayatana-indicator-power-b9a6194c12bf39fb6317edc1126ea32e890da583.tar.bz2
ayatana-indicator-power-b9a6194c12bf39fb6317edc1126ea32e890da583.zip
add a mock GSD.Power to handle the GetPower requests
Diffstat (limited to 'src')
-rw-r--r--src/dbus-listener.c11
-rw-r--r--src/dbus-listener.h5
2 files changed, 8 insertions, 8 deletions
diff --git a/src/dbus-listener.c b/src/dbus-listener.c
index 6a85fd4..a7a29ee 100644
--- a/src/dbus-listener.c
+++ b/src/dbus-listener.c
@@ -24,11 +24,6 @@ License along with this library. If not, see
#include "dbus-listener.h"
#include "device.h"
-#define DBUS_SERVICE "org.gnome.SettingsDaemon"
-#define DBUS_PATH "/org/gnome/SettingsDaemon"
-#define POWER_DBUS_PATH DBUS_PATH "/Power"
-#define POWER_DBUS_INTERFACE "org.gnome.SettingsDaemon.Power"
-
struct _IndicatorPowerDbusListenerPrivate
{
GCancellable * cancellable;
@@ -89,7 +84,7 @@ indicator_power_dbus_listener_init (IndicatorPowerDbusListener *self)
priv->cancellable = g_cancellable_new ();
priv->watcher_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
- DBUS_SERVICE,
+ GSD_SERVICE,
G_BUS_NAME_WATCHER_FLAGS_NONE,
gsd_appeared_callback,
NULL,
@@ -226,8 +221,8 @@ gsd_appeared_callback (GDBusConnection *connection,
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
NULL,
name,
- POWER_DBUS_PATH,
- POWER_DBUS_INTERFACE,
+ GSD_POWER_DBUS_PATH,
+ GSD_POWER_DBUS_INTERFACE,
priv->cancellable,
service_proxy_cb,
self);
diff --git a/src/dbus-listener.h b/src/dbus-listener.h
index 2dc0865..d1ab993 100644
--- a/src/dbus-listener.h
+++ b/src/dbus-listener.h
@@ -41,6 +41,11 @@ typedef struct _IndicatorPowerDbusListener IndicatorPowerDbusListener;
typedef struct _IndicatorPowerDbusListenerClass IndicatorPowerDbusListenerClass;
typedef struct _IndicatorPowerDbusListenerPrivate IndicatorPowerDbusListenerPrivate;
+#define GSD_SERVICE "org.gnome.SettingsDaemon"
+#define GSD_PATH "/org/gnome/SettingsDaemon"
+#define GSD_POWER_DBUS_INTERFACE GSD_SERVICE ".Power"
+#define GSD_POWER_DBUS_PATH GSD_PATH "/Power"
+
/* signals */
#define INDICATOR_POWER_DBUS_LISTENER_DEVICES_ENUMERATED "indicator-power-dbus-listener-devices-enumerated"