1
#ifndef OSTREAM_INTERNAL_H
2
#define OSTREAM_INTERNAL_H
5
#include "iostream-internal.h"
7
struct ostream_private {
9
struct iostream_private iostream;
12
void (*cork)(struct ostream_private *stream, bool set);
13
int (*flush)(struct ostream_private *stream);
14
void (*flush_pending)(struct ostream_private *stream, bool set);
15
size_t (*get_used_size)(const struct ostream_private *stream);
16
int (*seek)(struct ostream_private *stream, uoff_t offset);
17
ssize_t (*sendv)(struct ostream_private *stream,
18
const struct const_iovec *iov,
19
unsigned int iov_count);
20
int (*write_at)(struct ostream_private *stream,
21
const void *data, size_t size, uoff_t offset);
22
off_t (*send_istream)(struct ostream_private *outstream,
23
struct istream *instream);
26
struct ostream ostream;
27
size_t max_buffer_size;
29
stream_flush_callback_t *callback;
32
unsigned int corked:1;
35
struct ostream *o_stream_create(struct ostream_private *_stream);
37
off_t io_stream_copy(struct ostream *outstream, struct istream *instream,