EPOC   SDK Home Glossary Indexes Previous Next Up

TSms class


Contents


TSms class — SMS message abstraction

Section Contents


Overview

Derivation

TSms

Abstraction: SMS messaging

Defined in

etelbgsm.h

Link against

etelgsm.lib

Description

This class defines the SMS message abstraction. The class manipulates SMS messages in the PDU message format and the Text message format.

Writing derived classes

This class is not intended for user derivation.


Construction and destruction


TSms() — Trivial default C++ constructor

TSms();

Description

The default C++ constructor constructs an empty PDU SMS message.


TSms() — C++ constructor [with message format]

TSms(const TFormat aFormat);

Description

The C++ constructor constructs an empty SMS message, taking the format — PDU or Text — from the argument.

Arguments

const TFormat aFormat

The format of the SMS message; PDU or Text.


TSms() — C++ constructor [with PDU message]

TSms(const TPdu& aPdu);

Description

The C++ constructor builds a PDU format message, taking the message information from the argument.

Arguments

const TPdu& aPdu

The PDU format message.


TSms() — C++ constructor [with Text message]

TSms(const TSubmit& aText);

Description

The C++ constructor builds a text format message for sending — i.e. a message of the submit type.

Arguments

const TSubmit& aText

The text format message.


TSms() — C++ constructor [with SMS command message]

TSms(const TCommand& aCommand);

Description

The C++ constructor builds a text format message containing an SMS command.

Arguments

const TCommand& aCommand

The SMS command.


Message formatting functions


SetFormat() — Change the message format

void SetFormat(const TFormat aFormat);

Description

This function changes the format of the SMS message.

Arguments

const TFormat aFormat

The new format of the SMS message; PDU or text.


SetUseDefaultSca() — Set message to use default service centre address

void SetUseDefaultSca(const TBool& aUseDefaultSca);

Description

This function defines whether or not the message uses the default Service Centre Address.

Arguments

const TBool& aUseDefaultSca

If true, use the default service centre address.


SetPduL() — Write a PDU message

void SetPduL(const TPdu& aPdu);

Description

This function copies PDU message data into the TSms object.

Arguments

const TPdu& aPdu

The PDU format message.


SetTextL() — Write a text submit message

void SetTextL(const TSubmit& aText);

Description

This function copies Text submit message data into the TSms object.

Arguments

const TSubmit& aText

The Text submit format message.


SetTextL() — Write a text command message

void SetTextL(const TCommand& aCommand);

Description

This function copies Text Command message data into the TSms object.

Arguments

const TCommand& aCommand

The Text command message


Retrieve message functions


Format() — Get the current message format

TFormat Format() const;

Description

This function returns the current format of the message.

Return value

TFormat

The current message format; PDU or Text.


UseDefaultSca() — Get message default service centre status

TBool UseDefaultSca() const;

Description

This function returns the current status of whether the message uses the default service centre address.

Return value

TBool

If true, the message is set to used the default service centre address.


PduL() — Get the contents of a PDU message

const TPdu& PduL() const;

Description

This function returns a reference to the contents of a PDU message.

Return value

TPdu&

On return, contains a reference to the contents of the PDU message.

Notes:

TypeL() — Get the message type

TType TypeL() const;

Description

This function returns the type of a message.

Return value

TType

On return, contains the message type.

Notes:

DeliverL() — Get the contents of a deliver message

const TDeliver& DeliverL() const;

Description

This function returns a reference to the contents of a deliver text message.

Return value

TDeliver&

On return, contains a reference to the contents of the received text deliver message.

Notes:

StatusReportL() — Get the contents of a status report message

const TStatusReport& StatusReportL() const;

Description

This function returns a reference to the contents of a status report text message.

Return value

TStatusReport&

On return, contains a reference to the contents of the received Text status report.

Notes:

CommandL() — Get the contents of a command message

const TCommand& CommandL() const;

Description

This function returns a reference to the contents of a command text message.

Return value

TCommand&

On return, contains a reference to the contents of the received command.

Notes:

SubmitL() — Get the contents of a submit message

const TSubmit& SubmitL() const;

Description

This function returns a reference to the contents of a submit text message.

Return value

TSubmit&

On return, contains a reference to the contents of the received submit text message.

Notes:

Enumerations


TFormat enum — Messaging formats

EFormatPdu

The message is in PDU format.

EFormatText

The message is in Text format.


TType enum — Message types

ETypePdu

PDU format message.

ETypeDeliver

Text message received from network.

ETypeStatusReport

Text status report

ETypeCommand

Text command.

ETypeSubmit

Text message submitted to network.


Anonymous enum — PDU message structure size

KPduSize

Size of the PDU message structure (428).


Anonymous enum — Text message structure size

KTextSize

Size of the text message structure (160).


Anonymous enum — Time stamp structure size

KTimeStampSize

Size of the time stamp structure (22).


Struct


TSubmit struct — Submit message type

The text submit message structure describes a message that has been submitted to the network.

TGsmTelNumber iDestinationAddr

The message’s destination address.

TPid iPid

A parameter identifying the higher protocol layer.

TDcs iDcs

The data coding scheme associated with the message. See ETSI GSM 03.38

TTimeStamp iValidityPeriod

How long the message is valid (from hours up to 63 weeks).

TGsmTelNumber iServiceCentreAddr

The address of the service centre to which the message should be sent. This is network provider specific.

TBuf8<KTextSize> iText

The actual message.


TDeliver struct — Text deliver message type

The text deliver message structure describes a message that has been received from the network.

TGsmTelNumber iOriginatingAddr

The message’s originating address.

TTimeStamp iTimeStamp

A message time and date stamp — indicating when the service centre received the message.

TPid iPid

A parameter identifying the higher protocol layer.

TDcs iDcs

The data coding scheme associated with the message.

TGsmTelNumber iServiceCentreAddr

The originating service centre address.

TBuf8<KTextSize> iText

The actual message.


TStatusReport struct — Text status report message type

The text status report message structure describes a report, generated by the network, about a message that has been submitted to the network.

TUint32 iMessageRef

Identifier of the original message, sent previously, for which this is a status report.

TGsmTelNumber iRecipientAddr

Address of the recipient of the original message.

TTimeStamp iTimeStamp

Time stamp of when the service centre originally received the original message.

TTimeStamp iDischargeTime

Time stamp of when this status information was generated.

TUint iStatus

An integer identifying the status of the originally submitted message (see GSM 03.40 for details).


TCommand struct — Text command message type

The text command message structure describes a command submitted to the network.

TUint iCommandType

Specifies the command to be performed by the network.

TPid iPid

A parameter identifying the higher protocol layer.

TUint iMessageNumber

Indicates the message reference number of the message to operate upon.

TGsmTelNumber iDestinationAddr

Destination address of the command.

TBuf8<KTextSize> iCommand

The actual command data.


Typedef


TPdu typedef — PDU message structure

typedef TBuf8<KPduSize> TPdu;

Description

Objects of this type are used to pass PDU formatted messages into SMS message objects (TSms).


TTimeStamp typedef — Time stamp structure

typedef TBuf8<KTimeStampSize> TTimeStamp;

Description

Objects of this type are used to pass time stamps into SMS message objects (TSms).


TPid typedef — Protocol identification type

typedef TUint8 TPid;

Description

Objects of this type are used to define the higher level protocol associated with an SMS message.


TDcs typedef — Data coding scheme type

typedef TUint8 TDcs;

Description

Objects of this type define the data coding scheme associated with an SMS message.

EPOC       SDK Home Glossary Indexes Previous Next Up