1 #ifndef IOSTREAM_RAWLOG_H
2 #define IOSTREAM_RAWLOG_H
3 
4 enum iostream_rawlog_flags {
5 	IOSTREAM_RAWLOG_FLAG_AUTOCLOSE	= 0x01,
6 	IOSTREAM_RAWLOG_FLAG_BUFFERED	= 0x02,
7 	IOSTREAM_RAWLOG_FLAG_TIMESTAMP	= 0x04
8 };
9 
10 /* Create rawlog *.in and *.out files to the given directory. */
11 int ATTR_NOWARN_UNUSED_RESULT
12 iostream_rawlog_create(const char *dir, struct istream **input,
13 		       struct ostream **output);
14 /* Create rawlog prefix.in and prefix.out files. */
15 int ATTR_NOWARN_UNUSED_RESULT
16 iostream_rawlog_create_prefix(const char *prefix, struct istream **input,
17 			      struct ostream **output);
18 /* Create rawlog path, writing both input and output to the same file. */
19 int ATTR_NOWARN_UNUSED_RESULT
20 iostream_rawlog_create_path(const char *path, struct istream **input,
21 			    struct ostream **output);
22 /* Create rawlog that appends to the given rawlog_output.
23    Both input and output are written to the same stream. */
24 void iostream_rawlog_create_from_stream(struct ostream *rawlog_output,
25 					struct istream **input,
26 					struct ostream **output);
27 
28 #endif
29