X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/85611cd91c81b8218e954597a3aaf5e31bb22bfc..a31889935875a7d1d32c8dae2d6218d7938167f8:/src/download.h?ds=sidebyside diff --git a/src/download.h b/src/download.h index 50edc5eb..d31776ae 100644 --- a/src/download.h +++ b/src/download.h @@ -21,8 +21,21 @@ #ifndef _VIKING_DOWNLOAD_H #define _VIKING_DOWNLOAD_H + +typedef struct { + /** + * Indicates if we should send hostname on the GET request. + * (see http.c) + */ + int sendhostname; + /** + * The REFERER string to use. + * Could be NULL. + */ + gchar *referer; +} DownloadOptions; + /* TODO: convert to Glib */ -int a_http_download_get_url ( const char *hostname, const char *uri, const char *fn ); -int a_http_download_get_url_nohostname ( const char *hostname, const char *uri, const char *fn ); +int a_http_download_get_url ( const char *hostname, const char *uri, const char *fn, DownloadOptions *opt ); #endif