CWriteFaxPages Class Reference

class CWriteFaxPages : public CBase

Adds pages to a fax file.

The class is used by first calling StartPage() to define the compression and resolution of the fax page, and then calling AddEncodedScanLineL() or AddScanLineL() to add each of the page's encoded or raw scan lines. When the page is complete, the EndPage() function adds the scan line compression, scan line resolution, and sender Id information to the store.

In pre-v5.1 releases of Symbian OS, the import library was faxst2.lib.

Inherits from

Constructor & Destructor Documentation

CWriteFaxPages(CStreamStore &, TInt)

CWriteFaxPages ( CStreamStore & aStore,
TInt aMaxScanLinesInBand
) [protected]

Parameters

CStreamStore & aStore
TInt aMaxScanLinesInBand

~CWriteFaxPages()

IMPORT_C ~CWriteFaxPages ( )

Destructor.

Closes the write stream, and frees all resources owned by the object, prior to its destruction.

Member Functions Documentation

AddEncodedScanLineL(const TDesC8 &)

IMPORT_C void AddEncodedScanLineL ( const TDesC8 & anEncodedScanLine )

Adds encoded scan lines to the write stream.

capability
None

Parameters

const TDesC8 & anEncodedScanLine The encoded scan line (MH or MR).

AddScanLineL(const TDesC8 &)

IMPORT_C void AddScanLineL ( const TDesC8 & aScanline )

Adds raw scan lines to the write stream.

The function first encodes the scan line, using the format specified in the StartPage() function, and then adds it to the write stream.

capability
None

Parameters

const TDesC8 & aScanline The current raw scan line.

BandCompleted()

TBool BandCompleted ( ) [protected]

CommitPageL()

IMPORT_C TStreamId CommitPageL ( )

Place FaxPages into write stream.

capability
None

ConstructL()

void ConstructL ( ) [protected]

EndPageL(TFaxResolution, TFaxBufSenderId &, TFaxCompression, TInt)

IMPORT_C void EndPageL ( TFaxResolution aResolution,
TFaxBufSenderId & aSenderId,
TFaxCompression aCompression = EModifiedHuffman,
TInt aFlag2 = 0
)

Sets parameters for the current page, writes it to the stream and appends to the fax pages set.

capability
None

Parameters

TFaxResolution aResolution defines fax resolution
TFaxBufSenderId & aSenderId Sender Id.
TFaxCompression aCompression = EModifiedHuffman defines fax compression
TInt aFlag2 = 0 reserved flag.

NewL(CStreamStore &, TInt)

IMPORT_C CWriteFaxPages * NewL ( CStreamStore & aStore,
TInt aMaxScanLinesInBand = 0
) [static]

Creates a CWriteFaxPages object, which offers the public API for writing fax pages to a stream store.

This function is called by CWriteFaxFile as part of creating a fax file.

leave
KErrNoMemory There is insufficient memory to perform the operation.
capability
None

Parameters

CStreamStore & aStore The store to which fax pages are to be added.
TInt aMaxScanLinesInBand = 0 The maximum number of scan lines in a band. Faxes pages are stored in bands - to speed up display time. It is recommended that developers use 64 - the value used by CWriteFaxFile.

StartPage(TFaxResolution, TFaxCompression, TInt)

IMPORT_C void StartPage ( TFaxResolution aResolution,
TFaxCompression aCompression,
TInt aFlag2 = 0
)

Initialize fax page, set page parameters.

capability
None

Parameters

TFaxResolution aResolution defines fax resolution
TFaxCompression aCompression defines fax compression
TInt aFlag2 = 0 reserved flag.

Member Data Documentation

CFaxPageInfo * iCurrentPage

CFaxPageInfo * iCurrentPage [private]

TBuf8< KFaxT4MaxDesLength > iEncodedScanLine

TBuf8 < KFaxT4MaxDesLength > iEncodedScanLine [private]

CFaxPages * iFaxPages

CFaxPages * iFaxPages [private]

CFaxT4 * iFaxT4

CFaxT4 * iFaxT4 [private]

TInt iMaxScanLinesInBand

TInt iMaxScanLinesInBand [private]

CStreamStore * iStore

CStreamStore * iStore [private]

RStoreWriteStream iWriteStream

RStoreWriteStream iWriteStream [private]