Lines Matching defs:ostream
7 /* All of the istream was successfully sent to ostream. */
11 /* Caller needs to wait for output to non-blocking ostream.
16 /* Write to ostream failed. See ostream->stream_errno. */
20 struct ostream {
23 ostream this is counting the uncompressed bytes. The compressed
24 bytes could be counted from the parent ostream's offset.
37 ostream code. */
54 struct ostream *o_stream_create_fd(int fd, size_t max_buffer_size);
56 struct ostream *o_stream_create_fd_autoclose(int *fd, size_t max_buffer_size);
59 struct ostream *
61 struct ostream *o_stream_create_fd_file_autoclose(int *fd, uoff_t offset);
63 struct ostream *o_stream_create_buffer(buffer_t *buf);
65 struct ostream *o_stream_create_error(int stream_errno);
66 struct ostream *
71 struct ostream *o_stream_create_passthrough(struct ostream *output);
74 void o_stream_set_name(struct ostream *stream, const char *name);
76 const char *o_stream_get_name(struct ostream *stream);
79 int o_stream_get_fd(struct ostream *stream);
81 const char *o_stream_get_error(struct ostream *stream);
84 void o_stream_destroy(struct ostream **stream);
87 void o_stream_ref(struct ostream *stream);
89 void o_stream_unref(struct ostream **stream);
91 void o_stream_add_destroy_callback(struct ostream *stream,
99 void o_stream_remove_destroy_callback(struct ostream *stream,
104 o_stream_finish() must be used before the stream is closed. When ostream
107 Closing the ostream (also via destroy) will first flush the ostream, and
110 void o_stream_close(struct ostream *stream);
114 void o_stream_set_flush_callback(struct ostream *stream,
121 void o_stream_unset_flush_callback(struct ostream *stream);
123 void o_stream_set_max_buffer_size(struct ostream *stream, size_t max_size);
125 size_t o_stream_get_max_buffer_size(struct ostream *stream);
129 void o_stream_cork(struct ostream *stream);
133 void o_stream_uncork(struct ostream *stream);
134 bool o_stream_is_corked(struct ostream *stream);
138 int o_stream_flush(struct ostream *stream);
140 static inline int o_stream_uncork_flush(struct ostream *stream)
148 void o_stream_set_flush_pending(struct ostream *stream, bool set);
150 size_t o_stream_get_buffer_used_size(const struct ostream *stream) ATTR_PURE;
152 size_t o_stream_get_buffer_avail_size(const struct ostream *stream) ATTR_PURE;
156 int o_stream_seek(struct ostream *stream, uoff_t offset);
158 ssize_t o_stream_send(struct ostream *stream, const void *data, size_t size);
159 ssize_t o_stream_sendv(struct ostream *stream, const struct const_iovec *iov,
161 ssize_t o_stream_send_str(struct ostream *stream, const char *str);
167 void o_stream_nsend(struct ostream *stream, const void *data, size_t size);
168 void o_stream_nsendv(struct ostream *stream, const struct const_iovec *iov,
170 void o_stream_nsend_str(struct ostream *stream, const char *str);
171 /* Mark the ostream as finished and flush it. If the ostream has a footer,
172 it's written here. Any further write attempts to the ostream will
175 int o_stream_finish(struct ostream *stream);
178 void o_stream_set_finish_also_parent(struct ostream *stream, bool set);
181 void o_stream_set_finish_via_child(struct ostream *stream, bool set);
184 void o_stream_ignore_last_errors(struct ostream *stream);
185 /* Abort writing to the ostream, also marking any previous error handling as
188 void o_stream_abort(struct ostream *stream);
193 void o_stream_set_no_error_handling(struct ostream *stream, bool set);
204 o_stream_send_istream(struct ostream *outstream, struct istream *instream);
208 void o_stream_nsend_istream(struct ostream *outstream, struct istream *instream);
211 int o_stream_pwrite(struct ostream *stream, const void *data, size_t size,
215 ostream's internal buffers (no guarantees that anything was sent further).
217 void o_stream_get_last_write_time(struct ostream *stream, struct timeval *tv_r);
221 void o_stream_switch_ioloop_to(struct ostream *stream, struct ioloop *ioloop);
222 void o_stream_switch_ioloop(struct ostream *stream);