import-dkr.h revision ff2670ad11a1a29d483b7a246c95b159ddc1137c
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer/***
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer This file is part of systemd.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer Copyright 2014 Lennart Poettering
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer systemd is free software; you can redistribute it and/or modify it
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer under the terms of the GNU Lesser General Public License as published by
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer the Free Software Foundation; either version 2.1 of the License, or
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyer (at your option) any later version.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
7c1856aacd4f5d41dc320860490afda18c4a7495Harald Hoyer systemd is distributed in the hope that it will be useful, but
7c1856aacd4f5d41dc320860490afda18c4a7495Harald Hoyer WITHOUT ANY WARRANTY; without even the implied warranty of
7c1856aacd4f5d41dc320860490afda18c4a7495Harald Hoyer MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7c1856aacd4f5d41dc320860490afda18c4a7495Harald Hoyer Lesser General Public License for more details.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer You should have received a copy of the GNU Lesser General Public License
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer along with systemd; If not, see <http://www.gnu.org/licenses/>.
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer***/
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
32d965851d8cbb39f8ee0eeaf76a89e8f5fc174fLennart Poettering#include "sd-event.h"
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer#include "util.h"
32d965851d8cbb39f8ee0eeaf76a89e8f5fc174fLennart Poettering
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyertypedef struct DkrImport DkrImport;
32d965851d8cbb39f8ee0eeaf76a89e8f5fc174fLennart Poettering
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyertypedef void (*DkrImportFinished)(DkrImport *import, int error, void *userdata);
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyer
898720b7e9cf3bdf7a93e435cbed5dd6942ecf9bHarald Hoyerint dkr_import_new(DkrImport **import, sd_event *event, const char *index_url, const char *image_root, DkrImportFinished on_finished, void *userdata);
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald HoyerDkrImport* dkr_import_unref(DkrImport *import);
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyer
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald HoyerDEFINE_TRIVIAL_CLEANUP_FUNC(DkrImport*, dkr_import_unref);
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyer
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyerint dkr_import_pull(DkrImport *import, const char *name, const char *tag, const char *local, bool force_local);
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyer
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyerbool dkr_name_is_valid(const char *name);
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyerbool dkr_id_is_valid(const char *id);
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyer#define dkr_tag_is_valid(tag) filename_is_valid(tag)
d9890f4ed47c0d565915360d8bae3b7a1428f285Harald Hoyer