summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-08-28 15:49:19 +0100
committerRichard Hughes <richard@hughsie.com>2008-08-28 15:49:19 +0100
commit7fdcc278dc80aa0bb07c834e0d8de5787852ecb2 (patch)
tree91c2afadfa42f96082bb9423a875f89c4b795b16 /tools
parent0e2c7ef0ecb7ef924230a4e45c0b75a3937678d7 (diff)
convert to using egg_ functionality like other projects
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am5
-rw-r--r--tools/dkp-battery-power.c10
-rw-r--r--tools/dkp-tool.c4
l---------tools/egg-debug.c1
l---------tools/egg-debug.h1
5 files changed, 14 insertions, 7 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index cab1a2d..508702c 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -10,6 +10,7 @@ INCLUDES = \
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
+ -DEGG_LOG_FILE=\""$(PK_LOG_DIR)/DeviceKit-power"\" \
-I$(top_srcdir)/libdevkit-power \
$(DBUS_GLIB_CFLAGS) \
$(POLKIT_DBUS_CFLAGS) \
@@ -33,6 +34,8 @@ dkp-daemon-glue.h: $(top_srcdir)/src/org.freedesktop.DeviceKit.Power.xml Makefil
bin_PROGRAMS = devkit-power devkit-power-on-battery
devkit_power_SOURCES = \
+ egg-debug.c \
+ egg-debug.h \
dkp-tool.c \
$(BUILT_SOURCES)
@@ -47,6 +50,8 @@ devkit_power_LDADD = \
$(POLKIT_DBUS_LIBS)
devkit_power_on_battery_SOURCES = \
+ egg-debug.c \
+ egg-debug.h \
dkp-battery-power.c \
$(BUILT_SOURCES)
diff --git a/tools/dkp-battery-power.c b/tools/dkp-battery-power.c
index 49be2ca..841d735 100644
--- a/tools/dkp-battery-power.c
+++ b/tools/dkp-battery-power.c
@@ -1,6 +1,6 @@
#include <glib.h>
#include <dbus/dbus-glib.h>
-#include "dkp-debug.h"
+#include "egg-debug.h"
/**
* main:
@@ -28,11 +28,11 @@ main (int argc, char **argv)
g_option_context_add_main_entries (context, entries, NULL);
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
- dkp_debug_init (verbose);
+ egg_debug_init (verbose);
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (bus == NULL) {
- dkp_warning ("Couldn't connect to system bus: %s", error->message);
+ egg_warning ("Couldn't connect to system bus: %s", error->message);
g_error_free (error);
goto out;
}
@@ -40,7 +40,7 @@ main (int argc, char **argv)
proxy = dbus_g_proxy_new_for_name (bus, "org.freedesktop.DeviceKit.Power",
"/", "org.freedesktop.DeviceKit.Power");
if (proxy == NULL) {
- dkp_warning ("Couldn't connect to DeviceKit-power");
+ egg_warning ("Couldn't connect to DeviceKit-power");
goto out;
}
@@ -49,7 +49,7 @@ main (int argc, char **argv)
G_TYPE_BOOLEAN, &on_battery,
G_TYPE_INVALID);
if (!ret) {
- dkp_debug ("GetOnBattery failed: %s", error->message);
+ egg_debug ("GetOnBattery failed: %s", error->message);
g_error_free (error);
goto out;
}
diff --git a/tools/dkp-tool.c b/tools/dkp-tool.c
index c2f6424..371a2e3 100644
--- a/tools/dkp-tool.c
+++ b/tools/dkp-tool.c
@@ -31,7 +31,7 @@
#include <glib/gi18n-lib.h>
#include "dkp-marshal.h"
-#include "dkp-debug.h"
+#include "egg-debug.h"
#include "dkp-client.h"
#include "dkp-client-device.h"
@@ -123,7 +123,7 @@ main (int argc, char **argv)
g_option_context_add_main_entries (context, entries, NULL);
g_option_context_parse (context, &argc, &argv, NULL);
g_option_context_free (context);
- dkp_debug_init (verbose);
+ egg_debug_init (verbose);
loop = g_main_loop_new (NULL, FALSE);
client = dkp_client_new ();
diff --git a/tools/egg-debug.c b/tools/egg-debug.c
new file mode 120000
index 0000000..0a3eb62
--- /dev/null
+++ b/tools/egg-debug.c
@@ -0,0 +1 @@
+../src/egg-debug.c \ No newline at end of file
diff --git a/tools/egg-debug.h b/tools/egg-debug.h
new file mode 120000
index 0000000..db811d2
--- /dev/null
+++ b/tools/egg-debug.h
@@ -0,0 +1 @@
+../src/egg-debug.h \ No newline at end of file