import-job.h revision ff2670ad11a1a29d483b7a246c95b159ddc1137c
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog This file is part of systemd.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog Copyright 2015 Lennart Poettering
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog systemd is free software; you can redistribute it and/or modify it
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog under the terms of the GNU Lesser General Public License as published by
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog the Free Software Foundation; either version 2.1 of the License, or
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog (at your option) any later version.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog systemd is distributed in the hope that it will be useful, but
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog WITHOUT ANY WARRANTY; without even the implied warranty of
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog Lesser General Public License for more details.
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog You should have received a copy of the GNU Lesser General Public License
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog along with systemd; If not, see <http://www.gnu.org/licenses/>.
996d16975b4d802335188a3be2bbc3635c1287f3Tom Gundersentypedef void (*ImportJobFinished)(ImportJob *job);
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskogtypedef int (*ImportJobOpenDisk)(ImportJob *job);
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskogtypedef int (*ImportJobHeader)(ImportJob*job, const char *header, size_t sz);
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog IMPORT_JOB_ANALYZING, /* Still reading into ->payload, to figure out what we have */
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog IMPORT_JOB_RUNNING, /* Writing to destination */
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog#define IMPORT_JOB_STATE_IS_COMPLETE(j) (IN_SET((j)->state, IMPORT_JOB_DONE, IMPORT_JOB_FAILED))
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskog _IMPORT_JOB_COMPRESSION_INVALID = -1,
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskogint import_job_new(ImportJob **job, const char *url, CurlGlue *glue, void *userdata);
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar LindskogImportJob* import_job_unref(ImportJob *job);
d9bf4f8c6c47b8620ffa1a056208eb15118b78d5Umut Tezduyar Lindskogvoid import_job_curl_on_finished(CurlGlue *g, CURL *curl, CURLcode result);