From 3871ebfdd38874fc32e70ee6923ff6a13669d7ce Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Thu, 14 Jun 2012 10:26:55 +0100 Subject: [PATCH] Add stub for implementing BootManager1.Start() This will soon be filled with life, erm, code. --- boot-manager/boot-manager-service.c | 46 +++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/boot-manager/boot-manager-service.c b/boot-manager/boot-manager-service.c index 69233f9..2e41b27 100644 --- a/boot-manager/boot-manager-service.c +++ b/boot-manager/boot-manager-service.c @@ -28,15 +28,19 @@ enum -static void boot_manager_service_finalize (GObject *object); -static void boot_manager_service_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void boot_manager_service_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); +static void boot_manager_service_finalize (GObject *object); +static void boot_manager_service_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void boot_manager_service_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static gboolean boot_manager_service_handle_start (BootManager *interface, + GDBusMethodInvocation *invocation, + const gchar *unit, + BootManagerService *service); @@ -85,6 +89,10 @@ static void boot_manager_service_init (BootManagerService *service) { service->interface = boot_manager_skeleton_new (); + + /* implement the Start() handler */ + g_signal_connect (service->interface, "handle-start", + G_CALLBACK (boot_manager_service_handle_start), service); } @@ -151,6 +159,26 @@ boot_manager_service_set_property (GObject *object, +static gboolean +boot_manager_service_handle_start (BootManager *interface, + GDBusMethodInvocation *invocation, + const gchar *unit, + BootManagerService *service) +{ + g_return_val_if_fail (IS_BOOT_MANAGER (interface), FALSE); + g_return_val_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation), FALSE); + g_return_val_if_fail (unit != NULL, FALSE); + g_return_val_if_fail (BOOT_MANAGER_IS_SERVICE (service), FALSE); + + g_debug ("handle start of %s", unit); + + boot_manager_complete_start (service->interface, invocation, "done"); + + return TRUE; +} + + + BootManagerService * boot_manager_service_new (GDBusConnection *connection) { -- 2.7.4