2008-01-22 19:36:11 -08:00
|
|
|
/*
|
|
|
|
* dload.h
|
|
|
|
*
|
2011-01-05 20:45:15 -08:00
|
|
|
* Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
|
2009-07-01 00:08:33 -07:00
|
|
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
2008-01-22 19:36:11 -08: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"
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
2011-06-30 19:00:07 -07:00
|
|
|
struct dload_payload {
|
2011-06-27 21:04:00 -07:00
|
|
|
alpm_handle_t *handle;
|
2011-08-19 10:42:53 -07:00
|
|
|
const char *tempfile_openmode;
|
2011-09-28 00:56:36 -07:00
|
|
|
char *remote_name;
|
2011-08-19 08:56:37 -07:00
|
|
|
char *tempfile_name;
|
|
|
|
char *destfile_name;
|
2011-08-19 08:58:45 -07:00
|
|
|
char *content_disp_name;
|
2011-06-23 21:18:01 -07:00
|
|
|
char *fileurl;
|
2011-08-24 17:48:03 -07:00
|
|
|
off_t initial_size;
|
|
|
|
off_t max_size;
|
2011-09-29 09:17:16 -07:00
|
|
|
off_t prevprogress;
|
2011-06-30 18:19:25 -07:00
|
|
|
int force;
|
|
|
|
int allow_resume;
|
|
|
|
int errors_ok;
|
2011-08-18 11:17:30 -07:00
|
|
|
int unlink_on_fail;
|
2011-10-14 05:38:58 -07:00
|
|
|
#ifdef HAVE_LIBCURL
|
2011-09-28 10:06:36 -07:00
|
|
|
CURLcode curlerr; /* last error produced by curl */
|
2011-10-14 05:38:58 -07:00
|
|
|
#endif
|
2011-06-23 21:18:01 -07:00
|
|
|
};
|
|
|
|
|
2011-09-28 10:58:43 -07:00
|
|
|
void _alpm_dload_payload_reset(struct dload_payload *payload);
|
2011-06-23 21:18:01 -07:00
|
|
|
|
2011-06-30 18:19:25 -07:00
|
|
|
int _alpm_download(struct dload_payload *payload, const char *localpath,
|
|
|
|
char **final_file);
|
2008-01-22 19:36:11 -08:00
|
|
|
|
|
|
|
#endif /* _ALPM_DLOAD_H */
|
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|