summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-12-09 11:05:59 +0000
committerRichard Hughes <richard@hughsie.com>2008-12-09 11:05:59 +0000
commit43f1ae266895561114c7f68c87f47f9474643ba8 (patch)
tree2f27d7ab4e218ec8102c3331497542782a865bcb /src
parent0c0c7fd5a48434bfe4af96de1126ff7d4b6b6bb5 (diff)
trivial: fix the introspection warning and the startup verbage
Diffstat (limited to 'src')
-rw-r--r--src/dkp-csr.c4
-rw-r--r--src/dkp-hid.c4
-rw-r--r--src/dkp-main.c7
-rw-r--r--src/dkp-qos.c7
-rw-r--r--src/dkp-wup.c4
5 files changed, 9 insertions, 17 deletions
diff --git a/src/dkp-csr.c b/src/dkp-csr.c
index 8815a40..299e358 100644
--- a/src/dkp-csr.c
+++ b/src/dkp-csr.c
@@ -146,10 +146,8 @@ dkp_csr_coldplug (DkpDevice *device)
/* get the type */
type = devkit_device_get_property (d, "DKP_BATTERY_TYPE");
- if (type == NULL) {
- egg_debug ("not a CSR device");
+ if (type == NULL)
goto out;
- }
/* which one? */
if (egg_strequal (type, "mouse"))
diff --git a/src/dkp-hid.c b/src/dkp-hid.c
index 4816388..e61bc67 100644
--- a/src/dkp-hid.c
+++ b/src/dkp-hid.c
@@ -303,10 +303,8 @@ dkp_hid_coldplug (DkpDevice *device)
/* get the type */
type = devkit_device_get_property (d, "DKP_BATTERY_TYPE");
- if (type == NULL || !egg_strequal (type, "ups")) {
- egg_debug ("not a UPS device");
+ if (type == NULL || !egg_strequal (type, "ups"))
goto out;
- }
/* get the device file */
device_file = devkit_device_get_device_file (d);
diff --git a/src/dkp-main.c b/src/dkp-main.c
index 5f47f5c..1d64b66 100644
--- a/src/dkp-main.c
+++ b/src/dkp-main.c
@@ -45,7 +45,6 @@
#include "dkp-daemon.h"
#include "dkp-qos.h"
-#include "dkp-qos-glue.h"
#define NAME_TO_CLAIM "org.freedesktop.DeviceKit.Power"
static GMainLoop *loop = NULL;
@@ -126,7 +125,6 @@ main (int argc, char **argv)
DBusGProxy *bus_proxy;
DBusGConnection *bus;
gboolean verbose = FALSE;
- DBusGConnection *connection;
int ret = 1;
const GOptionEntry entries[] = {
@@ -173,11 +171,6 @@ main (int argc, char **argv)
if (daemon == NULL)
goto out;
- /* register on the bus */
- connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
- dbus_g_object_type_install_info (DKP_TYPE_QOS, &dbus_glib_dkp_qos_object_info);
- dbus_g_connection_register_g_object (connection, "/org/freedesktop/DeviceKit/Power/QoS", G_OBJECT (qos));
-
loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);
diff --git a/src/dkp-qos.c b/src/dkp-qos.c
index f24bf3d..6ed3f96 100644
--- a/src/dkp-qos.c
+++ b/src/dkp-qos.c
@@ -39,6 +39,7 @@
#include "dkp-marshal.h"
#include "dkp-daemon.h"
#include "dkp-polkit.h"
+#include "dkp-qos-glue.h"
static void dkp_qos_class_init (DkpQosClass *klass);
static void dkp_qos_init (DkpQos *qos);
@@ -587,6 +588,10 @@ dkp_qos_class_init (DkpQosClass *klass)
G_STRUCT_OFFSET (DkpQosClass, requests_changed),
NULL, NULL, g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ /* introspection */
+ dbus_g_object_type_install_info (DKP_TYPE_QOS, &dbus_glib_dkp_qos_object_info);
+
g_type_class_add_private (klass, sizeof (DkpQosPrivate));
}
@@ -628,7 +633,7 @@ dkp_qos_init (DkpQos *qos)
}
/* register on the bus */
- dbus_g_connection_register_g_object (qos->priv->connection, "/org/freedesktop/DeviceKit/Power", G_OBJECT (qos));
+ dbus_g_connection_register_g_object (qos->priv->connection, "/org/freedesktop/DeviceKit/Power/Policy", G_OBJECT (qos));
/* watch NOC */
qos->priv->proxy = dbus_g_proxy_new_for_name_owner (qos->priv->connection, DBUS_SERVICE_DBUS,
diff --git a/src/dkp-wup.c b/src/dkp-wup.c
index 9d959de..d59806e 100644
--- a/src/dkp-wup.c
+++ b/src/dkp-wup.c
@@ -311,10 +311,8 @@ dkp_wup_coldplug (DkpDevice *device)
/* get the type */
type = devkit_device_get_property (d, "DKP_MONITOR_TYPE");
- if (type == NULL || !egg_strequal (type, "wup")) {
- egg_debug ("not a Watts Up? Pro device");
+ if (type == NULL || !egg_strequal (type, "wup"))
goto out;
- }
/* get the device file */
device_file = devkit_device_get_device_file (d);