TSatUtility Class Reference

class TSatUtility
This class includes small aid fuctions
Since
S60 3.1
Public Member Functions
IMPORT_C TIntAsciiToBCD(const TDesC8 &, TDes8 &)
IMPORT_C TIntBCDToAscii(const TPtrC8, TDes8 &)
IMPORT_C voidConvert7BitToUnicode16(const TDesC8 &, TDes16 &)
IMPORT_C voidConvertAlphaFieldsToUnicode(const TDesC8 &, TDes &)
IMPORT_C TUint8ConvertToSemiOctet(const TInt)
IMPORT_C TIntConvertUnicode16To7Bit(const TDesC16 &, TDes8 &)
IMPORT_C TIntCopy16to8LE(const TDesC16 &, TDes8 &)
IMPORT_C TIntCopy8to16LE(const TDesC8 &, TDes16 &)
IMPORT_C TIntCopyTwo8toOne16LE(const TDesC8 &, TUint16 &, const TInt)
IMPORT_C TSmsDcsDecodeCbsDcs(const TUint8)
IMPORT_C voidFillDurationStructure(CBerTlv &, RSat::TDuration &)
IMPORT_C voidFillIconStructure(CBerTlv &, RSat::TIconId &, const TInt)
IMPORT_C TIntPacked7to8Unpacked(const TPtrC8, TDes8 &)
IMPORT_C voidRemoveWildAndExpansionDigit(const TPtrC8, TDes8 &)
IMPORT_C voidSetAlphaId(const TPtrC8, TDes &)
IMPORT_C voidSetText(CTlv &, TDes &)
IMPORT_C voidTonAndNpi(TInt, RSat::TTypeOfNumber *, RSat::TNumberingPlan *)
IMPORT_C voidUCSToPacked7(const TPtrC, TDes8 &)

Member Functions Documentation

AsciiToBCD(const TDesC8 &, TDes8 &)

IMPORT_C TIntAsciiToBCD(const TDesC8 &aInput,
TDes8 &aOutput
)[static]

Converts Ascii string to Binary Coded Decimal

Parameters

const TDesC8 & aInputis source
TDes8 & aOutputconverted 8-bit string

BCDToAscii(const TPtrC8, TDes8 &)

IMPORT_C TIntBCDToAscii(const TPtrC8aInput,
TDes8 &aOutput
)[static]

Converts Binary Coded Decimal to ASCII

Parameters

const TPtrC8 aInputis source
TDes8 & aOutputconverted 8-bit string

Convert7BitToUnicode16(const TDesC8 &, TDes16 &)

IMPORT_C voidConvert7BitToUnicode16(const TDesC8 &aInput,
TDes16 &aOutput
)[static]

Browse a text in Unicode format, and for some specific characters replace with the correct byte value

Parameters

const TDesC8 & aInput
TDes16 & aOutput

ConvertAlphaFieldsToUnicode(const TDesC8 &, TDes &)

IMPORT_C voidConvertAlphaFieldsToUnicode(const TDesC8 &aSource,
TDes &aTarget
)[static]

Convert Alpha field text string to a Unicode text string.

Parameters

const TDesC8 & aSourcetext string
TDes & aTarget

ConvertToSemiOctet(const TInt)

IMPORT_C TUint8ConvertToSemiOctet(const TIntaTime)[static]

Convert integer to BCD format. If number is more than 100 only last two digits is converted.

Parameters

const TInt aTimetime

ConvertUnicode16To7Bit(const TDesC16 &, TDes8 &)

IMPORT_C TIntConvertUnicode16To7Bit(const TDesC16 &aInput,
TDes8 &aOutput
)[static]

Converts unicode16 string to 7 bit character mode

Parameters

const TDesC16 & aInput
TDes8 & aOutput

Copy16to8LE(const TDesC16 &, TDes8 &)

IMPORT_C TIntCopy16to8LE(const TDesC16 &aSource,
TDes8 &aTarget
)[static]

Copy from 16 bit descriptor to 8 bit descriptor with little endian. Function uses Append method.

Parameters

