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.
Public Member Functions | |
---|---|
IMPORT_C TInt | DecodeScanLine(TDes8 &, const TDesC8 &) |
IMPORT_C TInt | DecodeScanLine1D(TDes8 &, const TDesC8 &) |
IMPORT_C TInt | DecodeScanLine2D(TDes8 &, const TDesC8 &) |
IMPORT_C void | EncodeScanLine(const TDesC8 &, TDes8 &) |
IMPORT_C void | EncodeScanLine1D(const TDesC8 &, TDes8 &) |
IMPORT_C void | EncodeScanLine2D(const TDesC8 &, TDes8 &) |
IMPORT_C CFaxT4 * | NewL() |
IMPORT_C CFaxT4 * | NewLC() |
IMPORT_C void | PageInitialize(TFaxResolution, TFaxCompression, TInt) |
Private Member Functions | |
---|---|
CFaxT4() | |
void | DecodeHuffman(const TDesC8 &) |
void | DoEncodeScanLine2D(const TDesC8 &, TDes8 &) |
Private Attributes | |
---|---|
TFaxCompression | iCompression |
const TUint8 * | iEndRef |
TInt | iK |
TInt | iLineCount |
TUint8 | iRef |
TInt | iReservedFlag2 |
TFaxResolution | iResolution |
void | DecodeHuffman | ( | const TDesC8 & | aEncodedScanLine | ) | [private] |
const TDesC8 & aEncodedScanLine |
IMPORT_C TInt | DecodeScanLine | ( | 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.
IMPORT_C TInt | DecodeScanLine1D | ( | TDes8 & | aScanLine, |
const TDesC8 & | anEncodedScanLine | |||
) |
Decodes a Modified Huffman encoded scan line.
IMPORT_C TInt | DecodeScanLine2D | ( | TDes8 & | aScanLine, |
const TDesC8 & | anEncodedScanLine | |||
) |
Decodes a Modified Read encoded scan line.
void | DoEncodeScanLine2D | ( | const TDesC8 & | aScanLine, |
TDes8 & | anEncodedScanLine | |||
) | [private] |
IMPORT_C void | EncodeScanLine | ( | 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.
IMPORT_C void | EncodeScanLine1D | ( | const TDesC8 & | aScanLine, |
TDes8 & | anEncodedScanLine | |||
) |
Encodes a scan line using Modified Huffman compression.
IMPORT_C void | EncodeScanLine2D | ( | const TDesC8 & | aScanLine, |
TDes8 & | anEncodedScanLine | |||
) |
Encodes a scan line using Modified Read compression.
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.
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.
IMPORT_C void | PageInitialize | ( | TFaxResolution | aResolution, |
TFaxCompression | aCompression, | |||
TInt | aFlag2 = 0 | |||
) |
Initialize fax page, set page parameters.
TFaxResolution aResolution | defines fax resolution |
TFaxCompression aCompression | defines fax compression |
TInt aFlag2 = 0 | reserved flag. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.