]> git.street.me.uk Git - andy/viking.git/blobdiff - src/download.h
Add referer to DownloadOptions
[andy/viking.git] / src / download.h
index 50edc5eb9343218cadc533233bec4d3b0cc639f1..d31776ae63c15aa249455b6ed694926e6bcdadc5 100644 (file)
 
 #ifndef _VIKING_DOWNLOAD_H
 #define _VIKING_DOWNLOAD_H
 
 #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 */
 /* 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
 
 #endif