2011-11-05 05:25:00 +08:00
|
|
|
/* Declarations of WARC helper methods. */
|
|
|
|
#ifndef WARC_H
|
|
|
|
#define WARC_H
|
|
|
|
|
|
|
|
#include "host.h"
|
|
|
|
|
2012-05-05 21:24:35 +08:00
|
|
|
void warc_init (void);
|
|
|
|
void warc_close (void);
|
2020-02-13 18:28:14 +08:00
|
|
|
void warc_uuid_str (char *id_str, size_t urn_size);
|
2011-11-05 05:25:00 +08:00
|
|
|
|
2014-11-24 17:41:08 +08:00
|
|
|
char * warc_timestamp (char *timestamp, size_t timestamp_size);
|
|
|
|
|
2012-05-05 21:24:35 +08:00
|
|
|
FILE * warc_tempfile (void);
|
2011-11-05 05:25:00 +08:00
|
|
|
|
2015-04-14 16:57:11 +08:00
|
|
|
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,
|
2012-05-17 03:39:24 +08:00
|
|
|
const char *content_type, FILE *body, off_t payload_offset);
|
2015-04-14 16:57:11 +08:00
|
|
|
bool warc_write_metadata_record (const char *record_uuid, const char *url,
|
2013-04-13 05:37:45 +08:00
|
|
|
const char *timestamp_str, const char *concurrent_to_uuid, ip_address *ip,
|
|
|
|
const char *content_type, FILE *body, off_t payload_offset);
|
2011-11-05 05:25:00 +08:00
|
|
|
|
|
|
|
#endif /* WARC_H */
|