chiark / gitweb /
import: add new minimal tool "systemd-import" for pulling down foreign containers...
[elogind.git] / src / import / import-dck.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 /***
4   This file is part of systemd.
5
6   Copyright 2014 Lennart Poettering
7
8   systemd is free software; you can redistribute it and/or modify it
9   under the terms of the GNU Lesser General Public License as published by
10   the Free Software Foundation; either version 2.1 of the License, or
11   (at your option) any later version.
12
13   systemd is distributed in the hope that it will be useful, but
14   WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   Lesser General Public License for more details.
17
18   You should have received a copy of the GNU Lesser General Public License
19   along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 ***/
21
22 #include "sd-event.h"
23 #include "util.h"
24
25 typedef struct DckImport DckImport;
26
27 typedef void (*dck_import_on_finished)(DckImport *import, int error, void *userdata);
28
29 int dck_import_new(DckImport **import, sd_event *event, dck_import_on_finished on_finished, void *userdata);
30 DckImport* dck_import_unref(DckImport *import);
31
32 DEFINE_TRIVIAL_CLEANUP_FUNC(DckImport*, dck_import_unref);
33
34 int dck_import_pull(DckImport *import, const char *name, const char *tag, const char *local, bool force_local);
35 int dck_import_cancel(DckImport *import, const char *name);
36
37 bool dck_name_is_valid(const char *name);
38 bool dck_id_is_valid(const char *id);
39 #define dck_tag_is_valid(tag) filename_is_valid(tag)