summaryrefslogtreecommitdiff
path: root/src/dummy
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2022-04-01 11:32:24 +0200
committerBenjamin Berg <bberg@redhat.com>2022-04-01 18:25:20 +0200
commitbd488facf19d5304796ab4412ba089b00341ead2 (patch)
treec69d04d2cc54331f80f15d7afd021aeae8f74336 /src/dummy
parent77a20b84e445ee9061909af078d38cdb1749fa28 (diff)
downloadupower-bd488facf19d5304796ab4412ba089b00341ead2.tar.gz
device: Move daemon/native object into construct only properties
Rather than this weird situation where they are immediately passed in through the "coldplug" method. Doing this is the first step to make UpDevice into an initable object (removing the "coldplug" method).
Diffstat (limited to 'src/dummy')
-rw-r--r--src/dummy/up-backend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dummy/up-backend.c b/src/dummy/up-backend.c
index 714e687..1aa506e 100644
--- a/src/dummy/up-backend.c
+++ b/src/dummy/up-backend.c
@@ -91,7 +91,7 @@ up_backend_add_cb (UpBackend *backend)
}
/* emit */
- g_signal_emit (backend, signals[SIGNAL_DEVICE_ADDED], 0, backend->priv->native, backend->priv->device);
+ g_signal_emit (backend, signals[SIGNAL_DEVICE_ADDED], 0, backend->priv->device);
/* setup poll */
timer_id = g_timeout_add_seconds (2, (GSourceFunc) up_backend_changed_time_cb, backend);
@@ -202,13 +202,13 @@ up_backend_class_init (UpBackendClass *klass)
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (UpBackendClass, device_added),
NULL, NULL, NULL,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+ G_TYPE_NONE, 1, UP_TYPE_DEVICE);
signals [SIGNAL_DEVICE_REMOVED] =
g_signal_new ("device-removed",
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (UpBackendClass, device_removed),
NULL, NULL, NULL,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+ G_TYPE_NONE, 1, UP_TYPE_DEVICE);
}
/**