TObexRFileBackedBuffer Class Reference

class TObexRFileBackedBuffer : public TObexBufferingDetails

Provides alternate behaviour for a CObexBufObject, allowing use of a file to hold the object in its entirety. Writes to this object are buffered through the supplied CBufBase derived object, which is never enlarged. Once it is full, the data is flushed to the file.

Inherits from

Constructor & Destructor Documentation

TObexRFileBackedBuffer(CBufBase &, RFile, CObexBufObject::TFileBuffering)

IMPORT_CTObexRFileBackedBuffer(CBufBase &aBuffer,
RFileaFile,
CObexBufObject::TFileBufferingaBufferingStrategy
)

Build a variant of TObexBufferingDetails which instructs the CObexBufObject to use a file as the main data store, buffering writes to this in chunks. Writes are buffered into the supplied CBufBase derived object, which is not resized. Once it is full, the data contained is written to file. Double buffering can be specified by setting aBufferingStrategy appropriately. If the file is opened in read only mode, attempts to store data in this object will cause an Obex error to be signalled in response to the Obex packet which body data.

Parameters

CBufBase & aBufferThe buffer to use as a temporary store. This is ignored when reading from the file.
RFile aFileAn RFile object pointing to the file, opened in an appropriate access mode.Note, Obex is responsible for closing the file, and a panic will result if an attempt is made to close the file from outside of Obex.
CObexBufObject::TFileBuffering aBufferingStrategyUse double or single buffering.

Member Functions Documentation

File()

RFile File()

Basic getter.

Strategy()

CObexBufObject::TFileBuffering Strategy()

Basic getter.

Member Data Documentation

CObexBufObject::TFileBuffering iBufferingStrategy

CObexBufObject::TFileBuffering iBufferingStrategy[private]

RFile iFile

RFile iFile[private]

TUint32 iPadding1

TUint32 iPadding1[private]

TUint32 iPadding2

TUint32 iPadding2[private]