+
+ /**
+ * If need to authenticate on download
+ * format: 'username:password'
+ */
+ gchar *user_pass;
+
+ /**
+ * File manipulation if necessary such as uncompressing the downloaded file.
+ */
+ VikFileContentConvertFunc convert_file;
+
+} DownloadMapOptions;
+
+typedef struct {
+ /**
+ * Time sent to server on header If-Modified-Since
+ */
+ time_t time_condition;
+ /**
+ * Etag sent by server on previous download
+ */
+ char *etag;
+ /**
+ * Etag sent by server on this download
+ */
+ char *new_etag;
+
+} DownloadFileOptions;
+
+void a_download_init(void);
+
+typedef enum {
+ DOWNLOAD_FILE_WRITE_ERROR = -4, // Can't write downloaded file :(
+ DOWNLOAD_HTTP_ERROR = -2,
+ DOWNLOAD_CONTENT_ERROR = -1,
+ DOWNLOAD_SUCCESS = 0,
+ DOWNLOAD_NOT_REQUIRED = 1, // Also 'successful'. e.g. Because file already exists and no time checks used
+} DownloadResult_t;