CSmsPDU Class Reference

class CSmsPDU : public CBase

A generic interface to a GSM SMS PDU.

The class can be used on its own to encode GSM SMS PDUs. It is also the base class for the six real implementations of GSM SMS PDUs. The derived classes are built up from the elements defined in gsmuelem.h according to the ETSI GSM 03.40. All the SMS elements have generic encode and decode functions so that each PDU type knows how to encode and decode itself into a TGsmSms.

CSmsPDU and derived classes provide a human readable interface to a GSM SMS PDU, for example setting the destination address on a SUBMIT (CSmsSubmit). All the factory functions for CSmsPDUs are provided in the base class.

Inherits from

Public Member Functions
IMPORT_C TSmsDataCodingScheme::TSmsAlphabetAlphabet()
IMPORT_C TBoolApplicationPortAddressing(TInt &, TInt &, TBool *)
IMPORT_C TSmsDataCodingScheme::TSmsDCSBits7To4Bits7To4()
IMPORT_C TBoolClass(TSmsDataCodingScheme::TSmsClass &)
IMPORT_C TIntConcatenatedMessagePDUIndex()
IMPORT_C TIntConcatenatedMessageReference()
IMPORT_C TBoolDataCodingSchemePresent()
voidDecodeL(TGsmuLex8 &)
IMPORT_C CSmsPDU *DuplicateL()
IMPORT_C voidEncodeMessagePDUL(TGsmSms &)
voidEncodeMessagePDUL(TGsmSms &, const TEncodeParams *)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C TSmsDataCodingScheme::TSmsIndicationStateIndicationState()
IMPORT_C TSmsDataCodingScheme::TSmsIndicationTypeIndicationType()
IMPORT_C TSmsEncodingNationalLanguageEncoding()
IMPORT_C CSmsPDU *NewL(RReadStream &, CCnvCharacterSetConverter &, RFs &)
IMPORT_C CSmsPDU *NewL(const TGsmSms &, CCnvCharacterSetConverter &, RFs &, TBool, TBool)
IMPORT_C CSmsPDU *NewL(TSmsPDUType, CCnvCharacterSetConverter &, RFs &, TBool)
IMPORT_C TIntNumConcatenatedMessagePDUs()
IMPORT_C TSmsProtocolIdentifier::TSmsPIDTypePIDType()
IMPORT_C voidParsedServiceCenterAddress(TGsmSmsTelNumber &)
IMPORT_C voidParsedToFromAddress(TGsmSmsTelNumber &)
IMPORT_C TBoolProtocolIdentifierPresent()
IMPORT_C TPtrCServiceCenterAddress()
IMPORT_C voidSetAlphabet(TSmsDataCodingScheme::TSmsAlphabet)
IMPORT_C voidSetApplicationPortAddressingL(TBool, TInt, TInt, TBool)
IMPORT_C voidSetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4)
IMPORT_C voidSetClass(TBool, TSmsDataCodingScheme::TSmsClass)
IMPORT_C voidSetConcatenatedMessagePDUIndex(TInt)
IMPORT_C voidSetConcatenatedMessageReference(TInt)
IMPORT_C voidSetDataCodingSchemePresent(TBool)
IMPORT_C voidSetIndicationState(TSmsDataCodingScheme::TSmsIndicationState)
IMPORT_C voidSetIndicationType(TSmsDataCodingScheme::TSmsIndicationType)
IMPORT_C voidSetNationalLanguageEncodingL(TSmsEncoding)
IMPORT_C voidSetNumConcatenatedMessagePDUs(TInt)
IMPORT_C voidSetPIDType(TSmsProtocolIdentifier::TSmsPIDType)
IMPORT_C voidSetParsedServiceCenterAddressL(const TGsmSmsTelNumber &)
IMPORT_C voidSetParsedToFromAddressL(const TGsmSmsTelNumber &)
IMPORT_C voidSetProtocolIdentifierPresent(TBool)
IMPORT_C voidSetServiceCenterAddressL(const TDesC &)
IMPORT_C voidSetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageType)
IMPORT_C voidSetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator)
IMPORT_C voidSetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceType)
IMPORT_C voidSetTextCompressed(TBool)
IMPORT_C voidSetTextConcatenatedL(TBool, TBool)
IMPORT_C voidSetToFromAddressL(const TDesC &)
IMPORT_C voidSetUserDataPresent(TBool)
IMPORT_C TSmsProtocolIdentifier::TSmsShortMessageTypeShortMessageType()
IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceIndicatorTelematicDeviceIndicator()
IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceTypeTelematicDeviceType()
IMPORT_C TBoolTextCompressed()
IMPORT_C TBoolTextConcatenated(TBool *)
IMPORT_C TPtrCToFromAddress()
TSmsPDUType Type()
voidUpdateConcatenationDataL(TInt, TInt, TInt)
voidUpdateEmailHeaderDataL(TInt &)
TBool UpdateSMSCCtrlParameterL(const TUint8)
TBool UpdateTPSRRL(TSmsFirstOctet)
IMPORT_C CSmsUserData &UserData()
IMPORT_C const CSmsUserData &UserData()
IMPORT_C TBoolUserDataPresent()
Protected Member Functions
CSmsPDU(TSmsPDUType)
voidConstructL(CCnvCharacterSetConverter &, RFs &)
const TSmsDataCodingScheme *DataCodingScheme()
TUint8 *EncodeL(TUint8 *)
TUint8 *EncodeL(TUint8 *, const TEncodeParams *)
voidExternalizeMessagePDUL(RWriteStream &)
voidInternalizeMessagePDUL(RReadStream &)
const TSmsParameterIndicator *ParameterIndicator()
const TSmsProtocolIdentifier *ProtocolIdentifier()
const CSmsAddress *ToFromAddressPtr()
const CSmsUserData *UserDataPtr()
Private Member Functions
TBool DoApplicationPortAddressing(TInt &, TInt &, TInt &, TBool *)
voidDoSetApplicationPortAddressingL(TInt, TInt, TBool)
voidDoSetTextConcatenatedL(TBool)
TBool DoTextConcatenated(TInt &, TBool *)
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
enumTSmsPDUType {
ESmsDeliver = 0, ESmsDeliverReport = 1, ESmsSubmit = 2, ESmsSubmitReport = 3, ESmsStatusReport = 4, ESmsCommand = 5
}
Protected Attributes
CSmsAddress *iServiceCenterAddress
Private Attributes
const TSmsPDUTypeiSmsPDUType

