CSmsUserData Class Reference

class CSmsUserData : public CBase

Operations on the User Data described in TP-UD.

Inherits from

Public Member Functions
~CSmsUserData()
voidAddEmsInformationElementL(CEmsInformationElement *)
voidAppendBodyL(const TDesC8 &)
TBool ControlInformationElementWillFitL(CSmsInformationElement *)
voidDecodeL(TGsmuLex8 &)
CSmsUserData *DuplicateL(TSmsFirstOctet &, const TSmsDataCodingScheme &)
TBool EmsInformationElementWillFitL(CEmsInformationElement *, CSmsEMSBufferSegmenter &, TUint &)
TUint8 *EncodeL(TUint8 *)
voidExternalizeL(RWriteStream &)
IMPORT_C TBoolInformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier, TInt &)
voidInformationElementIndicesL(CSmsInformationElement::TSmsInformationElementIdentifier, CArrayFixFlat< TInt > &)
IMPORT_C TBoolInformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifier, TInt &)
CSmsInformationElement *&InformationElementPtr(TInt)
voidInternalizeL(RReadStream &)
TBool IsBinaryData()
IMPORT_C TBoolIsSupportedL(TChar)
IMPORT_C TBoolIsSupportedL(const TDesC &, TInt &, TInt &)
IMPORT_C TBoolIsSupportedL(const TDesC &, TSmsEncoding, TInt &, TInt &, TInt &, TInt &)
IMPORT_C TIntMaxBodyLengthInChars()
TInt MaxPackedUDUnitsInBodyRemaining()
TInt MaxPackedUDUnitsInBodyRemaining(TUint)
CSmsUserData *NewL(CCnvCharacterSetConverter &, RFs &, TSmsFirstOctet &, const TSmsDataCodingScheme &)
TInt NumInformationElements()
IMPORT_C voidRemoveInformationElement(TInt)
IMPORT_C voidSetBodyL(const TDesC8 &)
voidUpdateInformationElementArrayL(TSmsId, const TDesC8 &)
Private Member Functions
CSmsUserData(CCnvCharacterSetConverter &, RFs &, TSmsFirstOctet &, const TSmsDataCodingScheme &)
voidConstructL()
TInt HeaderLength()
voidNewBodyL(TInt)
voidSetHeaderPresent(TBool)
TInt TotalHeaderLengthInUDLUnits()
TInt TotalHeaderLengthInUDLUnits(TInt)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumanonymous { KSmsMaxUserDataLengthInChars = (KSmsMaxUserDataSize*8)/7 }
Private Attributes
HBufC8 *iBody
CCnvCharacterSetConverter &iCharacterSetConverter
const TSmsDataCodingScheme &iDataCodingScheme
TSmsFirstOctet &iFirstOctet
RFs &iFs
CArrayPtrFlat< CSmsInformationElement >iInformationElementArray

Constructor & Destructor Documentation

CSmsUserData(CCnvCharacterSetConverter &, RFs &, TSmsFirstOctet &, const TSmsDataCodingScheme &)

CSmsUserData(CCnvCharacterSetConverter &aCharacterSetConverter,
RFs &aFs,
TSmsFirstOctet &aFirstOctet,
const TSmsDataCodingScheme &aDataCodingScheme
)[private]

Parameters

CCnvCharacterSetConverter & aCharacterSetConverter
RFs & aFs
TSmsFirstOctet & aFirstOctet
const TSmsDataCodingScheme & aDataCodingScheme

~CSmsUserData()

~CSmsUserData()

Destructor.

Member Functions Documentation

AddEmsInformationElementL(CEmsInformationElement *)

voidAddEmsInformationElementL(CEmsInformationElement *aIe)

Parameters

CEmsInformationElement * aIe

AppendBodyL(const TDesC8 &)

voidAppendBodyL(const TDesC8 &aExtraBody)

Parameters

const TDesC8 & aExtraBody

ConstructL()

voidConstructL()[private]

ControlInformationElementWillFitL(CSmsInformationElement *)

TBool ControlInformationElementWillFitL(CSmsInformationElement *aIe)

Tests whether the control information element will fit in the current PDU.

