os/persistentdata/persistentstorage/store/INC/S32BUF.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/store/INC/S32BUF.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,511 @@
     1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#if !defined(__S32BUF_H__)
    1.20 +#define __S32BUF_H__
    1.21 +#if !defined(__E32STD_H__)
    1.22 +#include <e32std.h>
    1.23 +#endif
    1.24 +
    1.25 +/** Defines the type of location within a stream on which the calculation 
    1.26 +of a new seek position is based.
    1.27 +
    1.28 +The type is used by the stream buffer SeekL() functions.
    1.29 +
    1.30 +@see MStreamBuf::SeekL() */
    1.31 +enum TStreamLocation 
    1.32 +	/** The seek position is calculated relative to the beginning of the 
    1.33 +	stream.*/
    1.34 +	{EStreamBeginning,
    1.35 +	/** The seek position is calculated relative to the end of the stream.*/
    1.36 +	EStreamMark,
    1.37 +	/** The seek position is calculated relative to the existing read or 
    1.38 +	write mark in the stream. */
    1.39 +	EStreamEnd};
    1.40 +
    1.41 +/**
    1.42 + * @publishedAll 
    1.43 + * @released
    1.44 + * Holds the position of the read or write mark within a seekable stream.
    1.45 +
    1.46 +Position is the offset from the beginning of a seekable stream. The class 
    1.47 +provides convenient operators for performing arithmetic on the offset value 
    1.48 +and for doing comparisons between stream position objects.
    1.49 +
    1.50 +It can be considered as an absolute stream position.
    1.51 +
    1.52 +Objects of this type are usually created as a result of calling 
    1.53 +MStreamBuf::SeekL() or MStreamBuf::TellL(); they allow a program to remember 
    1.54 +the current read position in a stream buffer and reset it to the same 
    1.55 +location later.
    1.56 +
    1.57 +@see MStreamBuf::SeekL()
    1.58 +@see MStreamBuf::TellL()  
    1.59 +*/
    1.60 +class TStreamPos
    1.61 +	{
    1.62 +public:
    1.63 +	/** Constructs an empty stream position object. */
    1.64 +	TStreamPos() {}
    1.65 +	inline TStreamPos(TInt anOffset);
    1.66 +//
    1.67 +	inline TBool operator==(TStreamPos aPos) const;
    1.68 +	inline TBool operator!=(TStreamPos aPos) const;
    1.69 +	inline TBool operator<(TStreamPos aPos) const;
    1.70 +	inline TBool operator<=(TStreamPos aPos) const;
    1.71 +	inline TBool operator>(TStreamPos aPos) const;
    1.72 +	inline TBool operator>=(TStreamPos aPos) const;
    1.73 +//
    1.74 +	inline TInt operator-(TStreamPos aPos) const;
    1.75 +	inline TStreamPos operator+(TInt anOffset) const;
    1.76 +	inline TStreamPos operator-(TInt anOffset) const;
    1.77 +//
    1.78 +	inline TStreamPos& operator+=(TInt anOffset);
    1.79 +	inline TStreamPos& operator-=(TInt anOffset);
    1.80 +//
    1.81 +	inline TInt Offset() const;
    1.82 +private:
    1.83 +	TInt iOff;
    1.84 +	};
    1.85 +inline TStreamPos operator+(TInt anOffset,TStreamPos aPos);
    1.86 +#if defined(__NO_CLASS_CONSTS__)
    1.87 +/** Constructs a TStreamPos object that denotes the beginning of any seekable 
    1.88 +stream.
    1.89 +
    1.90 +@see TStreamPos */
    1.91 +#define KStreamBeginning TStreamPos(0)
    1.92 +#else
    1.93 +const TStreamPos KStreamBeginning=TStreamPos(0);
    1.94 +#endif
    1.95 +
    1.96 +/**
    1.97 + * @publishedAll 
    1.98 + * @released
    1.99 + * Stream transfer object.
   1.100 +
   1.101 +Holds and maintains a value that represents how much data is to be transferred, 
   1.102 +or remains to be transferred, between streams.
   1.103 +
   1.104 +Objects of this type are used by ReadL() and WriteL() functions of MStreamBuf.
   1.105 +
   1.106 +@see MStreamBuf
   1.107 +@see TStreamBuf
   1.108 +@see TStreamMark
   1.109 +@see TStreamExchange
   1.110 +@see RShareBuf  
   1.111 +*/
   1.112 +class TStreamTransfer
   1.113 +	{
   1.114 +public:
   1.115 +	/** An enumerator type passed to a constructor of this class to indicate 
   1.116 +	that there is no explicit limit to the amount of data that can be 
   1.117 +	transferred between streams. The enumeration is not used. */
   1.118 +	enum TUnlimited {EUnlimited};
   1.119 +public:
   1.120 +	/** Constructs a stream transfer object specifying that there is no 
   1.121 +	explicit limit to the amount of data that can be transferred between 
   1.122 +	streams.
   1.123 +	
   1.124 +	The amount of data to be transferred is only limited by the streams 
   1.125 +	themselves.
   1.126 +	
   1.127 +	The arithmetical operators do not change the state of an unlimited stream 
   1.128 +	transfer object. */
   1.129 +	TStreamTransfer() {}
   1.130 +	inline TStreamTransfer(TInt aMaxLength);
   1.131 +	inline TStreamTransfer(TUnlimited);
   1.132 +//
   1.133 +	inline TBool operator==(TInt aLength) const;
   1.134 +	inline TBool operator>(TInt aLength) const;
   1.135 +	inline TStreamTransfer operator-(TInt aLength) const;
   1.136 +	inline TInt operator[](TInt aMaxLength) const;
   1.137 +//
   1.138 +	inline TStreamTransfer& operator-=(TInt aLength);
   1.139 +//
   1.140 +	inline TInt Left() const;
   1.141 +private:
   1.142 +	TInt iVal;
   1.143 +private:
   1.144 +	IMPORT_C static void __DbgChkNonNegative(TInt aLength);
   1.145 +	};
   1.146 +inline TBool operator==(TInt aLength,TStreamTransfer aTransfer);
   1.147 +inline TBool operator<(TInt aLength,TStreamTransfer aTransfer);
   1.148 +#if defined(__NO_CLASS_CONSTS__)
   1.149 +/** Constructs a TStreamTransfer object indicating that no explicit limit is 
   1.150 +imposed on transfers between streams.
   1.151 +
   1.152 +@see TStreamTransfer
   1.153 +@see MStreamBuf::ReadL()
   1.154 +@see MStreamBuf::WriteL() */
   1.155 +#define KStreamUnlimited TStreamTransfer(TStreamTransfer::EUnlimited)
   1.156 +#else
   1.157 +const TStreamTransfer KStreamUnlimited=TStreamTransfer::EUnlimited;
   1.158 +#endif
   1.159 +//
   1.160 +class MStreamInput;
   1.161 +class MStreamOutput;
   1.162 +
   1.163 +/**
   1.164 + * @publishedAll 
   1.165 + * @released
   1.166 + * A stream buffer that provides a generic I/O interface for streamed data.
   1.167 +
   1.168 +A stream buffer:
   1.169 +
   1.170 +may be buffered or unbuffered
   1.171 +
   1.172 +may provide read-only, write-only or read/write capability
   1.173 +
   1.174 +may be seekable, or unseekable.
   1.175 +
   1.176 +A seekable stream buffer maintains independent read and write pointers, which 
   1.177 +can be manipulated separately. This is unlike the RFile interface which 
   1.178 +maintains a single current position in the file. For example, file streams 
   1.179 +and memory streams are seekable streams, but socket, serial-comms, and filtered 
   1.180 +streams are not.
   1.181 +
   1.182 +Objects of this type are used by the stream interface classes derived from 
   1.183 +RReadStream and RWriteStream.
   1.184 +
   1.185 +The class has no member data.
   1.186 +
   1.187 +Derive from this class, if the stream has no intermediate buffering 
   1.188 +capabilities, otherwise derive from TStreamBuf.
   1.189 +
   1.190 +Get a reference to the stream buffer used by a read stream by calling 
   1.191 +RReadStream::Source(). Get a reference to the stream buffer used by a write 
   1.192 +stream by calling RWriteStream::Sink()
   1.193 +
   1.194 +@see RReadStream
   1.195 +@see RWriteStream
   1.196 +@see TStreamBuf 
   1.197 +*/
   1.198 +class MStreamBuf
   1.199 +	{
   1.200 +public:
   1.201 +	/** Indicates that an operation applies to the read mark in a stream or to 
   1.202 +	the read area in an stream buffer. */
   1.203 +	enum TRead {ERead=0x01};
   1.204 +
   1.205 +	/** Indicates that an operation applies to the write mark in a stream or 
   1.206 +	to the write area in an stream buffer. */
   1.207 +	enum TWrite {EWrite=0x02};
   1.208 +
   1.209 +	/** Used to identify the type of mark in a stream.
   1.210 +
   1.211 +	The type is used by functions of this class and derived classes that perform 
   1.212 +	seek operations to marks within a stream.
   1.213 +
   1.214 +	The type uses the ERead and EWrite enumeration values, as bit flags, to 
   1.215 +	identify the read and write marks respectively.
   1.216 +
   1.217 +	ERead is an MStreamBuf::TRead enumerator. EWrite is an MStreamBuf::EWrite 
   1.218 +	enumerator.
   1.219 +
   1.220 +	@see MStreamBuf::TRead
   1.221 +	@see MStreamBuf::TWrite */
   1.222 +	typedef TInt TMark;
   1.223 +public:
   1.224 +	IMPORT_C void Close();
   1.225 +	inline void Release();
   1.226 +	IMPORT_C TInt Synch();
   1.227 +	inline void SynchL();
   1.228 +//
   1.229 +	IMPORT_C void PushL();
   1.230 +//
   1.231 +	inline TInt ReadL(TAny* aPtr,TInt aMaxLength);
   1.232 +	IMPORT_C TInt Read(TDes8& aDes,TRequestStatus& aStatus);
   1.233 +	IMPORT_C TInt Read(TDes8& aDes,TInt aMaxLength,TRequestStatus& aStatus);
   1.234 +	IMPORT_C TInt ReadL(TDes8& aDes,TRequestStatus& aStatus);
   1.235 +	inline TInt ReadL(TDes8& aDes,TInt aMaxLength,TRequestStatus& aStatus);
   1.236 +	inline TStreamTransfer ReadL(MStreamInput& anInput,TStreamTransfer aTransfer);
   1.237 +	IMPORT_C TInt ReadL(MStreamInput& anInput,TInt aMaxLength);
   1.238 +	inline void ReadL(MStreamInput& anInput);
   1.239 +//
   1.240 +	inline void WriteL(const TAny* aPtr,TInt aLength);
   1.241 +	IMPORT_C TInt Write(const TDesC8& aDes,TRequestStatus& aStatus);
   1.242 +	IMPORT_C TInt Write(const TDesC8& aDes,TInt aMaxLength,TRequestStatus& aStatus);
   1.243 +	IMPORT_C TInt WriteL(const TDesC8& aDes,TRequestStatus& aStatus);
   1.244 +	inline TInt WriteL(const TDesC8& aDes,TInt aMaxLength,TRequestStatus& aStatus);
   1.245 +	inline TStreamTransfer WriteL(MStreamOutput& anOutput,TStreamTransfer aTransfer);
   1.246 +	IMPORT_C TInt WriteL(MStreamOutput& anOutput,TInt aMaxLength);
   1.247 +	inline void WriteL(MStreamOutput& anOutput);
   1.248 +//
   1.249 +	inline void SeekL(TMark aMark,TStreamPos aPos);
   1.250 +	inline TStreamPos SeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset=0);
   1.251 +	inline TStreamPos SeekL(TRead,TStreamLocation aLocation,TInt anOffset=0);
   1.252 +	inline TStreamPos SeekL(TWrite,TStreamLocation aLocation,TInt anOffset=0);
   1.253 +	inline TStreamPos SeekL(TRead,TInt anOffset);
   1.254 +	inline TStreamPos SeekL(TWrite,TInt anOffset);
   1.255 +//
   1.256 +	inline TStreamPos TellL(TRead) const;
   1.257 +	inline TStreamPos TellL(TWrite) const;
   1.258 +	inline TInt SizeL() const;
   1.259 +protected:
   1.260 +	MStreamBuf() {}
   1.261 +private:
   1.262 +	MStreamBuf(const MStreamBuf&);
   1.263 +	MStreamBuf& operator=(const MStreamBuf&);
   1.264 +//
   1.265 +	virtual IMPORT_C void DoRelease();
   1.266 +	virtual IMPORT_C void DoSynchL();
   1.267 +	virtual IMPORT_C TInt DoReadL(TAny* aPtr,TInt aMaxLength);
   1.268 +	virtual IMPORT_C TInt DoReadL(TDes8& aDes,TInt aMaxLength,TRequestStatus& aStatus);
   1.269 +	virtual IMPORT_C TStreamTransfer DoReadL(MStreamInput& anInput,TStreamTransfer aTransfer);
   1.270 +	virtual IMPORT_C void DoWriteL(const TAny* aPtr,TInt aLength);
   1.271 +	virtual IMPORT_C TInt DoWriteL(const TDesC8& aDes,TInt aMaxLength,TRequestStatus& aStatus);
   1.272 +	virtual IMPORT_C TStreamTransfer DoWriteL(MStreamOutput& anOutput,TStreamTransfer aTransfer);
   1.273 +	virtual IMPORT_C TStreamPos DoSeekL(TMark aMark,TStreamLocation aLocation,TInt anOffset);
   1.274 +	};
   1.275 +
   1.276 +/**
   1.277 + * @publishedAll 
   1.278 + * @released
   1.279 + * An interface to an object that acts as a target for read operations from 
   1.280 +a stream. The object behaves as a generic data sink.
   1.281 +
   1.282 +A stream input object can act as an intelligent buffer, and is useful for 
   1.283 +performing filtering, compression or any other general kind of conversion 
   1.284 +operation that might be needed after reading from a stream.
   1.285 +
   1.286 +The class is pure interface and requires an implementation.
   1.287 +
   1.288 +@see MStreamBuf::ReadL()  
   1.289 +*/
   1.290 +class MStreamInput
   1.291 +	{
   1.292 +public:
   1.293 +	/** Reads data from an intermediate buffer into this stream input object.
   1.294 +	
   1.295 +	This function is called by the default implementation of 
   1.296 +	TStreamBuf::DoReadL(MStreamInput&,TStreamTransfer) 
   1.297 +	and assumes that the source is a stream buffer's intermediate buffer.
   1.298 +	
   1.299 +	@param aPtr A pointer into the intermediate buffer from which the read 
   1.300 +	operation starts.
   1.301 +	@param aMaxLength The maximum amount of data to be read.
   1.302 +	@return The amount of data read.
   1.303 +	@see TStreamBuf::DoReadL()
   1.304 +	@see TStreamBuf */
   1.305 +	virtual TInt PushL(const TAny* aPtr,TInt aMaxLength)=0;
   1.306 +
   1.307 +	/** Reads data from the specified stream into this stream input object.
   1.308 +	
   1.309 +	This function is called by the default implementation of
   1.310 +	MStreamBuf::DoReadL(MStreamInput&,TStreamTransfer). 
   1.311 +	It may also be called by TStreamBuf::DoReadL(MStreamInput&,TStreamTransfer), 
   1.312 +	depending on the amount of data to be transferred and the nature of the 
   1.313 +	buffering scheme.
   1.314 +	
   1.315 +	@param aSource The stream from which data is to be read.
   1.316 +	@param aTransfer Defines the amount of data available to be read.
   1.317 +	@return The amount of data that was not consumed.
   1.318 +	@see MStreamBuf::DoReadL()
   1.319 +	@see TStreamBuf::DoReadL() */
   1.320 +	virtual	TStreamTransfer ReadFromL(MStreamBuf& aSource,TStreamTransfer aTransfer)=0;
   1.321 +	};
   1.322 +
   1.323 +/**
   1.324 + * @publishedAll 
   1.325 + * @released
   1.326 + * An interface to an object that acts as source for write operations to a 
   1.327 +stream. The object behaves as a generic data source.
   1.328 +
   1.329 +A stream output object can act as an intelligent buffer, and is useful for 
   1.330 +performing filtering, compression or any other general kind of conversion 
   1.331 +operation that might be needed before writing to a stream.
   1.332 +
   1.333 +The class is pure interface and requires an implementation.
   1.334 +
   1.335 +@see MStreamBuf::WriteL()  
   1.336 +*/
   1.337 +class MStreamOutput
   1.338 +	{
   1.339 +public:
   1.340 +	/** Writes data to an intermediate buffer from this stream output object.
   1.341 +	
   1.342 +	This function is called by the default implementation of 
   1.343 +	TStreamBuf::DoWriteL(MStreamOutput&,TStreamTransfer) 
   1.344 +	and assumes that the target is a stream buffer's intermediate buffer.
   1.345 +	
   1.346 +	@param aPtr A pointer into the intermediate buffer where the write operation 
   1.347 +	starts.
   1.348 +	@param aMaxLength The maximum amount of data to be written.
   1.349 +	@return The amount of data written.
   1.350 +	@see TStreamBuf::DoWriteL()
   1.351 +	@see TStreamBuf */
   1.352 +	virtual TInt PullL(TAny* aPtr,TInt aMaxLength)=0;
   1.353 +
   1.354 +	/** Writes data to the specified stream from this stream output object.
   1.355 +	
   1.356 +	This function is called by the default implementation of 
   1.357 +	MStreamBuf::DoWriteL(MStreamOutput&,TStreamTransfer). 
   1.358 +	It may also be called by TStreamBuf::DoWriteL(MStreamOutput&,TStreamTransfer), 
   1.359 +	depending on the amount of data to be transferred and the nature of the 
   1.360 +	buffering scheme.
   1.361 +	
   1.362 +	@param aSink The stream to which data is to be written.
   1.363 +	@param aTransfer Defines the amount of data available to be written.
   1.364 +	@return The amount of data that was not consumed.
   1.365 +	@see MStreamBuf::DoWriteL()
   1.366 +	@see TStreamBuf::DoWriteL() */
   1.367 +	virtual TStreamTransfer WriteToL(MStreamBuf& aSink,TStreamTransfer aTransfer)=0;
   1.368 +	};
   1.369 +
   1.370 +/**
   1.371 + * @publishedAll 
   1.372 + * @released
   1.373 + * Adds buffering capabilities to a stream buffer
   1.374 +
   1.375 +The class provides pointers to mark out the current read and write areas within 
   1.376 +the intermediate buffer. The class also defines the pure virtual functions 
   1.377 +UnderflowL() and OverflowL() which must be provided by a derived class.
   1.378 +
   1.379 +Streams which have buffering capabilities derive from this class, otherwise 
   1.380 +they derive from MStreamBuf.
   1.381 +
   1.382 +Note that the class does not provide the buffer; this is left to the class 
   1.383 +derived from it. For example, the memory buffer classes use the memory area 
   1.384 +directly, the file buffer class allocate a heap cell to use as a buffer.
   1.385 +
   1.386 +@see UnderflowL()
   1.387 +@see OverflowL()  
   1.388 +*/
   1.389 +class TStreamBuf : public MStreamBuf
   1.390 +	{
   1.391 +protected:
   1.392 +	/** Used to identify the type of area within an intermediate buffer.
   1.393 +
   1.394 +	The type is used by functions of this class that set or get pointers into 
   1.395 +	the intermediate buffer.
   1.396 +
   1.397 +	The type uses the ERead and EWrite enumeration values, as bit flags, to 
   1.398 +	identify the read and write areas respectively.
   1.399 +
   1.400 +	ERead is an MStreamBuf::TRead enumerator. EWrite is an MStreamBuf::EWrite 
   1.401 +	enumerator.
   1.402 +
   1.403 +	@see MStreamBuf::TRead
   1.404 +	@see MStreamBuf::TWrite */
   1.405 +	typedef TInt TArea;
   1.406 +protected:
   1.407 +	IMPORT_C TStreamBuf();
   1.408 +//
   1.409 +	IMPORT_C void SetBuf(TArea anArea,TUint8* aPtr,TUint8* anEnd);
   1.410 +	IMPORT_C void SetPtr(TArea anArea,TUint8* aPtr);
   1.411 +	IMPORT_C void SetEnd(TArea anArea,TUint8* anEnd);
   1.412 +	IMPORT_C TUint8* Ptr(TArea anArea) const;
   1.413 +	IMPORT_C TUint8* End(TArea anArea) const;
   1.414 +	IMPORT_C TInt Avail(TArea anArea) const;
   1.415 +//
   1.416 +	IMPORT_C TInt DoReadL(TAny* aPtr,TInt aMaxLength);
   1.417 +	IMPORT_C TStreamTransfer DoReadL(MStreamInput& anInput,TStreamTransfer aTransfer);
   1.418 +	IMPORT_C void DoWriteL(const TAny* aPtr,TInt aLength);
   1.419 +	IMPORT_C TStreamTransfer DoWriteL(MStreamOutput& anOutput,TStreamTransfer aTransfer);
   1.420 +//
   1.421 +	inline void SetBuf(TRead,TUint8* aPtr,TUint8* anEnd);
   1.422 +	inline void SetBuf(TWrite,TUint8* aPtr,TUint8* anEnd);
   1.423 +	inline void SetPtr(TRead,TUint8* aPtr);
   1.424 +	inline void SetPtr(TWrite,TUint8* aPtr);
   1.425 +	inline void SetEnd(TRead,TUint8* anEnd);
   1.426 +	inline void SetEnd(TWrite,TUint8* anEnd);
   1.427 +	inline TUint8* Ptr(TRead) const;
   1.428 +	inline TUint8* Ptr(TWrite) const;
   1.429 +	inline TUint8* End(TRead) const;
   1.430 +	inline TUint8* End(TWrite) const;
   1.431 +	inline TInt Avail(TRead) const;
   1.432 +	inline TInt Avail(TWrite) const;
   1.433 +private:
   1.434 +	/** Re-fills the intermediate buffer and resets the start and end points 
   1.435 +	of the read area.
   1.436 +	
   1.437 +	The implementation of this function depends on the way the stream itself is 
   1.438 +	implemented. For example, the in-memory streams have simple implementations.
   1.439 +	
   1.440 +	@param aMaxLength The maximum amount of data required for the intermediate 
   1.441 +	buffer.
   1.442 +	@return The amount of data available in the intermediate buffer. */
   1.443 +	virtual TInt UnderflowL(TInt aMaxLength)=0;
   1.444 +
   1.445 +	/** Empties the intermediate buffer and resets the start and end points 
   1.446 +	of the write area.
   1.447 +	
   1.448 +	The implementation of this function depends on the way the stream itself is 
   1.449 +	implemented. For example, the in-memory streams have simple implementations. */
   1.450 +	virtual void OverflowL()=0;
   1.451 +private:
   1.452 +	TUint8* iRPtr;
   1.453 +	TUint8* iREnd;
   1.454 +	TUint8* iWPtr;
   1.455 +	TUint8* iWEnd;
   1.456 +	};
   1.457 +
   1.458 +/**
   1.459 + * @publishedAll 
   1.460 + * @released
   1.461 + * Interface to a stream filter.
   1.462 +
   1.463 +A stream filter is an object that allows stream data to be filtered after 
   1.464 +retrieval from a host or filtered before being written to a host.
   1.465 +
   1.466 +The class is abstract and a derived class must be defined an implemented.  
   1.467 +*/
   1.468 +class TStreamFilter : public MStreamBuf
   1.469 +	{
   1.470 +public:
   1.471 +	enum {EAttached=0x10};
   1.472 +protected:
   1.473 +	IMPORT_C TStreamFilter();
   1.474 +	inline void Set(MStreamBuf* aHost,TInt aMode);
   1.475 +	inline void Committed();
   1.476 +	inline TBool IsCommitted() const;
   1.477 +	IMPORT_C void EmitL(const TAny* aPtr,TInt aLength);
   1.478 +//
   1.479 +	IMPORT_C void DoRelease();
   1.480 +	IMPORT_C void DoSynchL();
   1.481 +	IMPORT_C TInt DoReadL(TAny* aPtr,TInt aMaxLength);
   1.482 +	IMPORT_C void DoWriteL(const TAny* aPtr,TInt aLength);
   1.483 +private:
   1.484 +	/** Calculates the maximum size of unfiltered data necessary to give the 
   1.485 +	specified amount of filtered data.
   1.486 +	
   1.487 +	@param aMaxLength The amount of filtered data required.
   1.488 +	@return The maximum amount of unfiltered data guaranteed not to generate 
   1.489 +	more than aMaxLength bytes of filtered output. */
   1.490 +	virtual TInt Capacity(TInt aMaxLength)=0;
   1.491 +
   1.492 +	/** Performs the filtration process.
   1.493 +	
   1.494 +	@param aPtr Pointer to the output location for the filtered data.
   1.495 +	@param aMaxLength The maximum amount of space available for the filtered 
   1.496 +	data.
   1.497 +	@param aFrom A reference to a pointer to the unfiltered data source. This 
   1.498 +	pointer should be advanced as the source is consumed.
   1.499 +	@param anEnd Pointer to the first byte beyond the end of the unfiltered 
   1.500 +	data source.
   1.501 +	@return The size of the filtered data. */
   1.502 +	virtual TInt FilterL(TAny* aPtr,TInt aMaxLength,const TUint8*& aFrom,const TUint8* anEnd)=0;
   1.503 +private:
   1.504 +	MStreamBuf* iHost;
   1.505 +	TInt iMode;
   1.506 +private:
   1.507 +	friend class TFilterInput;
   1.508 +	friend class TFilterOutput;
   1.509 +private:
   1.510 +	IMPORT_C static void __DbgChkMode(TInt aMode);
   1.511 +	};
   1.512 +
   1.513 +#include <s32buf.inl>
   1.514 +#endif