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,
TIntaMaxScanLinesInBand
)[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 voidAddEncodedScanLineL(const TDesC8 &anEncodedScanLine)

Adds encoded scan lines to the write stream.

capability
None

Parameters

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

AddScanLineL(const TDesC8 &)

IMPORT_C voidAddScanLineL(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 & aScanlineThe current raw scan line.

BandCompleted()

TBool BandCompleted()[protected]

CommitPageL()

IMPORT_C TStreamIdCommitPageL()

Place FaxPages into write stream.

capability
None

ConstructL()

voidConstructL()[protected]

EndPageL(TFaxResolution, TFaxBufSenderId &, TFaxCompression, TInt)

IMPORT_C voidEndPageL(TFaxResolutionaResolution,
TFaxBufSenderId &aSenderId,
TFaxCompressionaCompression = EModifiedHuffman,
TIntaFlag2 = 0
)

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

capability
None

Parameters

TFaxResolution aResolutiondefines fax resolution
TFaxBufSenderId & aSenderIdSender Id.
TFaxCompression aCompression = EModifiedHuffmandefines fax compression
TInt aFlag2 = 0reserved flag.

NewL(CStreamStore &, TInt)

IMPORT_C CWriteFaxPages *NewL(CStreamStore &aStore,
TIntaMaxScanLinesInBand = 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 & aStoreThe store to which fax pages are to be added.
TInt aMaxScanLinesInBand = 0The 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 voidStartPage(TFaxResolutionaResolution,
TFaxCompressionaCompression,
TIntaFlag2 = 0
)

Initialize fax page, set page parameters.

capability
None

Parameters

TFaxResolution aResolutiondefines fax resolution
TFaxCompression aCompressiondefines fax compression
TInt aFlag2 = 0reserved 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]