EPOC   SDK Home Glossary Indexes Previous   Up

CFaxT4 class


Contents


CFaxT4 class — Fax line coding/decoding

Section Contents


Overview

Derivation

CBase

Abstract: CBase behaviour.

Defined in

faxstore.h

Link against

faxst2.lib

Description

This class provides utility functions for encoding and decoding fax scan lines. The lines can be encoded/decoded as 1 dimensional modified Huffman or 2 dimensional modified Read.

Users must first create a CFaxT4 object using NewL() or NewLC(). Specific functions are provided to encode/decode scan lines using the two coding schemes. In addition, general functions are provided which determine the coding type from the values specified when the object is initialised  — using PageInitialise().


Construction and destruction


NewL() — Construct new CFaxT4 object

static CFaxT4* NewL();

Description

This function is used to construct a CFaxT4 object, which provides utility functions to encode and decode fax scan lines. The function is exactly the same as NewLC() except that the new object is popped from the cleanup stack.

The new object is constructed with the default compression and resolution: EModifiedHuffman and EFaxNormal respectively.

Return value

CFaxT4*

A pointer to the newly created object.

Note

NewLC() — Construct new CFaxT4 object

static CFaxT4* NewLC();

Description

This function is used to construct a CFaxT4 object, which provides utility functions to encode and decode fax scan lines. As is usual in EPOC, the only difference between this function and NewL() is that this variant pushes the object to the cleanup stack.

The new object is constructed with the default compression and resolution: EModifiedHuffman and EFaxNormal respectively.

Return value

CFaxT4*

A pointer to the newly created object.

Note

Object initialisation


PageInitialize() — Initialise object

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

Description

This function initialises the CFaxT4 object with a specific resolution and compression.

Arguments

TFaxResolution aResolution

The resolution level.

TFaxCompression aCompression

The compression type.

TInt aFlag2 = 0

Reserved for future use.


Encoding and decoding


EncodeScanLine() — Encode scan line

void EncodeScanLine(const TDesC8& aScanLine,TDes8& anEncodedScanLine);

Description

This function encodes a scan line using either one dimensional Modified Huffman (MH) or two dimensional Modified Read (MR) encoding. The type of encoding used depends on the compression type specified when the object was initialised — using PageInitialize(). If the object was not initialised, then the default compression is MH.

Arguments

const TDesC8& aScanLine

The raw scan line to be encoded.

TDes8& anEncodedScanLine

On return, contains the encoded scan line.


DecodeScanLine() — Decode scan line

TInt DecodeScanLine(TDes8& aScanLine,const TDesC8& anEncodedScanLine);

Description

This function decodes a scan line. The decoding method depends on the compression type specified when the object was initialised — using PageInitialize(). If the object was not initialised, then the scan line is decoded as Modified Huffman.

Arguments

TDes8& aScanLine

On return, contains the decoded scan line.

const TDesC8& anEncodedScanLine

The encoded scan line to be decoded.

Return value

TInt

An error code: see System error codes.

Note

EncodeScanLine1D() — Encode scan line as MH

void EncodeScanLine1D(const TDesC8& aScanLine,TDes8& anEncodedScanLine);

Description

This function encodes a scan line using Modified Huffman compression.

Arguments

const TDesC8& aScanLine

The scan line to be encoded.

TDes8& anEncodedScanLine

On return, contains the MH encoded scan line.


DecodeScanLine1D() — Decode MH encoded scan line

TInt DecodeScanLine1D(TDes8& aScanLine,const TDesC8& anEncodedScanLine);

Description

This function decodes a Modified Huffman encoded scan line.

Arguments

TDes8& aScanLine

On return, contains the decoded scan line.

const TDesC8& anEncodedScanLine

The MH encoded scan line to be decoded.

Return value

TInt

An error code: see System error codes.

Note

EncodeScanLine2D() — Encode scan line as MR

void EncodeScanLine2D(const TDesC8& aScanLine,TDes8& anEncodedScanLine);

Description

This function encodes a scan line using Modified Read compression.

Arguments

const TDesC8& aScanLine

The scan line to be encoded.

TDes8& anEncodedScanLine

On return, contains the MR encoded scan line.


DecodeScanLine2D() — Decode MR encoded scan line

TInt DecodeScanLine2D(TDes8& aScanLine,const TDesC8& anEncodedScanLine);

Description

This function decodes a Modified Read encoded scan line.

Arguments

TDes8& aScanLine

On return, contains the decoded scan line.

const TDesC8& anEncodedScanLine

The 2D encoded scan line to be decoded.

Return value

TInt

An error code: see System error codes.

Note
EPOC       SDK Home Glossary Indexes Previous   Up