portable: Remove circular header dependencies

This commit is contained in:
Daan De Meyer
2025-04-23 10:33:37 +02:00
parent 5d5eb76557
commit 1fe208e60a
6 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#include "sd-bus.h"
#include "portable.h"
typedef struct PortableChange PortableChange;
extern const sd_bus_vtable manager_vtable[];
+3 -1
View File
@@ -3,8 +3,10 @@
#include "sd-bus.h"
#include "bus-object.h"
#include "discover-image.h"
#include "portabled.h"
typedef struct Manager Manager;
int bus_image_common_get_os_release(Manager *m, sd_bus_message *message, const char *name_or_path, Image *image, sd_bus_error *error);
int bus_image_common_get_metadata(Manager *m, sd_bus_message *message, const char *name_or_path, Image *image, sd_bus_error *error);
+4 -1
View File
@@ -1,9 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-bus.h"
#include "discover-image.h"
#include "hashmap.h"
#include "portabled.h"
typedef struct Manager Manager;
Image *manager_image_cache_get(Manager *m, const char *name_or_path);
+1
View File
@@ -5,6 +5,7 @@
#include "alloc-util.h"
#include "fd-util.h"
#include "log.h"
#include "portabled.h"
#include "portabled-operation.h"
#include "process-util.h"
+1 -2
View File
@@ -8,10 +8,9 @@
#include "list.h"
typedef struct Manager Manager;
typedef struct Operation Operation;
#include "portabled.h"
#define OPERATIONS_MAX 64
struct Operation {
+3 -6
View File
@@ -7,13 +7,10 @@
#include "bus-object.h"
#include "hashmap.h"
#include "list.h"
#include "portabled-operation.h"
#include "runtime-scope.h"
typedef struct Manager Manager;
#include "portabled-operation.h"
struct Manager {
typedef struct Manager {
sd_event *event;
sd_bus *bus;
@@ -26,6 +23,6 @@ struct Manager {
unsigned n_operations;
RuntimeScope runtime_scope; /* for now always RUNTIME_SCOPE_SYSTEM */
};
} Manager;
extern const BusObjectImplementation manager_object;