2017-11-18 17:09:20 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2015-01-20 03:00:07 +01:00
|
|
|
#pragma once
|
|
|
|
|
2014-12-24 16:44:56 +01:00
|
|
|
#include "sd-event.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
|
2015-01-20 16:36:40 +01:00
|
|
|
#include "import-util.h"
|
2015-11-18 22:46:33 +01:00
|
|
|
#include "macro.h"
|
2014-12-24 16:44:56 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
typedef struct RawPull RawPull;
|
2014-12-24 16:44:56 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
typedef void (*RawPullFinished)(RawPull *pull, int error, void *userdata);
|
2014-12-24 16:44:56 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
int raw_pull_new(RawPull **pull, sd_event *event, const char *image_root, RawPullFinished on_finished, void *userdata);
|
|
|
|
RawPull* raw_pull_unref(RawPull *pull);
|
2014-12-24 16:44:56 +01:00
|
|
|
|
2015-03-04 17:07:12 +01:00
|
|
|
DEFINE_TRIVIAL_CLEANUP_FUNC(RawPull*, raw_pull_unref);
|
2014-12-24 16:44:56 +01:00
|
|
|
|
2016-12-20 17:49:35 +01:00
|
|
|
int raw_pull_start(RawPull *pull, const char *url, const char *local, bool force_local, ImportVerify verify, bool settings, bool roothash);
|