| 1 |
/* Declarations of WARC helper methods. */ |
| 2 |
#ifndef WARC_H |
| 3 |
#define WARC_H |
| 4 |
|
| 5 |
#include "host.h" |
| 6 |
|
| 7 |
void warc_init (void); |
| 8 |
void warc_close (void); |
| 9 |
void warc_uuid_str (char *id_str, size_t urn_size); |
| 10 |
|
| 11 |
char * warc_timestamp (char *timestamp, size_t timestamp_size); |
| 12 |
|
| 13 |
FILE * warc_tempfile (void); |
| 14 |
|
| 15 |
bool warc_write_request_record (const char *url, const char *timestamp_str, |
| 16 |
const char *concurrent_to_uuid, const ip_address *ip, FILE *body, off_t payload_offset); |
| 17 |
bool warc_write_response_record (const char *url, const char *timestamp_str, |
| 18 |
const char *concurrent_to_uuid, const ip_address *ip, FILE *body, off_t payload_offset, |
| 19 |
const char *mime_type, int response_code, const char *redirect_location); |
| 20 |
bool warc_write_resource_record (const char *resource_uuid, const char *url, |
| 21 |
const char *timestamp_str, const char *concurrent_to_uuid, const ip_address *ip, |
| 22 |
const char *content_type, FILE *body, off_t payload_offset); |
| 23 |
bool warc_write_metadata_record (const char *record_uuid, const char *url, |
| 24 |
const char *timestamp_str, const char *concurrent_to_uuid, ip_address *ip, |
| 25 |
const char *content_type, FILE *body, off_t payload_offset); |
| 26 |
|
| 27 |
#endif /* WARC_H */ |