EPOC   SDK Home Glossary Indexes Previous Next Up

CWriteFaxPages class


Contents


CWriteFaxPages class — Write a fax page to a store

Section Contents


Overview

Derivation

CBase

Abstract: CBase behaviour.

Defined in

faxstore.h

Link against

faxst2.lib

Description

Objects of this class are created by CWriteFaxFile, and used to add 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.

For more information about creating fax files see Storing a fax file and Using CWriteFaxFile.


Construction and Destruction


NewL() — Static constructor for a CWriteFaxPages object

static CWriteFaxPages* NewL(CStreamStore& aStore,TInt aMaxScanLinesInBand=0);

Description

This static constructor 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.

Arguments

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.

Return value

CWriteFaxPages*

A pointer to the newly created object.

Note

~CWriteFaxPages() — Destructor

~CWriteFaxPages();

Description

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


Member functions


StartPage() — Start page

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

Description

This function sets the compression format and resolution to be used for storing the next page’s scan lines.

Arguments

TFaxResolution aResolution

The scan line resolution.

TFaxCompression aCompression

The type of scan line compression.

TInt aFlag2 = 0

Reserved for future use.


AddScanLineL() — Add scan line

void AddScanLineL(const TDesC8& aScanline);

Description

This function is used to add 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.

Arguments

const TDesC8& aScanline

The current raw scan line.


AddEncodedScanLineL() — Add encoded scan line

void AddEncodedScanLineL(const TDesC8& anEncodedScanLine);

Description

This function is used to add encoded scan lines to the write stream.

Arguments

const TDesC8& anEncodedScanLine

The encoded scan line (MH or MR).


EndPageL() — End page

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

Description

This function must be called after all the scan lines in the page have been written to the stream. It adds fax page information to the stream, including the scan line resolution, scan line compression, and sender Id. It then adds the completed page to the collection of pages in the fax store.

The completed page must be committed, using CWriteFaxFile::CommitL(), to make the changes permanent.

Arguments

TFaxResolution aResolution

The fax page resolution.

TFaxBufSenderId& aSenderId

The fax sender Id.

TFaxCompression aCompression = EModifiedHuffman

The fax page compression.

TInt aFlag2 = 0

Reserved for future use.

EPOC       SDK Home Glossary Indexes Previous Next Up