trivial: fix the introspection warning and the startup verbage

This commit is contained in:
Richard Hughes 2008-12-09 11:05:59 +00:00
parent 0c0c7fd5a4
commit 43f1ae2668
5 changed files with 9 additions and 17 deletions

View file

@ -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"))

View file

@ -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);

View file

@ -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);

View file

@ -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,

View file

@ -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);