]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pull: introduce pull-forward.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 3 Jul 2026 11:28:34 +0000 (20:28 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 3 Jul 2026 12:49:02 +0000 (21:49 +0900)
src/import/pull-common.h
src/import/pull-forward.h [new file with mode: 0644]
src/import/pull-job.c
src/import/pull-job.h
src/import/pull-oci.c
src/import/pull-oci.h
src/import/pull-raw.h
src/import/pull-tar.h

index e4c0d365309d0d671bb4a43d72fa9bd1244b70b1..f38d4f1bae7d46365ea4fbab175e81e00f1377e8 100644 (file)
@@ -1,13 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "shared-forward.h"
 #include "import-common.h"
 #include "import-util.h"
-#include "pull-job.h"
-
-typedef struct CurlGlue CurlGlue;
-typedef struct PullJob PullJob;
+#include "pull-forward.h"
 
 int pull_find_old_etags(
                 const char *url,
diff --git a/src/import/pull-forward.h b/src/import/pull-forward.h
new file mode 100644 (file)
index 0000000..39ed172
--- /dev/null
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "shared-forward.h"
+
+typedef enum PullJobState PullJobState;
+
+typedef struct PullJob PullJob;
+
+typedef struct OciPull OciPull;
+typedef struct RawPull RawPull;
+typedef struct TarPull TarPull;
+
+typedef void (*PullJobFinished)(PullJob *job);
+typedef int (*PullJobOpenDisk)(PullJob *job);
+typedef int (*PullJobHeader)(PullJob *job, const char *header, size_t sz);
+typedef void (*PullJobProgress)(PullJob *job);
+typedef int (*PullJobNotFound)(PullJob *job, char **ret_new_url);
+
+typedef void (*OciPullFinished)(OciPull *pull, int error, void *userdata);
+typedef void (*RawPullFinished)(RawPull *p, int error, void *userdata);
+typedef void (*TarPullFinished)(TarPull *p, int error, void *userdata);
index 7d83c994ff50a35f3746de84296563468f6a537f..119bb7528617d58ed4e1bb4ea908f179e7e828cd 100644 (file)
@@ -15,7 +15,6 @@
 #include "io-util.h"
 #include "log.h"
 #include "parse-util.h"
-#include "pull-common.h"
 #include "pull-job.h"
 #include "string-util.h"
 #include "strv.h"
index 00d001680ff203ca4757898e752c68e8a3db762a..2314cc24529168aa1b63eee6f199524eea6f6798 100644 (file)
@@ -1,19 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <curl/curl.h>
 #include <sys/stat.h>
 #include <sys/uio.h>
 
-#include "shared-forward.h"
-
-typedef struct PullJob PullJob;
-
-typedef void (*PullJobFinished)(PullJob *job);
-typedef int (*PullJobOpenDisk)(PullJob *job);
-typedef int (*PullJobHeader)(PullJob *job, const char *header, size_t sz);
-typedef void (*PullJobProgress)(PullJob *job);
-typedef int (*PullJobNotFound)(PullJob *job, char **ret_new_url);
+#include "pull-forward.h"
 
 typedef enum PullJobState {
         PULL_JOB_INIT,
index b6fa71c902965839c28c5a6a48ec52052f3f3e33..a9019f19a51c0ec49a2fa4c4d0d7fb302f1f3713 100644 (file)
@@ -28,6 +28,7 @@
 #include "pidref.h"
 #include "process-util.h"
 #include "pull-common.h"
+#include "pull-job.h"
 #include "pull-oci.h"
 #include "rm-rf.h"
 #include "set.h"
index 86a37c33ec2104a04783f9ca1d0b668877c55185..4cf02b97e9189100227d5c59fa2d8ded29111ae0 100644 (file)
@@ -1,12 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "shared-forward.h"
 #include "import-common.h"
-
-typedef struct OciPull OciPull;
-
-typedef void (*OciPullFinished)(OciPull *pull, int error, void *userdata);
+#include "pull-forward.h"
 
 int oci_pull_new(OciPull **ret, sd_event *event, const char *image_root, OciPullFinished on_finished, void *userdata);
 OciPull* oci_pull_unref(OciPull *i);
index d927d927f89aaf3521ba68cf98d48c16c919eca7..d28ec644ebefdcab84dea1abcff883301bc193f7 100644 (file)
@@ -1,13 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "shared-forward.h"
 #include "import-common.h"
 #include "import-util.h"
-
-typedef struct RawPull RawPull;
-
-typedef void (*RawPullFinished)(RawPull *p, int error, void *userdata);
+#include "pull-forward.h"
 
 int raw_pull_new(RawPull **ret, sd_event *event, const char *image_root, RawPullFinished on_finished, void *userdata);
 RawPull* raw_pull_unref(RawPull *p);
index 39a9eacb35295a6864e78d54803ad4321cc03505..bcb998b82d08fb0434181693c3b9b2d4916efcfc 100644 (file)
@@ -1,13 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "shared-forward.h"
 #include "import-common.h"
 #include "import-util.h"
-
-typedef struct TarPull TarPull;
-
-typedef void (*TarPullFinished)(TarPull *p, int error, void *userdata);
+#include "pull-forward.h"
 
 int tar_pull_new(TarPull **ret, sd_event *event, const char *image_root, TarPullFinished on_finished, void *userdata);
 TarPull* tar_pull_unref(TarPull *p);