/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "hash-funcs.h"
-#include "macro.h"
-#include "sysupdate-transfer.h"
+#include "memory-util.h"
typedef struct Feature {
unsigned n_ref;
#include "fs-util.h"
#include "time-util.h"
-typedef struct InstanceMetadata InstanceMetadata;
-typedef struct Instance Instance;
-
-#include "sysupdate-resource.h"
#include "sysupdate-partition.h"
-struct InstanceMetadata {
+typedef struct Resource Resource;
+typedef struct Instance Instance;
+
+typedef struct InstanceMetadata {
/* Various bits of metadata for each instance, that is either derived from the filename/GPT label or
* from metadata of the file/partition itself */
char *version;
int growfs;
uint8_t sha256sum[32]; /* SHA256 sum of the download (i.e. compressed) file */
bool sha256sum_set;
-};
+} InstanceMetadata;
#define INSTANCE_METADATA_NULL \
{ \
#include "path-util.h"
#include "stdio-util.h"
#include "string-util.h"
+#include "sysupdate-instance.h"
#include "sysupdate-pattern.h"
typedef enum PatternElementType {
#include <stdbool.h>
-#include "sysupdate-instance.h"
#include "time-util.h"
+typedef struct InstanceMetadata InstanceMetadata;
+
enum {
PATTERN_MATCH_NO,
PATTERN_MATCH_YES,
#include "hashmap.h"
#include "macro.h"
-/* Forward declare this type so that the headers below can use it */
typedef struct Resource Resource;
-
-#include "sysupdate-instance.h"
+typedef struct Instance Instance;
typedef enum ResourceType {
RESOURCE_URL_FILE,
#include "sync-util.h"
#include "sysupdate.h"
#include "sysupdate-feature.h"
+#include "sysupdate-instance.h"
#include "sysupdate-pattern.h"
#include "sysupdate-resource.h"
#include "sysupdate-transfer.h"
#include "sd-id128.h"
-/* Forward declare this type so that the headers below can use it */
-typedef struct Transfer Transfer;
-
#include "sysupdate-partition.h"
#include "sysupdate-resource.h"
-#include "sysupdate.h"
-struct Transfer {
+typedef struct Context Context;
+
+typedef struct Transfer {
char *id;
char *min_version;
PartitionChange partition_change;
Context *context;
-};
+} Transfer;
typedef int (*TransferProgress)(const Transfer *t, const Instance *inst, unsigned percentage);
#include <stdbool.h>
#include <sys/types.h>
-typedef struct UpdateSet UpdateSet;
-
-#include "sysupdate-instance.h"
#include "sysupdate-update-set-flags.h"
+typedef struct Instance Instance;
+typedef struct UpdateSet UpdateSet;
+
struct UpdateSet {
UpdateSetFlags flags;
char *version;
#include "strv.h"
#include "sysupdate.h"
#include "sysupdate-feature.h"
+#include "sysupdate-instance.h"
#include "sysupdate-transfer.h"
#include "sysupdate-update-set.h"
#include "sysupdate-util.h"