Note that whilst a pointer to the aIe is passed as an input argument, the information element is still owned by the calling function, regardless of the return code.

capability
None

Parameters

CSmsInformationElement * aIe

DecodeL(TGsmuLex8 &)

voidDecodeL(TGsmuLex8 &aPdu)

Parameters

TGsmuLex8 & aPdu

DuplicateL(TSmsFirstOctet &, const TSmsDataCodingScheme &)

CSmsUserData *DuplicateL(TSmsFirstOctet &aFirstOctet,
const TSmsDataCodingScheme &aDataCodingScheme
)const

Duplicates this CSmsUserData object.

Parameters

TSmsFirstOctet & aFirstOctet
const TSmsDataCodingScheme & aDataCodingScheme

EmsInformationElementWillFitL(CEmsInformationElement *, CSmsEMSBufferSegmenter &, TUint &)

TBool EmsInformationElementWillFitL(CEmsInformationElement *aIe,
CSmsEMSBufferSegmenter &aSeg,
TUint &aCharsAddedToCurrentPDU
)

Note that whilst a pointer to the aIe is passed as an input argument, the information element is still owned by the calling function, regardless of the return code.

Parameters

CEmsInformationElement * aIe
CSmsEMSBufferSegmenter & aSeg
TUint & aCharsAddedToCurrentPDU

EncodeL(TUint8 *)

TUint8 *EncodeL(TUint8 *aPtr)const

Parameters

TUint8 * aPtr

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

HeaderLength()

TInt HeaderLength()const [private]

InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier, TInt &)

IMPORT_C TBoolInformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifieraIdentifier,
TInt &aIndex
)const

Gets the index of an information element.

Use InformationELementIndexL to get all elements.
capability
None

Parameters

CSmsInformationElement::TSmsInformationElementIdentifier aIdentifierAn information element Identifier to search for
TInt & aIndexThe index within the User Data of the information element (if found). If more than 1 instance of this information element exists, then the 1st instance will be returned.

InformationElementIndicesL(CSmsInformationElement::TSmsInformationElementIdentifier, CArrayFixFlat< TInt > &)

voidInformationElementIndicesL(CSmsInformationElement::TSmsInformationElementIdentifieraIdentifier,
CArrayFixFlat< TInt > &aIndices
)const

InformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifier, TInt &)

IMPORT_C TBoolInformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifieraIdentifier,
TInt &aIndex
)const

Gets the last index of an information element.

Use InformationELementIndexL to get all elements.
capability
None

Parameters

CSmsInformationElement::TSmsInformationElementIdentifier aIdentifierAn information element Identifier to search for
TInt & aIndexThe index within the User Data of the information element (if found). If more than 1 instance of this information element exists, then the last instance will be returned.

InformationElementPtr(TInt)

CSmsInformationElement *&InformationElementPtr(TIntaIndex)

Parameters

TInt aIndex

InternalizeL(RReadStream &)

voidInternalizeL(RReadStream &aStream)

Parameters

RReadStream & aStream

IsBinaryData()

TBool IsBinaryData()const

IsSupportedL(TChar)

IMPORT_C TBoolIsSupportedL(TCharaChar)

Tests if the character is supported by the current character set. This function can be used with 7bit and 8bit alphabets.

Note:

Since the function is based on the old behaviour (pre-PREQ2090) it does not accept a downgraded character or alternative encoding as being supported.

capability
None

Parameters

TChar aCharCharacter to investigate.

IsSupportedL(const TDesC &, TInt &, TInt &)

IMPORT_C TBoolIsSupportedL(const TDesC &aDes,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aIndexOfFirstUnconvertibleCharacter
)const

Tests if the descriptor text is supported by the current character set. This function can be used with 7bit and 8bit alphabets.

capability
None

Parameters

const TDesC & aDesText string to check.
TInt & aNumberOfUnconvertibleCharactersExit param for the number of characters unconvertible.
TInt & aIndexOfFirstUnconvertibleCharacterExit param for the first unconverted character.

IsSupportedL(const TDesC &, TSmsEncoding, TInt &, TInt &, TInt &, TInt &)

