CSmsHeader Class Reference

class CSmsHeader : public CBase

The SMS MTM encapsulation of an SMS message.

This class allows a messaging client to access the lower-level message encapsulation used by the SMS stack.

It also provides functionality to restore and store an SMS message from/to the message store.

An SMS message is encapsulated in a Protocol Data Unit (PDU). In GSM there are six types of SMS message PDU. In the descriptions below, SC means Service Center and MS means Mobile Station (the phone).

1. SMS-DELIVER - sent from SC to MS

2. SMS-DELIVER-REPORT - sent from MS to SC

3. SMS-SUBMIT - sent from MS to SC

4. SMS-SUBMIT-REPORT - sent from SC to MS

5. SMS-STATUS-REPORT - sent from SC to MS

6. SMS-COMMAND - sent from MS to SC

Inherits from

Public Member Functions
~CSmsHeader()
TBioMsgIdType BioMsgIdType()
CSmsCommand &Command()
const CSmsCommand &Command()
IMPORT_C TBoolContainsSmsHeaderL(const CMsvStore &)
CSmsDeliver &Deliver()
const CSmsDeliver &Deliver()
IMPORT_C const CSmsEmailFields &EmailFields()
IMPORT_C voidExternalizeL(RMsvWriteStream &)
TPtrC FromAddress()
IMPORT_C voidGetSmsSettingsL(CSmsMessageSettings &)
IMPORT_C voidInternalizeL(RMsvReadStream &)
CSmsMessage &Message()
const CSmsMessage &Message()
IMPORT_C CSmsHeader *NewL(CSmsPDU::TSmsPDUType, CEditableText &)
IMPORT_C CSmsHeader *NewL(CSmsPDU::TSmsPDUType, CEditableText &, RFs &)
IMPORT_C CSmsHeader *NewL(CSmsMessage *)
const CArrayPtrFlat< CSmsNumber > &Recipients()
CArrayPtrFlat< CSmsNumber > &Recipients()
TPtrC ReplyAddressL()
TBool ReplyPathProvided()
IMPORT_C voidRestoreL(CMsvStore &)
TPtrC ServiceCenterAddress()
voidSetBioMsgIdType(TBioMsgIdType)
IMPORT_C voidSetEmailFieldsL(const CSmsEmailFields &)
voidSetForwardEmailFieldsL(const CSmsEmailFields &, const TDesC &)
voidSetFromAddressL(const TDesC &)
voidSetReplyEmailFieldsL(const CSmsEmailFields &, const TDesC &)
voidSetReplyPathProvided(TBool)
voidSetServiceCenterAddressL(const TDesC &)
IMPORT_C voidSetSmsSettingsL(const CSmsMessageSettings &)
CSmsStatusReport &StatusReport()
const CSmsStatusReport &StatusReport()
IMPORT_C voidStoreL(CMsvStore &)
CSmsSubmit &Submit()
const CSmsSubmit &Submit()
CSmsPDU::TSmsPDUType Type()
Private Member Functions
CSmsHeader(CSmsMessage *)
TBool CanConcatenate()
voidConstructL(CSmsPDU::TSmsPDUType, CEditableText &)
voidConstructL(CSmsPDU::TSmsPDUType, CEditableText &, RFs &)
voidConstructL()
voidSetCanConcatenate(TBool)
voidSetEmailReplyForwardSubjectL(CSmsEmailFields *, const TDesC &, const TDesC &)
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()
Private Member Enumerations
enumTSmsHeaderFlags { ESmsHeaderNoFlags = 0x00, ESmsHeaderReplyPathProvided = 0x01, ESmsHeaderCanConcatenate = 0x02 }
Private Attributes
TBioMsgIdType iBioMsgIdType
TBool iCloseFs
CSmsEmailFields *iEmailFields
TUint32 iFlags
RFs iFs
CSmsMessage *iMessage
CArrayPtrFlat< CSmsNumber >iRecipients

Constructor & Destructor Documentation

CSmsHeader(CSmsMessage *)

CSmsHeader(CSmsMessage *aSmsMessage = NULL)[private]

Parameters

CSmsMessage * aSmsMessage = NULL

~CSmsHeader()

IMPORT_C~CSmsHeader()

Member Functions Documentation

BioMsgIdType()

TBioMsgIdType BioMsgIdType()const [inline]

Gets the message's BIO message type identifier.

For non-BIO messages, this is EBioMsgIdNbs.

The BIO message type identifier

CanConcatenate()

TBool CanConcatenate()const [private]

Command()

CSmsCommand &Command()[inline]

Gets the message PDU for a SMS-COMMMAND type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-COMMMAND PDU object.

panic

SMCM 0 The message was not a PDU of type SMS-COMMMAND (debug only).

CSmsHeader::Type

Command()

const CSmsCommand &Command()const [inline]

Gets the (const) message PDU for a SMS-COMMMAND type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-COMMMAND PDU const object.

panic

SMCM 0 The message was not a PDU of type SMS-COMMMAND (debug only).

