diff options
Diffstat (limited to 'src/import/import-job.h')
-rw-r--r-- | src/import/import-job.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/import/import-job.h b/src/import/import-job.h index 843daa217c..9ccaaf2c04 100644 --- a/src/import/import-job.h +++ b/src/import/import-job.h @@ -23,6 +23,7 @@ #include <lzma.h> #include <zlib.h> +#include <gcrypt.h> #include "macro.h" #include "curl-util.h" @@ -42,6 +43,8 @@ typedef enum ImportJobState { _IMPORT_JOB_STATE_INVALID = -1, } ImportJobState; +#define IMPORT_JOB_STATE_IS_COMPLETE(j) (IN_SET((j)->state, IMPORT_JOB_DONE, IMPORT_JOB_FAILED)) + typedef enum ImportJobCompression { IMPORT_JOB_UNCOMPRESSED, IMPORT_JOB_XZ, @@ -66,6 +69,7 @@ struct ImportJob { char *etag; char **old_etags; + bool etag_exists; uint64_t content_length; uint64_t written_compressed; @@ -91,6 +95,11 @@ struct ImportJob { usec_t last_status_usec; bool allow_sparse; + + bool calc_hash; + gcry_md_hd_t hash_context; + + char *sha256; }; int import_job_new(ImportJob **job, const char *url, CurlGlue *glue, void *userdata); |