CFaxT4 Class Reference

class CFaxT4 : public CBase

Fax line coding/decoding.

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().

In pre-v5.1 releases of Symbian OS, this class was defined in faxstore.h and its import library was faxst2.lib.

Inherits from

Constructor & Destructor Documentation

CFaxT4()

CFaxT4()[private, inline]

Member Functions Documentation

DecodeHuffman(const TDesC8 &)

voidDecodeHuffman(const TDesC8 &aEncodedScanLine)[private]

Parameters

const TDesC8 & aEncodedScanLine

DecodeScanLine(TDes8 &, const TDesC8 &)

IMPORT_C TIntDecodeScanLine(TDes8 &aScanLine,
const TDesC8 &anEncodedScanLine
)

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.

The fax client can determine the type of compression used in a fax from its header, and can hence use PageInitialize() to set the correct decoding method. KErrUnderflow is returned if the wrong type of compression is specified.

capability
None

Parameters

TDes8 & aScanLineOn return, contains the decoded scan line.
const TDesC8 & anEncodedScanLineThe encoded scan line to be decoded.

DecodeScanLine1D(TDes8 &, const TDesC8 &)

IMPORT_C TIntDecodeScanLine1D(TDes8 &aScanLine,
const TDesC8 &anEncodedScanLine
)

Decodes a Modified Huffman encoded scan line.

capability
None

Parameters

TDes8 & aScanLineOn return, contains the decoded scan line.
const TDesC8 & anEncodedScanLineThe MH encoded scan line to be decoded.

DecodeScanLine2D(TDes8 &, const TDesC8 &)

IMPORT_C TIntDecodeScanLine2D(TDes8 &aScanLine,
const TDesC8 &anEncodedScanLine
)

Decodes a Modified Read encoded scan line.

capability
None

Parameters

TDes8 & aScanLineOn return, contains the decoded scan line.
const TDesC8 & anEncodedScanLineThe 2D encoded scan line to be decoded.

DoEncodeScanLine2D(const TDesC8 &, TDes8 &)

voidDoEncodeScanLine2D(const TDesC8 &aScanLine,
TDes8 &anEncodedScanLine
)[private]

Parameters

const TDesC8 & aScanLine
TDes8 & anEncodedScanLine

EncodeScanLine(const TDesC8 &, TDes8 &)

IMPORT_C voidEncodeScanLine(const TDesC8 &aScanLine,
TDes8 &anEncodedScanLine
)

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.

capability
None

Parameters

const TDesC8 & aScanLineThe raw scan line to be encoded.
TDes8 & anEncodedScanLineOn return, contains the encoded scan line.

EncodeScanLine1D(const TDesC8 &, TDes8 &)

IMPORT_C voidEncodeScanLine1D(const TDesC8 &aScanLine,
TDes8 &anEncodedScanLine
)

Encodes a scan line using Modified Huffman compression.

capability
None

Parameters

const TDesC8 & aScanLineThe scan line to be encoded.
TDes8 & anEncodedScanLineOn return, contains the MH encoded scan line.

EncodeScanLine2D(const TDesC8 &, TDes8 &)

IMPORT_C voidEncodeScanLine2D(const TDesC8 &aScanLine,
TDes8 &anEncodedScanLine
)

Encodes a scan line using Modified Read compression.

capability
None

Parameters

const TDesC8 & aScanLineThe scan line to be encoded.
TDes8 & anEncodedScanLineOn return, contains the MR encoded scan line.

NewL()

IMPORT_C CFaxT4 *NewL()[static]

Constructs 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.

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

NewLC()

IMPORT_C CFaxT4 *NewLC()[static]

Constructs a CFaxT4 object, which provides utility functions to encode and decode fax scan lines.

As is usual in Symbian OS, 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.

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

PageInitialize(TFaxResolution, TFaxCompression, TInt)

IMPORT_C voidPageInitialize(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

TFaxCompression iCompression

TFaxCompression iCompression[private]

const TUint8 * iEndRef

const TUint8 *iEndRef[private]

TInt iK

TInt iK[private]

TInt iLineCount

TInt iLineCount[private]

TUint8 iRef

TUint8 iRef[private]

TInt iReservedFlag2

TInt iReservedFlag2[private]

TFaxResolution iResolution

TFaxResolution iResolution[private]