summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-08-09 14:27:32 +0100
committerRichard Hughes <richard@hughsie.com>2008-08-09 14:27:32 +0100
commit918c35586bf257d316b0dfc6c0822a9c9c142f17 (patch)
tree9bc33b487f1024c3995168baf746f84295087ac1 /tools
parent6a498f04873034cc856c02870e7ed0f18fe2094d (diff)
refactor out DkpDevice and DkpSupply so we can add another type of device without a metric ton of copy and paste
Diffstat (limited to 'tools')
-rw-r--r--tools/.gitignore1
-rw-r--r--tools/Makefile.am8
-rw-r--r--tools/dkp-client-device.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/tools/.gitignore b/tools/.gitignore
index 173da61..ea46275 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -1,5 +1,6 @@
.deps
devkit-power
+devkit-power-on-battery
*-glue.h
*.o
*-marshal.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 6519c57..4c88843 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -30,7 +30,7 @@ dkp-marshal.c: $(top_srcdir)/src/dkp-marshal.list
dkp-daemon-glue.h: $(top_srcdir)/src/org.freedesktop.DeviceKit.Power.xml Makefile.am
dbus-binding-tool --prefix=devkit_power_daemon --mode=glib-client --output=dkp-daemon-glue.h $(top_srcdir)/src/org.freedesktop.DeviceKit.Power.xml
-bin_PROGRAMS = devkit-power devkit-battery-power
+bin_PROGRAMS = devkit-power devkit-power-on-battery
devkit_power_SOURCES = \
dkp-tool.c \
@@ -50,16 +50,16 @@ devkit_power_LDADD = \
$(DEVKIT_POWER_LIBS) \
$(POLKIT_DBUS_LIBS)
-devkit_battery_power_SOURCES = \
+devkit_power_on_battery_SOURCES = \
dkp-battery-power.c \
$(BUILT_SOURCES)
-devkit_battery_power_CPPFLAGS = \
+devkit_power_on_battery_CPPFLAGS = \
-DG_LOG_DOMAIN=\"devkit-power\" \
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
-devkit_battery_power_LDADD = \
+devkit_power_on_battery_LDADD = \
$(DBUS_GLIB_LIBS) \
$(DEVKIT_POWER_LIBS) \
$(POLKIT_DBUS_LIBS)
diff --git a/tools/dkp-client-device.c b/tools/dkp-client-device.c
index a3effc9..ad4a245 100644
--- a/tools/dkp-client-device.c
+++ b/tools/dkp-client-device.c
@@ -146,7 +146,7 @@ dkp_client_device_set_object_path (DkpClientDevice *device, const gchar *object_
/* connect to the correct path for all the other methods */
proxy_source = dbus_g_proxy_new_for_name (device->priv->bus, "org.freedesktop.DeviceKit.Power",
- object_path, "org.freedesktop.DeviceKit.Power.Source");
+ object_path, "org.freedesktop.DeviceKit.Power.Device");
if (proxy_source == NULL) {
dkp_warning ("Couldn't connect to proxy");
goto out;