BootManagerServiceJob *job);
static void boot_manager_service_forget_job (BootManagerService *service,
const gchar *job_name);
+static void boot_manager_service_cancel_task (gpointer key,
+ GCancellable *cancellable,
+ gpointer user_data);
+static void
+boot_manager_service_cancel_task (gpointer key,
+ GCancellable *cancellable,
+ gpointer user_data)
+{
+ g_cancellable_cancel (cancellable);
+}
+
+
+
BootManagerService *
boot_manager_service_new (GDBusConnection *connection,
SystemdManager *systemd_manager)
systemd_manager_call_list_units (service->systemd_manager, cancellable,
boot_manager_service_list_units_reply, job);
}
+
+void
+boot_manager_service_cancel (BootManagerService *service)
+{
+ g_return_if_fail (BOOT_MANAGER_IS_SERVICE (service));
+
+ /* cancel all listed cancellables */
+ g_hash_table_foreach (service->cancellables,
+ (GHFunc) boot_manager_service_cancel_task, NULL);
+}
void boot_manager_service_list (BootManagerService *service,
GCancellable *cancellable,
BootManagerServiceListCallback list_callback,
- gpointer user_data);
+ gpointer user_data);
+void boot_manager_service_cancel (BootManagerService *service);
G_END_DECLS