1//----------------------------------------------------------------------
2//  This software is part of the OpenBeOS distribution and is covered
3//  by the OpenBeOS license.
4//
5//  Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6//----------------------------------------------------------------------
7
8/*! \file ExtentStream.h
9*/
10
11#ifndef _EXTENT_STREAM_H
12#define _EXTENT_STREAM_H
13
14#include <list>
15
16#include "SimulatedStream.h"
17#include "UdfStructures.h"
18
19/*! \brief SimulatedStream implementation that takes a list of
20	block-aligned data extents.
21*/
22class ExtentStream : public SimulatedStream {
23public:
24	ExtentStream(DataStream &stream, const std::list<Udf::extent_address> &extentList, uint32 blockSize);
25
26protected:
27	virtual status_t _GetExtent(off_t pos, size_t size, data_extent &extent);
28	virtual off_t _Size();
29
30private:
31	const std::list<Udf::extent_address> &fExtentList;
32	const uint32 fBlockSize;
33	off_t fSize;
34};
35
36#endif	// _EXTENT_STREAM_H
37