Constructor & Destructor Documentation

CSmsPDU(TSmsPDUType)

CSmsPDU(TSmsPDUTypeaSmsPDUType)[protected]

Parameters

TSmsPDUType aSmsPDUType

Member Functions Documentation

Alphabet()

IMPORT_C TSmsDataCodingScheme::TSmsAlphabetAlphabet()const

ApplicationPortAddressing(TInt &, TInt &, TBool *)

IMPORT_C TBoolApplicationPortAddressing(TInt &aDestination,
TInt &aOriginator,
TBool *aIs16Bit = NULL
)const

Parameters

TInt & aDestination
TInt & aOriginator
TBool * aIs16Bit = NULL

Bits7To4()

IMPORT_C TSmsDataCodingScheme::TSmsDCSBits7To4Bits7To4()const

Class(TSmsDataCodingScheme::TSmsClass &)

IMPORT_C TBoolClass(TSmsDataCodingScheme::TSmsClass &aClass)const

ConcatenatedMessagePDUIndex()

IMPORT_C TIntConcatenatedMessagePDUIndex()const

ConcatenatedMessageReference()

IMPORT_C TIntConcatenatedMessageReference()const

ConstructL(CCnvCharacterSetConverter &, RFs &)

voidConstructL(CCnvCharacterSetConverter &aCharacterSetConverter,
RFs &aFs
)[protected, pure virtual]

Parameters

CCnvCharacterSetConverter & aCharacterSetConverter
RFs & aFs

DataCodingScheme()

const TSmsDataCodingScheme *DataCodingScheme()const [protected, virtual]

DataCodingSchemePresent()

IMPORT_C TBoolDataCodingSchemePresent()const

