diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/lib/iostream-rawlog.h | |
parent | Initial commit. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib/iostream-rawlog.h')
-rw-r--r-- | src/lib/iostream-rawlog.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/iostream-rawlog.h b/src/lib/iostream-rawlog.h new file mode 100644 index 0000000..e90f9c0 --- /dev/null +++ b/src/lib/iostream-rawlog.h @@ -0,0 +1,28 @@ +#ifndef IOSTREAM_RAWLOG_H +#define IOSTREAM_RAWLOG_H + +enum iostream_rawlog_flags { + IOSTREAM_RAWLOG_FLAG_AUTOCLOSE = 0x01, + IOSTREAM_RAWLOG_FLAG_BUFFERED = 0x02, + IOSTREAM_RAWLOG_FLAG_TIMESTAMP = 0x04 +}; + +/* Create rawlog *.in and *.out files to the given directory. */ +int ATTR_NOWARN_UNUSED_RESULT +iostream_rawlog_create(const char *dir, struct istream **input, + struct ostream **output); +/* Create rawlog prefix.in and prefix.out files. */ +int ATTR_NOWARN_UNUSED_RESULT +iostream_rawlog_create_prefix(const char *prefix, struct istream **input, + struct ostream **output); +/* Create rawlog path, writing both input and output to the same file. */ +int ATTR_NOWARN_UNUSED_RESULT +iostream_rawlog_create_path(const char *path, struct istream **input, + struct ostream **output); +/* Create rawlog that appends to the given rawlog_output. + Both input and output are written to the same stream. */ +void iostream_rawlog_create_from_stream(struct ostream *rawlog_output, + struct istream **input, + struct ostream **output); + +#endif |