## CamelSeekableStream

CamelSeekableStream

## Synopsis

    struct              CamelSeekableStream;
    enum                CamelStreamSeekPolicy;
    #define             CAMEL_STREAM_UNBOUND
    off_t               camel_seekable_stream_seek          (CamelSeekableStream *stream,
                                                             off_t offset,
                                                             CamelStreamSeekPolicy policy);
    off_t               camel_seekable_stream_tell          (CamelSeekableStream *stream);
    int                 camel_seekable_stream_set_bounds    (CamelSeekableStream *stream,
                                                             off_t start,
                                                             off_t end);

## Description

## Details

### struct CamelSeekableStream

    struct CamelSeekableStream {
    	CamelStream parent_object;

    	off_t position;		/* current postion in the stream */
    	off_t bound_start;	/* first valid position */
    	off_t bound_end;	/* first invalid position */
    };

### enum CamelStreamSeekPolicy

    typedef enum {
    	CAMEL_STREAM_SET = SEEK_SET,
    	CAMEL_STREAM_CUR = SEEK_CUR,
    	CAMEL_STREAM_END = SEEK_END
    } CamelStreamSeekPolicy;

### CAMEL_STREAM_UNBOUND

    #define CAMEL_STREAM_UNBOUND (~0)

### camel_seekable_stream_seek ()

    off_t               camel_seekable_stream_seek          (CamelSeekableStream *stream,
                                                             off_t offset,
                                                             CamelStreamSeekPolicy policy);

`stream` : |
`offset` : |
`policy` : |
Returns : |

### camel_seekable_stream_tell ()

    off_t               camel_seekable_stream_tell          (CamelSeekableStream *stream);

`stream` : |
Returns : |

### camel_seekable_stream_set_bounds ()

    int                 camel_seekable_stream_set_bounds    (CamelSeekableStream *stream,
                                                             off_t start,
                                                             off_t end);

`stream` : |
`start` : |
`end` : |
Returns : |