mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-01 04:59:38 +00:00
Split out daemon startup into two files
The Win32 StartServiceCtrlDispatcher service startup is very different from the usual Linux exec() mechanism. Split out the D-Bus daemon into a new object so we can consume it from a different binary in the future. This looks like a big change but it's 99% just moving code around.
This commit is contained in:
parent
1846b36fb2
commit
d23fd085f8
2299
src/fu-daemon.c
Normal file
2299
src/fu-daemon.c
Normal file
File diff suppressed because it is too large
Load Diff
30
src/fu-daemon.h
Normal file
30
src/fu-daemon.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 Richard Hughes <richard@hughsie.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LGPL-2.1+
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
#define FU_TYPE_DAEMON (fu_daemon_get_type())
|
||||||
|
G_DECLARE_FINAL_TYPE(FuDaemon, fu_daemon, FU, DAEMON, GObject)
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FU_DAEMON_MACHINE_KIND_UNKNOWN,
|
||||||
|
FU_DAEMON_MACHINE_KIND_PHYSICAL,
|
||||||
|
FU_DAEMON_MACHINE_KIND_VIRTUAL,
|
||||||
|
FU_DAEMON_MACHINE_KIND_CONTAINER,
|
||||||
|
} FuDaemonMachineKind;
|
||||||
|
|
||||||
|
FuDaemon *
|
||||||
|
fu_daemon_new(void);
|
||||||
|
gboolean
|
||||||
|
fu_daemon_setup(FuDaemon *self, GError **error);
|
||||||
|
void
|
||||||
|
fu_daemon_start(FuDaemon *self);
|
||||||
|
void
|
||||||
|
fu_daemon_stop(FuDaemon *self);
|
||||||
|
void
|
||||||
|
fu_daemon_set_machine_kind(FuDaemon *self, FuDaemonMachineKind machine_kind);
|
2330
src/fu-main.c
2330
src/fu-main.c
File diff suppressed because it is too large
Load Diff
@ -204,6 +204,7 @@ executable(
|
|||||||
fu_hash,
|
fu_hash,
|
||||||
sources : [
|
sources : [
|
||||||
'fu-main.c',
|
'fu-main.c',
|
||||||
|
'fu-daemon.c',
|
||||||
daemon_src,
|
daemon_src,
|
||||||
],
|
],
|
||||||
include_directories : [
|
include_directories : [
|
||||||
|
Loading…
Reference in New Issue
Block a user