IMPORT_C TBoolIsSupportedL(const TDesC &aDes,
TSmsEncodingaEncoding,
TInt &aNumberOfUnconvertibleCharacters,
TInt &aNumberOfDowngradedCharacters,
TInt &aNumberRequiringAlternativeEncoding,
TInt &aIndexOfFirstUnconvertibleCharacter
)const

Tests if the descriptor text is supported by the current character set. This function can be used with 7bit and 8bit alphabets.

capability
None

Parameters

const TDesC & aDesText string to check.
TSmsEncoding aEncodingAlternative encoding method.
TInt & aNumberOfUnconvertibleCharactersExit param for the number of characters unconvertible.
TInt & aNumberOfDowngradedCharactersExit param for the number of downgraded characters.
TInt & aNumberRequiringAlternativeEncodingExit param for the number of characters requiring use of the alternative encoder.
TInt & aIndexOfFirstUnconvertibleCharacterExit param for the first unconverted character.

MaxBodyLengthInChars()

IMPORT_C TIntMaxBodyLengthInChars()const
capability
None

MaxPackedUDUnitsInBodyRemaining()

TInt MaxPackedUDUnitsInBodyRemaining()const

MaxPackedUDUnitsInBodyRemaining(TUint)

TInt MaxPackedUDUnitsInBodyRemaining(TUinttotalHeaderLengthInUDLUnits)const

Parameters

TUint totalHeaderLengthInUDLUnits

NewBodyL(TInt)

voidNewBodyL(TIntaLengthInChars)[private]

Parameters

TInt aLengthInChars

NewL(CCnvCharacterSetConverter &, RFs &, TSmsFirstOctet &, const TSmsDataCodingScheme &)

CSmsUserData *NewL(CCnvCharacterSetConverter &aCharacterSetConverter,
RFs &aFs,
TSmsFirstOctet &aFirstOctet,
const TSmsDataCodingScheme &aDataCodingScheme
)[static]

Parameters

CCnvCharacterSetConverter & aCharacterSetConverter
RFs & aFs
TSmsFirstOctet & aFirstOctet
const TSmsDataCodingScheme & aDataCodingScheme

NumInformationElements()

TInt NumInformationElements()const [inline]

Gets the number of information elements.

RemoveInformationElement(TInt)

IMPORT_C voidRemoveInformationElement(TIntaIndex)

Removes an information element at the specified index.

capability
None

Parameters

TInt aIndexInformation element index

SetBodyL(const TDesC8 &)

IMPORT_C voidSetBodyL(const TDesC8 &aBody)

Sets the User Data (unpacked).

capability
None

Parameters

const TDesC8 & aBodyUnpacked User Data Elements

SetHeaderPresent(TBool)

voidSetHeaderPresent(TBoolaHeaderPresent)[private]

Parameters

TBool aHeaderPresent

TotalHeaderLengthInUDLUnits()

TInt TotalHeaderLengthInUDLUnits()const [private]

TotalHeaderLengthInUDLUnits(TInt)

TInt TotalHeaderLengthInUDLUnits(TIntaIElen)const [private]

Parameters

TInt aIElen

UpdateInformationElementArrayL(TSmsId, const TDesC8 &)

voidUpdateInformationElementArrayL(TSmsIdaIdentifier,
const TDesC8 &aData
)

Either adds an information element to iInformationElementArray.

Parameters

TSmsId aIdentifierAn information element Identifier for aData
const TDesC8 & aDataThe information element to add to the User Data

Member Enumerations Documentation

Enum anonymous

Enumerators

KSmsMaxUserDataLengthInChars = (KSmsMaxUserDataSize*8)/7

Member Data Documentation

HBufC8 * iBody

HBufC8 *iBody[private]

CCnvCharacterSetConverter & iCharacterSetConverter

CCnvCharacterSetConverter &iCharacterSetConverter[private]

const TSmsDataCodingScheme & iDataCodingScheme

const TSmsDataCodingScheme &iDataCodingScheme[private]

TSmsFirstOctet & iFirstOctet

TSmsFirstOctet &iFirstOctet[private]

RFs & iFs

RFs &iFs[private]

CArrayPtrFlat< CSmsInformationElement > iInformationElementArray

CArrayPtrFlat< CSmsInformationElement >iInformationElementArray[private]