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 TBool ContainsSmsHeaderL (const CMsvStore &)
CSmsDeliver & Deliver ()
const CSmsDeliver & Deliver ()
IMPORT_C const CSmsEmailFields & EmailFields ()
IMPORT_C void ExternalizeL ( RMsvWriteStream &)
TPtrC FromAddress ()
IMPORT_C void GetSmsSettingsL ( CSmsMessageSettings &)
IMPORT_C void InternalizeL ( 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 void RestoreL ( CMsvStore &)
TPtrC ServiceCenterAddress ()
void SetBioMsgIdType ( TBioMsgIdType )
IMPORT_C void SetEmailFieldsL (const CSmsEmailFields &)
void SetForwardEmailFieldsL (const CSmsEmailFields &, const TDesC &)
void SetFromAddressL (const TDesC &)
void SetReplyEmailFieldsL (const CSmsEmailFields &, const TDesC &)
void SetReplyPathProvided ( TBool )
void SetServiceCenterAddressL (const TDesC &)
IMPORT_C void SetSmsSettingsL (const CSmsMessageSettings &)
CSmsStatusReport & StatusReport ()
const CSmsStatusReport & StatusReport ()
IMPORT_C void StoreL ( CMsvStore &)
CSmsSubmit & Submit ()
const CSmsSubmit & Submit ()
CSmsPDU::TSmsPDUType Type ()
Private Member Functions
CSmsHeader ( CSmsMessage *)
TBool CanConcatenate ()
void ConstructL ( CSmsPDU::TSmsPDUType , CEditableText &)
void ConstructL ( CSmsPDU::TSmsPDUType , CEditableText &, RFs &)
void ConstructL ()
void SetCanConcatenate ( TBool )
void SetEmailReplyForwardSubjectL ( 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
enum TSmsHeaderFlags { 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.

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.

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.

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

ConstructL(CSmsPDU::TSmsPDUType, CEditableText &)

void ConstructL ( CSmsPDU::TSmsPDUType aType,
CEditableText & aText
) [private]

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

void ConstructL ( CSmsPDU::TSmsPDUType aType,
CEditableText & aText,
RFs & aFs
) [private]

Parameters

CSmsPDU::TSmsPDUType aType
CEditableText & aText
RFs & aFs

ConstructL()

void ConstructL ( ) [private]

ContainsSmsHeaderL(const CMsvStore &)

IMPORT_C TBool ContainsSmsHeaderL ( 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.

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.

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 void ExternalizeL ( 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.

GetSmsSettingsL(CSmsMessageSettings &)

IMPORT_C void GetSmsSettingsL ( CSmsMessageSettings & aSmsSettings ) const

Parameters

CSmsMessageSettings & aSmsSettings

InternalizeL(RMsvReadStream &)

IMPORT_C void InternalizeL ( RMsvReadStream & aStream )

Parameters

RMsvReadStream & aStream

Message()

CSmsMessage & Message ( ) [inline]

Gets the SMS stack representation of the message.

CSmsMessage

Message()

const CSmsMessage & Message ( ) const [inline]

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

NewL(CSmsPDU::TSmsPDUType, CEditableText &)

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

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

IMPORT_C CSmsHeader * NewL ( CSmsPDU::TSmsPDUType aType,
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.

Recipients()

CArrayPtrFlat < CSmsNumber > & Recipients ( ) [inline]

Gets the (const) message recipients.

ReplyAddressL()

TPtrC ReplyAddressL ( ) const

ReplyPathProvided()

TBool ReplyPathProvided ( ) const [inline]

Tests if the message contains a reply path.

RestoreL(CMsvStore &)

IMPORT_C void RestoreL ( 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.

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

SetBioMsgIdType(TBioMsgIdType)

void SetBioMsgIdType ( TBioMsgIdType aBioMsgIdType = EBioMsgIdNbs ) [inline]

Sets the message's BIO message type identifier.

Parameters

TBioMsgIdType aBioMsgIdType = EBioMsgIdNbs The BIO message type identifier

SetCanConcatenate(TBool)

void SetCanConcatenate ( TBool aCanConcatenate ) [private]

Parameters

TBool aCanConcatenate

SetEmailFieldsL(const CSmsEmailFields &)

IMPORT_C void SetEmailFieldsL ( const CSmsEmailFields & aEmailFields )

Parameters

const CSmsEmailFields & aEmailFields

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

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

Parameters

CSmsEmailFields * aEmailFields
const TDesC & aSubject
const TDesC & aSubjectFormat

SetForwardEmailFieldsL(const CSmsEmailFields &, const TDesC &)

void SetForwardEmailFieldsL ( const CSmsEmailFields & aEmailFields,
const TDesC & aForwardSubjectFormat
)

Parameters

const CSmsEmailFields & aEmailFields
const TDesC & aForwardSubjectFormat

SetFromAddressL(const TDesC &)

void SetFromAddressL ( const TDesC & aAddress ) [inline]

Sets the originator address.

Parameters

const TDesC & aAddress The originator address

SetReplyEmailFieldsL(const CSmsEmailFields &, const TDesC &)

void SetReplyEmailFieldsL ( const CSmsEmailFields & aEmailFields,
const TDesC & aReplySubjectFormat
)

Parameters

const CSmsEmailFields & aEmailFields
const TDesC & aReplySubjectFormat

SetReplyPathProvided(TBool)

void SetReplyPathProvided ( TBool aReplyPathProvided ) [inline]

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

Parameters

TBool aReplyPathProvided A value of True to set the flag.

SetServiceCenterAddressL(const TDesC &)

void SetServiceCenterAddressL ( 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 & aAddress The Service Center address

SetSmsSettingsL(const CSmsMessageSettings &)

IMPORT_C void SetSmsSettingsL ( 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.

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.

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

StoreL(CMsvStore &)

IMPORT_C void StoreL ( 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.

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.

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.

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]