## CamelStreamBuffer

CamelStreamBuffer

## Synopsis

    struct              CamelStreamBuffer;
    enum                CamelStreamBufferMode;
    CamelStream*        camel_stream_buffer_new             (CamelStream *stream,
                                                             CamelStreamBufferMode mode);
    CamelStream*        camel_stream_buffer_new_with_vbuf   (CamelStream *stream,
                                                             CamelStreamBufferMode mode,
                                                             char *buf,
                                                             guint32 size);
    int                 camel_stream_buffer_gets            (CamelStreamBuffer *sbf,
                                                             char *buf,
                                                             unsigned int max);
    char*               camel_stream_buffer_read_line       (CamelStreamBuffer *sbf);

## Description

## Details

### struct CamelStreamBuffer

    struct CamelStreamBuffer {
    	CamelStream parent_object;

    	/* these are all of course, private */
    	CamelStream *stream;

    	unsigned char *buf, *ptr, *end;
    	int size;

    	unsigned char *linebuf;	/* for reading lines at a time */
    	int linesize;

    	CamelStreamBufferMode mode;
    	unsigned int flags;	/* internal flags */
    };

### enum CamelStreamBufferMode

    typedef enum {
    	CAMEL_STREAM_BUFFER_BUFFER = 0,
    	CAMEL_STREAM_BUFFER_NONE,
    	CAMEL_STREAM_BUFFER_READ = 0x00,
    	CAMEL_STREAM_BUFFER_WRITE = 0x80,
    	CAMEL_STREAM_BUFFER_MODE = 0x80
    } CamelStreamBufferMode;

### camel_stream_buffer_new ()

    CamelStream*        camel_stream_buffer_new             (CamelStream *stream,
                                                             CamelStreamBufferMode mode);

`stream` : |
`mode` : |
Returns : |

### camel_stream_buffer_new_with_vbuf ()

    CamelStream*        camel_stream_buffer_new_with_vbuf   (CamelStream *stream,
                                                             CamelStreamBufferMode mode,
                                                             char *buf,
                                                             guint32 size);

`stream` : |
`mode` : |
`buf` : |
`size` : |
Returns : |

### camel_stream_buffer_gets ()

    int                 camel_stream_buffer_gets            (CamelStreamBuffer *sbf,
                                                             char *buf,
                                                             unsigned int max);

`sbf` : |
`buf` : |
`max` : |
Returns : |

### camel_stream_buffer_read_line ()

    char*               camel_stream_buffer_read_line       (CamelStreamBuffer *sbf);

`sbf` : |
Returns : |