2008-01-22 22:36:11 -05:00
|
|
|
/*
|
|
|
|
* dload.h
|
|
|
|
*
|
2015-01-21 01:31:20 -05:00
|
|
|
* Copyright (c) 2006-2015 Pacman Development Team <pacman-dev@archlinux.org>
|
2009-07-01 03:08:33 -04:00
|
|
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
2008-01-22 22:36:11 -05:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#ifndef _ALPM_DLOAD_H
|
|
|
|
#define _ALPM_DLOAD_H
|
|
|
|
|
|
|
|
#include "alpm_list.h"
|
|
|
|
#include "alpm.h"
|
|
|
|
|
2011-06-30 22:00:07 -04:00
|
|
|
struct dload_payload {
|
2011-06-28 00:04:00 -04:00
|
|
|
alpm_handle_t *handle;
|
2011-08-19 13:42:53 -04:00
|
|
|
const char *tempfile_openmode;
|
2011-09-28 03:56:36 -04:00
|
|
|
char *remote_name;
|
2011-08-19 11:56:37 -04:00
|
|
|
char *tempfile_name;
|
|
|
|
char *destfile_name;
|
2011-08-19 11:58:45 -04:00
|
|
|
char *content_disp_name;
|
2011-06-24 00:18:01 -04:00
|
|
|
char *fileurl;
|
2014-01-02 13:37:08 -05:00
|
|
|
alpm_list_t *servers;
|
|
|
|
long respcode;
|
2011-08-24 20:48:03 -04:00
|
|
|
off_t initial_size;
|
|
|
|
off_t max_size;
|
2011-09-29 12:17:16 -04:00
|
|
|
off_t prevprogress;
|
2011-06-30 21:19:25 -04:00
|
|
|
int force;
|
|
|
|
int allow_resume;
|
|
|
|
int errors_ok;
|
2011-08-18 14:17:30 -04:00
|
|
|
int unlink_on_fail;
|
2013-09-05 10:08:23 -04:00
|
|
|
int trust_remote_name;
|
2011-10-14 08:38:58 -04:00
|
|
|
#ifdef HAVE_LIBCURL
|
2011-09-28 13:06:36 -04:00
|
|
|
CURLcode curlerr; /* last error produced by curl */
|
2011-10-14 08:38:58 -04:00
|
|
|
#endif
|
2011-06-24 00:18:01 -04:00
|
|
|
};
|
|
|
|
|
2011-09-28 13:58:43 -04:00
|
|
|
void _alpm_dload_payload_reset(struct dload_payload *payload);
|
2011-06-24 00:18:01 -04:00
|
|
|
|
2011-06-30 21:19:25 -04:00
|
|
|
int _alpm_download(struct dload_payload *payload, const char *localpath,
|
2014-10-16 09:36:55 -04:00
|
|
|
char **final_file, const char **final_url);
|
2008-01-22 22:36:11 -05:00
|
|
|
|
|
|
|
#endif /* _ALPM_DLOAD_H */
|
|
|
|
|
2014-01-22 18:06:11 -05:00
|
|
|
/* vim: set noet: */
|