util/iconv_stream.h

00001 #ifndef _ICONV_STREAM_H_
00002 #define _ICONV_STREAM_H_
00003 
00004 #include <stdio.h>      /* FILE */
00005 #include "iconv.h"      /* iconv_t */
00006 
00007 typedef apr_ssize_t (*iconv_stream_func)(void *d, void *buf, apr_size_t nbytes);
00008 
00009 typedef struct {
00010         apr_iconv_t     cd;
00011         apr_size_t      chars;
00012         apr_size_t      in_bytes;
00013         apr_size_t      out_bytes;
00014         char *          buffer;
00015         char *          buf_ptr;
00016         void *          handle;
00017         iconv_stream_func method;
00018 } iconv_stream;
00019 
00020 iconv_stream *iconv_stream_open(apr_iconv_t cd, void *handle,
00021                                 iconv_stream_func method);
00022 void iconv_stream_close(iconv_stream *stream);
00023 
00024 iconv_stream *iconv_ostream_fopen(apr_iconv_t cd, FILE *handle);
00025 
00026 apr_ssize_t iconv_write(void *stream, const void *buf, apr_size_t nbytes);
00027 apr_ssize_t iconv_bwrite(void *stream, const void *buf, apr_size_t nbytes);
00028 
00029 #endif /*_ICONV_STREAM_H_*/

Generated on Tue Nov 27 09:53:45 2007 for Apache Portable Runtime Iconv Library by  doxygen 1.5.2