DecodeL(TGsmuLex8 &)

voidDecodeL(TGsmuLex8 &aPdu)[pure virtual]

Parameters

TGsmuLex8 & aPdu

DoApplicationPortAddressing(TInt &, TInt &, TInt &, TBool *)

TBool DoApplicationPortAddressing(TInt &aIndex,
TInt &aDestination,
TInt &aOriginator,
TBool *aIs16Bit
)const [private]

Parameters

TInt & aIndex
TInt & aDestination
TInt & aOriginator
TBool * aIs16Bit

DoSetApplicationPortAddressingL(TInt, TInt, TBool)

voidDoSetApplicationPortAddressingL(TIntaDestination,
TIntaOriginator,
TBoolaIs16Bit
)[private]

Parameters

TInt aDestination
TInt aOriginator
TBool aIs16Bit

DoSetTextConcatenatedL(TBool)

voidDoSetTextConcatenatedL(TBoolaIs16Bit)[private]

Parameters

TBool aIs16Bit

DoTextConcatenated(TInt &, TBool *)

TBool DoTextConcatenated(TInt &aIndex,
TBool *aIs16Bit
)const [private]

Parameters

TInt & aIndex
TBool * aIs16Bit

DuplicateL()

IMPORT_C CSmsPDU *DuplicateL()const

EncodeL(TUint8 *)

TUint8 *EncodeL(TUint8 *aPtr)const [protected, pure virtual]

Parameters

TUint8 * aPtr

EncodeL(TUint8 *, const TEncodeParams *)

TUint8 *EncodeL(TUint8 *aPtr,
const TEncodeParams *aEncodeParams
)const [protected, pure virtual]

Parameters

TUint8 * aPtr
const TEncodeParams * aEncodeParams

EncodeMessagePDUL(TGsmSms &)

IMPORT_C voidEncodeMessagePDUL(TGsmSms &aGsmSms)const

Parameters

TGsmSms & aGsmSms

EncodeMessagePDUL(TGsmSms &, const TEncodeParams *)

voidEncodeMessagePDUL(TGsmSms &aGsmSms,
const TEncodeParams *aEncodeParams
)const

Parameters

TGsmSms & aGsmSms
const TEncodeParams * aEncodeParams

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Parameters

RWriteStream & aStream

ExternalizeMessagePDUL(RWriteStream &)

voidExternalizeMessagePDUL(RWriteStream &aStream)const [protected, pure virtual]

Parameters

RWriteStream & aStream

IndicationState()

IMPORT_C TSmsDataCodingScheme::TSmsIndicationStateIndicationState()const

IndicationType()

IMPORT_C TSmsDataCodingScheme::TSmsIndicationTypeIndicationType()const

InternalizeMessagePDUL(RReadStream &)

voidInternalizeMessagePDUL(RReadStream &aStream)[protected, pure virtual]

Parameters

RReadStream & aStream

NationalLanguageEncoding()

IMPORT_C TSmsEncodingNationalLanguageEncoding()const

NewL(RReadStream &, CCnvCharacterSetConverter &, RFs &)

IMPORT_C CSmsPDU *NewL(RReadStream &aStream,
CCnvCharacterSetConverter &aCharacterSetConverter,
RFs &aFs
)[static]

Parameters

RReadStream & aStream
CCnvCharacterSetConverter & aCharacterSetConverter
RFs & aFs

NewL(const TGsmSms &, CCnvCharacterSetConverter &, RFs &, TBool, TBool)

IMPORT_C CSmsPDU *NewL(const TGsmSms &aGsmSms,
CCnvCharacterSetConverter &aCharacterSetConverter,
RFs &aFs,
TBoolaIsRPError = EFalse,
TBoolaIsMobileTerminated = ETrue
)[static]

Parameters

const TGsmSms & aGsmSms
CCnvCharacterSetConverter & aCharacterSetConverter
RFs & aFs
TBool aIsRPError = EFalse
TBool aIsMobileTerminated = ETrue

NewL(TSmsPDUType, CCnvCharacterSetConverter &, RFs &, TBool)