CSmsHeader::Type

ConstructL(CSmsPDU::TSmsPDUType, CEditableText &)

voidConstructL(CSmsPDU::TSmsPDUTypeaType,
CEditableText &aText
)[private]

Parameters

CSmsPDU::TSmsPDUType aType
CEditableText & aText

ConstructL(CSmsPDU::TSmsPDUType, CEditableText &, RFs &)

voidConstructL(CSmsPDU::TSmsPDUTypeaType,
CEditableText &aText,
RFs &aFs
)[private]

Parameters

CSmsPDU::TSmsPDUType aType
CEditableText & aText
RFs & aFs

ConstructL()

voidConstructL()[private]

ContainsSmsHeaderL(const CMsvStore &)

IMPORT_C TBoolContainsSmsHeaderL(const CMsvStore &aStore)

Parameters

const CMsvStore & aStore

Deliver()

CSmsDeliver &Deliver()[inline]

Gets the message PDU for a SMS-DELIVER type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-DELIVER PDU object.

panic

SMCM 0 The message was not a PDU of type SMS-DELIVER (debug only).

CSmsHeader::Type

Deliver()

const CSmsDeliver &Deliver()const [inline]

Gets the (const) message PDU for a SMS-DELIVER type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-DELIVER PDU const object.

panic

SMCM 0 The message was not a PDU of type SMS-DELIVER (debug only).

CSmsHeader::Type

EmailFields()

IMPORT_C const CSmsEmailFields &EmailFields()const

ExternalizeL(RMsvWriteStream &)

IMPORT_C voidExternalizeL(RMsvWriteStream &aStream)const

Parameters

RMsvWriteStream & aStream

FromAddress()

TPtrC FromAddress()const [inline]

Gets the originator address.

Only valid for SMS-DELIVER and SMS-SUBMIT type messages. With any other message types the returned originator address is empty.

The originator address.

GetSmsSettingsL(CSmsMessageSettings &)

IMPORT_C voidGetSmsSettingsL(CSmsMessageSettings &aSmsSettings)const

Parameters

CSmsMessageSettings & aSmsSettings

InternalizeL(RMsvReadStream &)

IMPORT_C voidInternalizeL(RMsvReadStream &aStream)

Parameters

RMsvReadStream & aStream

Message()

CSmsMessage &Message()[inline]

Gets the SMS stack representation of the message.

The SMS stack representation of the message

CSmsMessage

Message()

const CSmsMessage &Message()const [inline]

Gets the (const) SMS stack representation of the message.

The const SMS stack representation of the message

NewL(CSmsPDU::TSmsPDUType, CEditableText &)

IMPORT_C CSmsHeader *NewL(CSmsPDU::TSmsPDUTypeaType,
CEditableText &aText
)[static]

Parameters

CSmsPDU::TSmsPDUType aType
CEditableText & aText

NewL(CSmsPDU::TSmsPDUType, CEditableText &, RFs &)

IMPORT_C CSmsHeader *NewL(CSmsPDU::TSmsPDUTypeaType,
CEditableText &aText,
RFs &aFs
)[static]

Parameters

CSmsPDU::TSmsPDUType aType
CEditableText & aText
RFs & aFs

NewL(CSmsMessage *)

IMPORT_C CSmsHeader *NewL(CSmsMessage *aMessage)[static]

Parameters

CSmsMessage * aMessage

Recipients()

const CArrayPtrFlat< CSmsNumber > &Recipients()const [inline]

Gets the (const) message recipients.

The const array of message recipients

Recipients()

CArrayPtrFlat< CSmsNumber > &Recipients()[inline]

Gets the (const) message recipients.

The array of message recipients

ReplyAddressL()

TPtrC ReplyAddressL()const

ReplyPathProvided()

TBool ReplyPathProvided()const [inline]

Tests if the message contains a reply path.

A value of True if the message contains a reply path.

RestoreL(CMsvStore &)

IMPORT_C voidRestoreL(CMsvStore &aStore)

Parameters

CMsvStore & aStore

ServiceCenterAddress()

TPtrC ServiceCenterAddress()const [inline]

Gets the message's service center address.

This can only be used on SMS-SUBMIT type messages. The message PDU type can be checked by using the CSmsHeader::Type API.

The Service Center address.

panic

SMCM 0 The message was not a PDU of type SMS-SUBMIT (debug only).

CSmsHeader::Type

SetBioMsgIdType(TBioMsgIdType)

voidSetBioMsgIdType(TBioMsgIdTypeaBioMsgIdType = EBioMsgIdNbs)[inline]

Sets the message's BIO message type identifier.

Parameters

TBioMsgIdType aBioMsgIdType = EBioMsgIdNbsThe BIO message type identifier

SetCanConcatenate(TBool)

voidSetCanConcatenate(TBoolaCanConcatenate)[private]

Parameters

TBool aCanConcatenate

SetEmailFieldsL(const CSmsEmailFields &)

IMPORT_C voidSetEmailFieldsL(const CSmsEmailFields &aEmailFields)

