view src/lib/iostream-internal.h @ 9451:9fff30644260 HEAD

istream-concat: Fixed a lot of bugs.
author Timo Sirainen <tss@iki.fi>
date Mon, 26 Oct 2009 17:06:57 -0400
parents 56a5a00e490c
children
line wrap: on
line source

#ifndef IOSTREAM_INTERNAL_H
#define IOSTREAM_INTERNAL_H

/* This file is private to input stream and output stream implementations */

struct iostream_private {
	int refcount;

	void (*close)(struct iostream_private *stream);
	void (*destroy)(struct iostream_private *stream);
	void (*set_max_buffer_size)(struct iostream_private *stream,
				    size_t max_size);

	void (*destroy_callback)(void *context);
	void *destroy_context;
};

void io_stream_init(struct iostream_private *stream);
void io_stream_ref(struct iostream_private *stream);
void io_stream_unref(struct iostream_private *stream);
void io_stream_close(struct iostream_private *stream);
void io_stream_set_max_buffer_size(struct iostream_private *stream,
				   size_t max_size);

#endif