CamelNNTPStream
3
CAMEL Library

# CamelNNTPStream

## Synopsis

                        CamelNNTPStream;
    enum                camel_nntp_stream_mode_t;
    CamelStream*        camel_nntp_stream_new               (CamelStream *source);
    void                camel_nntp_stream_set_mode          (CamelNNTPStream *is,
                                                             camel_nntp_stream_mode_t mode);
    int                 camel_nntp_stream_line              (CamelNNTPStream *is,
                                                             unsigned char **data,
                                                             unsigned int *len);
    int                 camel_nntp_stream_gets              (CamelNNTPStream *is,
                                                             unsigned char **start,
                                                             unsigned int *len);
    int                 camel_nntp_stream_getd              (CamelNNTPStream *is,
                                                             unsigned char **start,
                                                             unsigned int *len);

## Description

## Details

### CamelNNTPStream

    typedef struct {
    	CamelStream parent;

    	CamelStream *source;

    	camel_nntp_stream_mode_t mode;
    	int state;

    	unsigned char *buf, *ptr, *end;
    	unsigned char *linebuf, *lineptr, *lineend;
    } CamelNNTPStream;

### enum camel_nntp_stream_mode_t

    typedef enum {
    	CAMEL_NNTP_STREAM_LINE,
    	CAMEL_NNTP_STREAM_DATA,
    	CAMEL_NNTP_STREAM_EOD,	/* end of data, acts as if end of stream */
    } camel_nntp_stream_mode_t;

### camel_nntp_stream_new ()

    CamelStream*        camel_nntp_stream_new               (CamelStream *source);

Returns a NULL stream. A null stream is always at eof, and always returns success for all reads and writes.

`source` :

Returns :

  the stream

### camel_nntp_stream_set_mode ()

    void                camel_nntp_stream_set_mode          (CamelNNTPStream *is,
                                                             camel_nntp_stream_mode_t mode);

`is` :

`mode` :

### camel_nntp_stream_line ()

    int                 camel_nntp_stream_line              (CamelNNTPStream *is,
                                                             unsigned char **data,
                                                             unsigned int *len);

`is` :

`data` :

`len` :

Returns :

### camel_nntp_stream_gets ()

    int                 camel_nntp_stream_gets              (CamelNNTPStream *is,
                                                             unsigned char **start,
                                                             unsigned int *len);

`is` :

`start` :

`len` :

Returns :

### camel_nntp_stream_getd ()

    int                 camel_nntp_stream_getd              (CamelNNTPStream *is,
                                                             unsigned char **start,
                                                             unsigned int *len);

`is` :

`start` :

`len` :

Returns :