|
||
class TStreamFilter : public MStreamBuf;
Interface to a stream filter.
A stream filter is an object that allows stream data to be filtered after retrieval from a host or filtered before being written to a host.
The class is abstract and a derived class must be defined an implemented.
MStreamBuf
-
A stream buffer that provides a generic I/O interface for streamed data.
TStreamFilter
-
Interface to a stream filter.
Defined in TStreamFilter
:
Capacity(TInt)
Calculates the maximum size of unfiltered data necessary to give the specified a...Committed()
Flags the streamed data as committed. DoReadL(TAny *,TInt)
Reads data from the host stream through the filter into the specified memory loc...DoRelease()
Frees the host stream's resources.DoSynchL()
Synchronizes the host's intermediate buffer with its stream, leaving if any erro...DoWriteL(const TAny *,TInt)
Writes data to the host stream through the filter from the specified memory loca...EAttached
EmitL(const TAny *,TInt)
Writes data from the specified memory location directly to the host without filt...FilterL(TAny *,TInt,const TUint8 *&,const TUint8 *)
Performs the filtration process.IsCommitted()const
Tests whether the streamed data is committed.Set(MStreamBuf *,TInt)
Sets up the filter to use the specified host for streamed data.TStreamFilter()
Constructs an empty stream filter object. anonymous
Inherited from MStreamBuf
:
Close()
Closes the stream buffer.ERead
EWrite
PushL()
Puts a cleanup item for this object onto the cleanup stack.Read(TDes8 &,TInt,TRequestStatus &)
Reads data, asynchronously, from the stream buffer into the specified descriptor...Read(TDes8 &,TRequestStatus &)
Reads data, asynchronously, from the stream buffer into the specified descriptor...ReadL(MStreamInput &)
Reads data from the stream buffer into the specified data sink.ReadL(MStreamInput &,TInt)
Reads data from the stream buffer into the specified data sink.ReadL(MStreamInput &,TStreamTransfer)
Reads data from the stream buffer into the specified data sink.ReadL(TAny *,TInt)
Reads data from the stream buffer into the specified memory location.ReadL(TDes8 &,TInt,TRequestStatus &)
Reads data, asynchronously, from the stream buffer into the specified descriptor...ReadL(TDes8 &,TRequestStatus &)
Reads data, asynchronously, from the stream buffer into the specified descriptor...Release()
Frees resources before abandoning the stream buffer.SeekL(TMark,TStreamLocation,TInt)
Moves the position of the read mark or the write mark in the stream.SeekL(TMark,TStreamPos)
Moves the position of the read or write mark in the stream.SeekL(TRead,TInt)
Moves the position of the read mark in the stream by the specified offset.SeekL(TRead,TStreamLocation,TInt)
Moves the position of the read mark in the stream.SeekL(TWrite,TInt)
Moves the position of the write mark in the stream by the specified offset.SeekL(TWrite,TStreamLocation,TInt)
Moves the position of the write mark in the stream.SizeL()const
Gets the size of the stream.Synch()
Synchronises the stream buffer with the stream, returning any error.SynchL()
Synchronises the stream buffer with the stream, leaving if any error occurs.TMark
Used to identify the type of mark in a stream.TRead
Indicates that an operation applies to the read mark in a stream or to the read ...TWrite
Indicates that an operation applies to the write mark in a stream or to the writ...TellL(TRead)const
Gets the position of the read mark within the stream.TellL(TWrite)const
Gets the position of the write mark within the stream.Write(const TDesC8 &,TInt,TRequestStatus &)
Write(const TDesC8 &,TRequestStatus &)
Writes data, asynchronously, from the specified descriptor into the stream buffe...WriteL(MStreamOutput &)
Writes data into the stream buffer from the specified data source.WriteL(MStreamOutput &,TInt)
Writes data into the stream buffer from the specified data source.WriteL(MStreamOutput &,TStreamTransfer)
Writes data into the stream buffer from the specified data source.WriteL(const TAny *,TInt)
Writes data from the specified memory location into the stream buffer.WriteL(const TDesC8 &,TInt,TRequestStatus &)
Writes data, asynchronously, from the specified descriptor into the stream buffe...WriteL(const TDesC8 &,TRequestStatus &)
Writes data, asynchronously, from the specified descriptor into the stream buffe...protected: inline void Set(MStreamBuf *aHost, TInt aMode);
Sets up the filter to use the specified host for streamed data.
Taking ownership of the host stream buffer means that calls to MStreamBuf::SynchL()
propagate to the host buffer after the filter has flushed its data, and that when the filter is released it also releases
the host buffer.
|
MStreamBuf::TRead
Indicates that an operation applies to the read mark in a stream or to the read ...MStreamBuf::TWrite
Indicates that an operation applies to the write mark in a stream or to the writ...protected: inline TBool IsCommitted() const;
Tests whether the streamed data is committed.
|
protected: IMPORT_C void EmitL(const TAny *aPtr, TInt aLength);
Writes data from the specified memory location directly to the host without filtering.
This is useful for sending any final data, when flushing the filter as part of TStreamFilter::DoSynchL()
.
In debug mode: the filter must be in write mode, otherwise the function raises a STORE-Stream 11 panic.
In debug mode, a host stream must have been set before calling this function, otherwise it raises a STORE-Stream 0 panic.
|
TStreamFilter::DoSynchL()
Synchronizes the host's intermediate buffer with its stream, leaving if any erro...protected: IMPORT_C virtual void DoRelease();
Frees the host stream's resources.
MStreamBuf::DoRelease()
Frees resources before abandoning the stream buffer.protected: IMPORT_C virtual void DoSynchL();
Synchronizes the host's intermediate buffer with its stream, leaving if any error occurs.
MStreamBuf::DoSynchL()
Synchronises the stream buffer with the stream, leaving if any error occurs.protected: IMPORT_C virtual TInt DoReadL(TAny *aPtr, TInt aMaxLength);
Reads data from the host stream through the filter into the specified memory location.
In debug mode: the filter must be in read mode, otherwise the function raises a STORE-Stream 10 panic.
In debug mode, a host stream must have been set before calling this function, otherwise it raises a STORE-Stream 0 panic.
|
|
protected: IMPORT_C virtual void DoWriteL(const TAny *aPtr, TInt aLength);
Writes data to the host stream through the filter from the specified memory location.
In debug mode: the filter must be in write mode, otherwise the function raises a STORE-Stream 11 panic.
In debug mode, a host stream must have been set before calling this function, otherwise it raises a STORE-Stream 0 panic.
|
private: virtual TInt Capacity(TInt aMaxLength)=0;
Calculates the maximum size of unfiltered data necessary to give the specified amount of filtered data.
|
|
private: virtual TInt FilterL(TAny *aPtr, TInt aMaxLength, const TUint8 *&aFrom, const TUint8 *anEnd)=0;
Performs the filtration process.
|
|