IMPORT_C CSmsPDU *NewL(TSmsPDUTypeaType,
CCnvCharacterSetConverter &aCharacterSetConverter,
RFs &aFs,
TBoolaIsRPError = EFalse
)[static]

Parameters

TSmsPDUType aType
CCnvCharacterSetConverter & aCharacterSetConverter
RFs & aFs
TBool aIsRPError = EFalse

NumConcatenatedMessagePDUs()

IMPORT_C TIntNumConcatenatedMessagePDUs()const

PIDType()

IMPORT_C TSmsProtocolIdentifier::TSmsPIDTypePIDType()const

ParameterIndicator()

const TSmsParameterIndicator *ParameterIndicator()const [protected, virtual]

ParsedServiceCenterAddress(TGsmSmsTelNumber &)

IMPORT_C voidParsedServiceCenterAddress(TGsmSmsTelNumber &aParsedAddress)const

Parameters

TGsmSmsTelNumber & aParsedAddress

ParsedToFromAddress(TGsmSmsTelNumber &)

IMPORT_C voidParsedToFromAddress(TGsmSmsTelNumber &aParsedAddress)const

Parameters

TGsmSmsTelNumber & aParsedAddress

ProtocolIdentifier()

const TSmsProtocolIdentifier *ProtocolIdentifier()const [protected, virtual]

ProtocolIdentifierPresent()

IMPORT_C TBoolProtocolIdentifierPresent()const

ServiceCenterAddress()

IMPORT_C TPtrCServiceCenterAddress()const

SetAlphabet(TSmsDataCodingScheme::TSmsAlphabet)

IMPORT_C voidSetAlphabet(TSmsDataCodingScheme::TSmsAlphabetaAlphabet)

SetApplicationPortAddressingL(TBool, TInt, TInt, TBool)

IMPORT_C voidSetApplicationPortAddressingL(TBoolaAddressing,
TIntaDestination,
TIntaOriginator,
TBoolaIs16Bit = EFalse
)

Parameters

TBool aAddressing
TInt aDestination
TInt aOriginator
TBool aIs16Bit = EFalse

SetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4)

IMPORT_C voidSetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4aBits7To4)

SetClass(TBool, TSmsDataCodingScheme::TSmsClass)

IMPORT_C voidSetClass(TBoolaClassDefined,
TSmsDataCodingScheme::TSmsClassaClass
)

Parameters

TBool aClassDefined
TSmsDataCodingScheme::TSmsClass aClass

SetConcatenatedMessagePDUIndex(TInt)

IMPORT_C voidSetConcatenatedMessagePDUIndex(TIntaIndex)

Parameters

TInt aIndex

SetConcatenatedMessageReference(TInt)

IMPORT_C voidSetConcatenatedMessageReference(TIntaReference)

Parameters

TInt aReference

SetDataCodingSchemePresent(TBool)

IMPORT_C voidSetDataCodingSchemePresent(TBoolaPresent)

Parameters

TBool aPresent

SetIndicationState(TSmsDataCodingScheme::TSmsIndicationState)

IMPORT_C voidSetIndicationState(TSmsDataCodingScheme::TSmsIndicationStateaState)

SetIndicationType(TSmsDataCodingScheme::TSmsIndicationType)

IMPORT_C voidSetIndicationType(TSmsDataCodingScheme::TSmsIndicationTypeaType)

SetNationalLanguageEncodingL(TSmsEncoding)

IMPORT_C voidSetNationalLanguageEncodingL(TSmsEncodingaEncoding)

Parameters

TSmsEncoding aEncoding

SetNumConcatenatedMessagePDUs(TInt)

IMPORT_C voidSetNumConcatenatedMessagePDUs(TIntaNum)

Parameters

TInt aNum

SetPIDType(TSmsProtocolIdentifier::TSmsPIDType)

IMPORT_C voidSetPIDType(TSmsProtocolIdentifier::TSmsPIDTypeaSmsPIDType)

SetParsedServiceCenterAddressL(const TGsmSmsTelNumber &)

IMPORT_C voidSetParsedServiceCenterAddressL(const TGsmSmsTelNumber &aParsedAddress)

Parameters

