libalpm
Arch Linux Package Manager Library
|
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <curl/curl.h>
#include "dload.h"
#include "alpm_list.h"
#include "alpm.h"
#include "log.h"
#include "util.h"
#include "handle.h"
Go to the source code of this file.
Defines | |
#define | HOSTNAME_SIZE 256 |
Enumerations | |
enum | { ABORT_SIGINT = 1, ABORT_OVER_MAXFILESIZE } |
Functions | |
int | _alpm_download (struct dload_payload *payload, const char *localpath, char **final_file) |
Download a file given by a URL to a local directory. | |
char * | alpm_fetch_pkgurl (alpm_handle_t *handle, const char *url) |
Fetch a remote pkg. | |
void | _alpm_dload_payload_reset (struct dload_payload *payload) |
#define HOSTNAME_SIZE 256 |
anonymous enum |
void _alpm_dload_payload_reset | ( | struct dload_payload * | payload | ) |
Definition at line 627 of file dload.c.
References ASSERT, dload_payload::content_disp_name, dload_payload::destfile_name, dload_payload::fileurl, FREE, dload_payload::remote_name, and dload_payload::tempfile_name.
Referenced by alpm_db_update(), and alpm_fetch_pkgurl().
int _alpm_download | ( | struct dload_payload * | payload, |
const char * | localpath, | ||
char ** | final_file | ||
) |
Download a file given by a URL to a local directory.
Does not overwrite an existing file if the download fails.
payload | the payload context |
localpath | the directory to save the file in |
final_file | the real name of the downloaded file (may be NULL) |
Definition at line 541 of file dload.c.
References ALPM_ERR_EXTERNAL_DOWNLOAD, dload_payload::errors_ok, __alpm_handle_t::fetchcb, dload_payload::fileurl, dload_payload::force, dload_payload::handle, and RET_ERR.
Referenced by alpm_db_update(), and alpm_fetch_pkgurl().