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 EmbeddedStream.h 9*/ 10 11#ifndef _EMBEDDED_STREAM_H 12#define _EMBEDDED_STREAM_H 13 14#include "SimulatedStream.h" 15 16/*! \brief SimulatedStream implementation that takes a single, 17 not-neccessarily-block-aligned extent. 18*/ 19class EmbeddedStream : public SimulatedStream { 20public: 21 EmbeddedStream(DataStream &stream, off_t offset, size_t size); 22 23protected: 24 virtual status_t _GetExtent(off_t pos, size_t size, data_extent &extent); 25 virtual off_t _Size(); 26 27private: 28 off_t fOffset; 29 size_t fSize; 30}; 31 32#endif // _EMBEDDED_STREAM_H 33