import-gpt.h revision 087682d103e08670963686d9b1bc1d35c412a63f
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers/***
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers This file is part of systemd.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers Copyright 2014 Lennart Poettering
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers systemd is free software; you can redistribute it and/or modify it
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers under the terms of the GNU Lesser General Public License as published by
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers the Free Software Foundation; either version 2.1 of the License, or
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers (at your option) any later version.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers systemd is distributed in the hope that it will be useful, but
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers WITHOUT ANY WARRANTY; without even the implied warranty of
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers Lesser General Public License for more details.
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers You should have received a copy of the GNU Lesser General Public License
a660c63c551b88136ac6176855b5907cc533e848Kay Sievers along with systemd; If not, see <http://www.gnu.org/licenses/>.
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers***/
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay Sievers
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers#include "sd-event.h"
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers#include "util.h"
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sieverstypedef struct GptImport GptImport;
472780d8b1ec3f3f4ff78eb21a013136e5aa1cfeKay Sievers
25da63b9dac8f166ebf390ca92d1de18fbfc9d11Kay Sieverstypedef void (*gpt_import_on_finished)(GptImport *import, int error, void *userdata);
25da63b9dac8f166ebf390ca92d1de18fbfc9d11Kay Sievers
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay Sieversint gpt_import_new(GptImport **import, sd_event *event, const char *image_root, gpt_import_on_finished on_finished, void *userdata);
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversGptImport* gpt_import_unref(GptImport *import);
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay Sievers
0035597a30d120f70df2dd7da3d6128fb8ba6051Kay SieversDEFINE_TRIVIAL_CLEANUP_FUNC(GptImport*, gpt_import_unref);
d23965a64eb5c2c97b839dc2e3e79fc1613994f1Kay Sievers
ad37f393fa97f4274cc3bf97a0d8c388a429037eKay Sieversint gpt_import_pull(GptImport *import, const char *url, const char *local, bool force_local);
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sieversint gpt_import_cancel(GptImport *import, const char *name);
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sievers
1328f66ad16b5afeb5684858c27e121a46c1959eKay Sieversbool gpt_url_is_valid(const char *url);
214daa72cb0c72ea78d1eccd5ffe630a1e04b2f7Sean McGovern