vfs: check userland buffers before reading them.
[haiku.git] / src / bin / makeudfimage / ExtentStream.h
blob78f102438bfee376a35dccd4e02738c94b4bc4d5
1 //----------------------------------------------------------------------
2 // This software is part of the OpenBeOS distribution and is covered
3 // by the MIT License.
4 //
5 // Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net
6 //----------------------------------------------------------------------
8 /*! \file ExtentStream.h
9 */
11 #ifndef _EXTENT_STREAM_H
12 #define _EXTENT_STREAM_H
14 #include <list>
16 #include "SimulatedStream.h"
17 #include "UdfStructures.h"
19 /*! \brief SimulatedStream implementation that takes a list of
20 block-aligned data extents.
22 class ExtentStream : public SimulatedStream {
23 public:
24 ExtentStream(DataStream &stream, const std::list<Udf::extent_address> &extentList, uint32 blockSize);
26 protected:
27 virtual status_t _GetExtent(off_t pos, size_t size, data_extent &extent);
28 virtual off_t _Size();
30 private:
31 const std::list<Udf::extent_address> &fExtentList;
32 const uint32 fBlockSize;
33 off_t fSize;
36 #endif // _EXTENT_STREAM_H