2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2015-01-20 01:36:11 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "sd-event.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
|
2015-01-21 04:03:33 +01:00
|
|
|
#include "import-util.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
#include "macro.h"
|
2015-01-20 01:36:11 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
typedef struct TarPull TarPull;
|
2015-01-20 01:36:11 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
typedef void (*TarPullFinished)(TarPull *pull, int error, void *userdata);
|
2015-01-20 01:36:11 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
int tar_pull_new(TarPull **pull, sd_event *event, const char *image_root, TarPullFinished on_finished, void *userdata);
|
|
|
|
TarPull* tar_pull_unref(TarPull *pull);
|
2015-01-20 01:36:11 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
DEFINE_TRIVIAL_CLEANUP_FUNC(TarPull*, tar_pull_unref);
|
2015-01-20 01:36:11 +01:00
|
|
|
|
2015-09-08 18:25:56 +02:00
|
|
|
int tar_pull_start(TarPull *pull, const char *url, const char *local, bool force_local, ImportVerify verify, bool settings);
|