1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include "sd-event.h"
5 
6 #include "import-util.h"
7 #include "macro.h"
8 #include "pull-common.h"
9 
10 typedef struct TarPull TarPull;
11 
12 typedef void (*TarPullFinished)(TarPull *pull, int error, void *userdata);
13 
14 int tar_pull_new(TarPull **pull, sd_event *event, const char *image_root, TarPullFinished on_finished, void *userdata);
15 TarPull* tar_pull_unref(TarPull *pull);
16 
17 DEFINE_TRIVIAL_CLEANUP_FUNC(TarPull*, tar_pull_unref);
18 
19 int tar_pull_start(TarPull *pull, const char *url, const char *local, PullFlags flags, ImportVerify verify, const char *checksum);
20