CSmsUserData Class Reference

class CSmsUserData : public CBase

Operations on the User Data described in TP-UD.

Inherits from

Public Member Functions
~CSmsUserData ()
void AddEmsInformationElementL ( CEmsInformationElement *)
void AppendBodyL (const TDesC8 &)
TBool ControlInformationElementWillFitL ( CSmsInformationElement *)
void DecodeL ( TGsmuLex8 &)
CSmsUserData * DuplicateL ( TSmsFirstOctet &, const TSmsDataCodingScheme &)
TBool EmsInformationElementWillFitL ( CEmsInformationElement *, CSmsEMSBufferSegmenter &, TUint &)
TUint8 * EncodeL ( TUint8 *)
void ExternalizeL ( RWriteStream &)
IMPORT_C TBool InformationElementIndex ( CSmsInformationElement::TSmsInformationElementIdentifier , TInt &)
void InformationElementIndicesL ( CSmsInformationElement::TSmsInformationElementIdentifier , CArrayFixFlat < TInt > &)
IMPORT_C TBool InformationElementLastIndex ( CSmsInformationElement::TSmsInformationElementIdentifier , TInt &)
CSmsInformationElement *& InformationElementPtr ( TInt )
void InternalizeL ( RReadStream &)
TBool IsBinaryData ()
IMPORT_C TBool IsSupportedL ( TChar )
IMPORT_C TBool IsSupportedL (const TDesC &, TInt &, TInt &)
IMPORT_C TBool IsSupportedL (const TDesC &, TSmsEncoding , TInt &, TInt &, TInt &, TInt &)
IMPORT_C TInt MaxBodyLengthInChars ()
TInt MaxPackedUDUnitsInBodyRemaining ()
TInt MaxPackedUDUnitsInBodyRemaining ( TUint )
CSmsUserData * NewL ( CCnvCharacterSetConverter &, RFs &, TSmsFirstOctet &, const TSmsDataCodingScheme &)
TInt NumInformationElements ()
IMPORT_C void RemoveInformationElement ( TInt )
IMPORT_C void SetBodyL (const TDesC8 &)
void UpdateInformationElementArrayL ( TSmsId , const TDesC8 &)
Private Member Functions
CSmsUserData ( CCnvCharacterSetConverter &, RFs &, TSmsFirstOctet &, const TSmsDataCodingScheme &)
void ConstructL ()
TInt HeaderLength ()
void NewBodyL ( TInt )
void SetHeaderPresent ( 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
enum anonymous { 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 *)

void AddEmsInformationElementL ( CEmsInformationElement * aIe )

Parameters

CEmsInformationElement * aIe

AppendBodyL(const TDesC8 &)

void AppendBodyL ( const TDesC8 & aExtraBody )

Parameters

const TDesC8 & aExtraBody

ConstructL()

void ConstructL ( ) [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 &)

void DecodeL ( 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 &)

void ExternalizeL ( RWriteStream & aStream ) const

Parameters

RWriteStream & aStream

HeaderLength()

TInt HeaderLength ( ) const [private]

InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier, TInt &)

IMPORT_C TBool InformationElementIndex ( CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,
TInt & aIndex
) const

Gets the index of an information element.

Use InformationELementIndexL to get all elements.
capability
None

Parameters

CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier An information element Identifier to search for
TInt & aIndex The 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 > &)

void InformationElementIndicesL ( CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,
CArrayFixFlat < TInt > & aIndices
) const

InformationElementLastIndex(CSmsInformationElement::TSmsInformationElementIdentifier, TInt &)

IMPORT_C TBool InformationElementLastIndex ( CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier,
TInt & aIndex
) const

Gets the last index of an information element.

Use InformationELementIndexL to get all elements.
capability
None

Parameters

CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier An information element Identifier to search for
TInt & aIndex The 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 ( TInt aIndex )

Parameters

TInt aIndex

InternalizeL(RReadStream &)

void InternalizeL ( RReadStream & aStream )

Parameters

RReadStream & aStream

IsBinaryData()

TBool IsBinaryData ( ) const

IsSupportedL(TChar)

IMPORT_C TBool IsSupportedL ( TChar aChar )

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 aChar Character to investigate.

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

IMPORT_C TBool IsSupportedL ( 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 & aDes Text string to check.
TInt & aNumberOfUnconvertibleCharacters Exit param for the number of characters unconvertible.
TInt & aIndexOfFirstUnconvertibleCharacter Exit param for the first unconverted character.

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

IMPORT_C TBool IsSupportedL ( const TDesC & aDes,
TSmsEncoding aEncoding,
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 & aDes Text string to check.
TSmsEncoding aEncoding Alternative encoding method.
TInt & aNumberOfUnconvertibleCharacters Exit param for the number of characters unconvertible.
TInt & aNumberOfDowngradedCharacters Exit param for the number of downgraded characters.
TInt & aNumberRequiringAlternativeEncoding Exit param for the number of characters requiring use of the alternative encoder.
TInt & aIndexOfFirstUnconvertibleCharacter Exit param for the first unconverted character.

MaxBodyLengthInChars()

IMPORT_C TInt MaxBodyLengthInChars ( ) const
capability
None

MaxPackedUDUnitsInBodyRemaining()

TInt MaxPackedUDUnitsInBodyRemaining ( ) const

MaxPackedUDUnitsInBodyRemaining(TUint)

TInt MaxPackedUDUnitsInBodyRemaining ( TUint totalHeaderLengthInUDLUnits ) const

Parameters

TUint totalHeaderLengthInUDLUnits

NewBodyL(TInt)

void NewBodyL ( TInt aLengthInChars ) [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 void RemoveInformationElement ( TInt aIndex )

Removes an information element at the specified index.

capability
None

Parameters

TInt aIndex Information element index

SetBodyL(const TDesC8 &)

IMPORT_C void SetBodyL ( const TDesC8 & aBody )

Sets the User Data (unpacked).

capability
None

Parameters

const TDesC8 & aBody Unpacked User Data Elements

SetHeaderPresent(TBool)

void SetHeaderPresent ( TBool aHeaderPresent ) [private]

Parameters

TBool aHeaderPresent

TotalHeaderLengthInUDLUnits()

TInt TotalHeaderLengthInUDLUnits ( ) const [private]

TotalHeaderLengthInUDLUnits(TInt)

TInt TotalHeaderLengthInUDLUnits ( TInt aIElen ) const [private]

Parameters

TInt aIElen

UpdateInformationElementArrayL(TSmsId, const TDesC8 &)

void UpdateInformationElementArrayL ( TSmsId aIdentifier,
const TDesC8 & aData
)

Either adds an information element to iInformationElementArray.

Parameters

TSmsId aIdentifier An information element Identifier for aData
const TDesC8 & aData The 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]