const TDesC16 & aSource
TDes8 & aTarget

Copy8to16LE(const TDesC8 &, TDes16 &)

IMPORT_C TIntCopy8to16LE(const TDesC8 &aSource,
TDes16 &aTarget
)[static]

Copy from 8 bit descriptor to 16 bit descriptor with little endian. Function uses Append method.

Parameters

const TDesC8 & aSource
TDes16 & aTarget

CopyTwo8toOne16LE(const TDesC8 &, TUint16 &, const TInt)

IMPORT_C TIntCopyTwo8toOne16LE(const TDesC8 &aSource,
TUint16 &aTarget,
const TIntaIndex
)[static]

Gets 8 bit byte and copy it to the 16 bit byte with right endian.

Parameters

const TDesC8 & aSource
TUint16 & aTarget
const TInt aIndex

DecodeCbsDcs(const TUint8)

IMPORT_C TSmsDcsDecodeCbsDcs(const TUint8aDcs)[static]

Finds whether the data coding scheme, coded in CBS format, is 7-bit, 8-bit or 16-bit

Parameters

const TUint8 aDcsInput data coding scheme

FillDurationStructure(CBerTlv &, RSat::TDuration &)

IMPORT_C voidFillDurationStructure(CBerTlv &aBerTlv,
RSat::TDuration &aTDuration
)[static]

Fill in a TDuration structure

Parameters

CBerTlv & aBerTlvtlv containing duration data
RSat::TDuration & aTDurationduration structure

FillIconStructure(CBerTlv &, RSat::TIconId &, const TInt)

IMPORT_C voidFillIconStructure(CBerTlv &aBerTlv,
RSat::TIconId &aTIconId,
const TIntaItemNmb = 0
)[static]

Fill in a TIconId structure

Parameters

CBerTlv & aBerTlvdata containing icon address data
RSat::TIconId & aTIconIdicon id structure
const TInt aItemNmb = 0item number

Packed7to8Unpacked(const TPtrC8, TDes8 &)

IMPORT_C TIntPacked7to8Unpacked(const TPtrC8aSource,
TDes8 &aTarget
)[static]

Converts 7-bit packed string to 8-bit unpacked format

Parameters

const TPtrC8 aSource
TDes8 & aTargetconverted 8-bit unpacked string

RemoveWildAndExpansionDigit(const TPtrC8, TDes8 &)

IMPORT_C voidRemoveWildAndExpansionDigit(const TPtrC8aInput,
TDes8 &aOutput
)[static]

Remove Wild 'w' and Expansion digit '.' from EFadn string.

Parameters

const TPtrC8 aInputis source
TDes8 & aOutputconverted 8-bit string

SetAlphaId(const TPtrC8, TDes &)

IMPORT_C voidSetAlphaId(const TPtrC8aRawData,
TDes &aAlphaId
)[static]

Set Alpha identifier as a Unicode text string and according to the alphabet used

Parameters

const TPtrC8 aRawDatainput data that was extracted with ETLV_AlphaIdentifier
TDes & aAlphaIdoutput

SetText(CTlv &, TDes &)

IMPORT_C voidSetText(CTlv &aTextTlv,
TDes &aUnicodeOutput
)[static]

Set Text string as a Unicode text string

Parameters

CTlv & aTextTlv
TDes & aUnicodeOutput

TonAndNpi(TInt, RSat::TTypeOfNumber *, RSat::TNumberingPlan *)

IMPORT_C voidTonAndNpi(TIntaTonAndNpi,
RSat::TTypeOfNumber *aTon,
RSat::TNumberingPlan *aNpi
)[static]

Map TON and NPI to RSat TON and NPI values

Parameters

TInt aTonAndNpi
RSat::TTypeOfNumber * aTon
RSat::TNumberingPlan * aNpi

UCSToPacked7(const TPtrC, TDes8 &)

IMPORT_C voidUCSToPacked7(const TPtrCaInput,
TDes8 &aOutput
)[static]

Converts UCS2 string to 7-bit packed format

Parameters

const TPtrC aInput
TDes8 & aOutput