Parameters

const CSmsEmailFields & aEmailFields

SetEmailReplyForwardSubjectL(CSmsEmailFields *, const TDesC &, const TDesC &)

voidSetEmailReplyForwardSubjectL(CSmsEmailFields *aEmailFields,
const TDesC &aSubject,
const TDesC &aSubjectFormat
)[private]

Parameters

CSmsEmailFields * aEmailFields
const TDesC & aSubject
const TDesC & aSubjectFormat

SetForwardEmailFieldsL(const CSmsEmailFields &, const TDesC &)

voidSetForwardEmailFieldsL(const CSmsEmailFields &aEmailFields,
const TDesC &aForwardSubjectFormat
)

Parameters

const CSmsEmailFields & aEmailFields
const TDesC & aForwardSubjectFormat

SetFromAddressL(const TDesC &)

voidSetFromAddressL(const TDesC &aAddress)[inline]

Sets the originator address.

Parameters

const TDesC & aAddressThe originator address

SetReplyEmailFieldsL(const CSmsEmailFields &, const TDesC &)

voidSetReplyEmailFieldsL(const CSmsEmailFields &aEmailFields,
const TDesC &aReplySubjectFormat
)

Parameters

const CSmsEmailFields & aEmailFields
const TDesC & aReplySubjectFormat

SetReplyPathProvided(TBool)

voidSetReplyPathProvided(TBoolaReplyPathProvided)[inline]

Set the message flag that indicates whether it contains a reply path.

Parameters

TBool aReplyPathProvidedA value of True to set the flag.

SetServiceCenterAddressL(const TDesC &)

voidSetServiceCenterAddressL(const TDesC &aAddress)[inline]

Sets the message's service center address.

This can only be used on SMS-SUBMIT type messages. The message PDU type can be checked by using the CSmsHeader::Type API.

panic

SMCM 0 The message was not a PDU of type SMS-SUBMIT (debug only).

CSmsHeader::Type

Parameters

const TDesC & aAddressThe Service Center address

SetSmsSettingsL(const CSmsMessageSettings &)

IMPORT_C voidSetSmsSettingsL(const CSmsMessageSettings &aSmsSettings)

Parameters

const CSmsMessageSettings & aSmsSettings

StatusReport()

CSmsStatusReport &StatusReport()[inline]

Gets the message PDU for a SMS-STATUS-REPORT type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-STATUS-REPORT PDU object.

panic

SMCM 0 The message was not a PDU of type SMS-STATUS-REPORT (debug only).

CSmsHeader::Type

StatusReport()

const CSmsStatusReport &StatusReport()const [inline]

Gets the (const) message PDU for a SMS-STATUS-REPORT type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-STATUS-REPORT PDU const object.

panic

SMCM 0 The message was not a PDU of type SMS-STATUS-REPORT (debug only).

CSmsHeader::Type

StoreL(CMsvStore &)

IMPORT_C voidStoreL(CMsvStore &aStore)const

Parameters

CMsvStore & aStore

Submit()

CSmsSubmit &Submit()[inline]

Gets the message PDU for a SMS-SUBMIT type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-SUBMIT PDU object.

panic

SMCM 0 The message was not a PDU of type SMS-SUBMIT (debug only).

CSmsHeader::Type

Submit()

const CSmsSubmit &Submit()const [inline]

Gets the (const) message PDU for a SMS-SUBMIT type message.

The message PDU type can be checked by using the CSmsHeader::Type API.

The SMS-SUBMIT PDU const object.

panic

SMCM 0 The message was not a PDU of type SMS-SUBMIT (debug only).

CSmsHeader::Type

Type()

CSmsPDU::TSmsPDUType Type()const [inline]

Gets the message PDU type.

There are six types of PDU - SMS-DELIVER, SMS-DELIVER-REPORT, SMS-SUBMIT, SMS-SUBMIT-REPORT, SMS-STATUS-REPORT and SMS-COMMAND.

There is access to only to SMS-DELIVER, SMS-SUBMIT, SMS-STATUS-REPORT and SMS-COMMAND PDUs via the CSmsHeader encapsulation.

The message PDU type.

CSmsPDU::TSmsPDUType

Member Enumerations Documentation

Enum TSmsHeaderFlags

Enumerators

ESmsHeaderNoFlags = 0x00
ESmsHeaderReplyPathProvided = 0x01
ESmsHeaderCanConcatenate = 0x02

Member Data Documentation

TBioMsgIdType iBioMsgIdType

TBioMsgIdType iBioMsgIdType[private]

TBool iCloseFs

TBool iCloseFs[private]

CSmsEmailFields * iEmailFields

CSmsEmailFields *iEmailFields[private]

TUint32 iFlags

TUint32 iFlags[private]

RFs iFs

RFs iFs[private]

CSmsMessage * iMessage

CSmsMessage *iMessage[private]

CArrayPtrFlat< CSmsNumber > iRecipients

CArrayPtrFlat< CSmsNumber >iRecipients[private]