From 252601302d45036817546c533743e5918b6b86e8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 19:38:31 +0200 Subject: Adding upstream version 1.21.3. Signed-off-by: Daniel Baumann --- src/warc.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/warc.h (limited to 'src/warc.h') diff --git a/src/warc.h b/src/warc.h new file mode 100644 index 0000000..7238cff --- /dev/null +++ b/src/warc.h @@ -0,0 +1,27 @@ +/* Declarations of WARC helper methods. */ +#ifndef WARC_H +#define WARC_H + +#include "host.h" + +void warc_init (void); +void warc_close (void); +void warc_uuid_str (char *id_str, size_t urn_size); + +char * warc_timestamp (char *timestamp, size_t timestamp_size); + +FILE * warc_tempfile (void); + +bool warc_write_request_record (const char *url, const char *timestamp_str, + const char *concurrent_to_uuid, const ip_address *ip, FILE *body, off_t payload_offset); +bool warc_write_response_record (const char *url, const char *timestamp_str, + const char *concurrent_to_uuid, const ip_address *ip, FILE *body, off_t payload_offset, + const char *mime_type, int response_code, const char *redirect_location); +bool warc_write_resource_record (const char *resource_uuid, const char *url, + const char *timestamp_str, const char *concurrent_to_uuid, const ip_address *ip, + const char *content_type, FILE *body, off_t payload_offset); +bool warc_write_metadata_record (const char *record_uuid, const char *url, + const char *timestamp_str, const char *concurrent_to_uuid, ip_address *ip, + const char *content_type, FILE *body, off_t payload_offset); + +#endif /* WARC_H */ -- cgit v1.2.3