const TGsmSmsTelNumber & aParsedAddress

SetParsedToFromAddressL(const TGsmSmsTelNumber &)

IMPORT_C voidSetParsedToFromAddressL(const TGsmSmsTelNumber &aParsedAddress)

Parameters

const TGsmSmsTelNumber & aParsedAddress

SetProtocolIdentifierPresent(TBool)

IMPORT_C voidSetProtocolIdentifierPresent(TBoolaPresent)

Parameters

TBool aPresent

SetServiceCenterAddressL(const TDesC &)

IMPORT_C voidSetServiceCenterAddressL(const TDesC &aAddress)

Parameters

const TDesC & aAddress

SetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageType)

IMPORT_C voidSetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageTypeaShortMessageType)

SetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator)

IMPORT_C voidSetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicatoraIndicator)

SetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceType)

IMPORT_C voidSetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceTypeaDeviceType)

SetTextCompressed(TBool)

IMPORT_C voidSetTextCompressed(TBoolaCompressed)

Parameters

TBool aCompressed

SetTextConcatenatedL(TBool, TBool)

IMPORT_C voidSetTextConcatenatedL(TBoolaConcatenated,
TBoolaIs16Bit = EFalse
)

Parameters

TBool aConcatenated
TBool aIs16Bit = EFalse

SetToFromAddressL(const TDesC &)

IMPORT_C voidSetToFromAddressL(const TDesC &aAddress)

Parameters

const TDesC & aAddress

SetUserDataPresent(TBool)

IMPORT_C voidSetUserDataPresent(TBoolaPresent)

Parameters

TBool aPresent

ShortMessageType()

IMPORT_C TSmsProtocolIdentifier::TSmsShortMessageTypeShortMessageType()const

TelematicDeviceIndicator()

IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceIndicatorTelematicDeviceIndicator()const

TelematicDeviceType()

IMPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceTypeTelematicDeviceType()const

TextCompressed()

IMPORT_C TBoolTextCompressed()const

TextConcatenated(TBool *)

IMPORT_C TBoolTextConcatenated(TBool *aIs16Bit = NULL)const

Parameters

TBool * aIs16Bit = NULL

ToFromAddress()

IMPORT_C TPtrCToFromAddress()const

ToFromAddressPtr()

const CSmsAddress *ToFromAddressPtr()const [protected, virtual]

Type()

TSmsPDUType Type()const [inline]

UpdateConcatenationDataL(TInt, TInt, TInt)

voidUpdateConcatenationDataL(TIntaRef,
TIntaPduIndex,
TIntaMaxPdu
)

Parameters

TInt aRef
TInt aPduIndex
TInt aMaxPdu

UpdateEmailHeaderDataL(TInt &)

voidUpdateEmailHeaderDataL(TInt &aEmailOverallHeaderLength)

Parameters

TInt & aEmailOverallHeaderLength

UpdateSMSCCtrlParameterL(const TUint8)

TBool UpdateSMSCCtrlParameterL(const TUint8aOctet)

Parameters

const TUint8 aOctet

UpdateTPSRRL(TSmsFirstOctet)

TBool UpdateTPSRRL(TSmsFirstOctetaSmsReportRequest)

Parameters

TSmsFirstOctet aSmsReportRequest

UserData()

IMPORT_C CSmsUserData &UserData()

UserData()

IMPORT_C const CSmsUserData &UserData()const

UserDataPresent()

IMPORT_C TBoolUserDataPresent()const

UserDataPtr()

const CSmsUserData *UserDataPtr()const [protected, virtual]

Member Enumerations Documentation

Enum TSmsPDUType

Flags for the 6 basic PDU types in GSM SMS messaging.

Enumerators

ESmsDeliver = 0
ESmsDeliverReport = 1
ESmsSubmit = 2
ESmsSubmitReport = 3
ESmsStatusReport = 4
ESmsCommand = 5

Member Data Documentation

CSmsAddress * iServiceCenterAddress

CSmsAddress *iServiceCenterAddress[protected]

const TSmsPDUType iSmsPDUType

const TSmsPDUTypeiSmsPDUType[private]