class RMobileSmsMessaging : public RTelSubSessionBase |
Provides client access to SMS messaging functionality provided by TSY.
Protected Member Functions | |
---|---|
IMPORT_C void | ConstructL() |
IMPORT_C void | Destruct() |
Private Member Functions | |
---|---|
RMobileSmsMessaging(const RMobileSmsMessaging &) |
Inherited Enumerations | |
---|---|
RTelSubSessionBase:TReqPriorityType |
Public Member Type Definitions | |
---|---|
typedef | TPckg< TMobileSmsAttributesV1 > TMobileSmsAttributesV1Pckg |
typedef | TPckg< TMobileSmsCapsV1 > TMobileSmsCapsV1Pckg |
typedef | TPckg< TMobileSmsCdmaSendAttributesV4 > TMobileSmsCdmaSendAttributesV4Pckg |
typedef | TBuf8< KCdmaTpduSize > TMobileSmsCdmaTpdu |
typedef | TBuf8< KGsmTpduSize > TMobileSmsGsmTpdu |
typedef | TPckg< TMobileSmsReceiveAttributesV1 > TMobileSmsReceiveAttributesV1Pckg |
typedef | TPckg< TMobileSmsSendAttributesV1 > TMobileSmsSendAttributesV1Pckg |
typedef | TPckg< TMobileSmspEntryV1 > TMobileSmspEntryV1Pckg |
Private Attributes | |
---|---|
CSmsMessagingPtrHolder * | iSmsMessagingPtrHolder |
Inherited Attributes | |
---|---|
RTelSubSessionBase::iPtrHolder |
IMPORT_C | RMobileSmsMessaging | ( | ) |
Standard constructor. This member is internal and not intended for public use.
RMobileSmsMessaging | ( | const RMobileSmsMessaging & | ) | [private] |
const RMobileSmsMessaging & |
IMPORT_C void | AckSmsStored | ( | TRequestStatus & | aReqStatus, |
const TDesC8 & | aMsgData, | |||
TBool | aFull = EFalse | |||
) | const |
When the client receives an unstored SMS, it will use this member function to return a positive acknowledgment if it manages to successfully decode and store that SMS. If the client wishes to send a SMS-DELIVER-REPORT in response to the received SMS-DELIVER , than the aMsgData parameter will be used to hold the TPDU defined for a SMS-DELIVER-REPORT (for RP-ACK) in GSM 03.40.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingAckSmsStored) to cancel a previously placed asynchronous AckSmsStored() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
const TDesC8 & aMsgData | Holds the TPDU defined for a SMS-DELIVER-REPORT (for RP-ACK) in GSM 03.40. |
TBool aFull = EFalse | Indicates whether, after storing the acknowledged message, the client-side message store is now full or not. If client sets it to ETrue then it is informing the TSY that the store is full (or almost full) and that it does not want to receive any more messages until it calls ResumeSmsReception(). |
IMPORT_C TInt | EnumerateMessageStores | ( | TInt & | aCount | ) | const |
This request gets the number of phone-side SMS message stores supported by the phone in the aCount parameter.
TInt & aCount | On return, the number of phone-side SMS message stores. |
IMPORT_C TInt | GetCaps | ( | TDes8 & | aCaps | ) | const |
This member function gets a class that reflects the SMS messaging capabilities of the phone.
TDes8 & aCaps | On return, a TMobileSmsCapsV1Pckg with the SMS messaging capabilities of the phone. |
IMPORT_C void | GetMessageStoreInfo | ( | TRequestStatus & | aReqStatus, |
TInt | aIndex, | |||
TDes8 & | aInfo | |||
) | const |
This request gets information about the SMS message store.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingGetMessageStoreInfo) to cancel a previously placed asynchronous GetMessageStoreInfo() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful |
TInt aIndex | The index of the store, valid values are between 0 and (n-1), where n is given by the EnumerateMessageStores() request. |
TDes8 & aInfo | On comletion, a RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg holding the SMS message store info. |
IMPORT_C TInt | GetMoSmsBearer | ( | TMobileSmsBearer & | aBearer | ) | const |
This member function is used to retrieve the current setting for the bearer type (GSM or GPRS) used for sending SMS messages.
TMobileSmsBearer & aBearer | On return, the current bearer type. |
IMPORT_C TInt | GetReceiveMode | ( | TMobileSmsReceiveMode & | aReceiveMode | ) | const |
This member function retrieves the current setting of the TSY-phone incoming SMS receive mode. This setting dictates how the phone will handle incoming SMS messages before passing them on to TSY.
TMobileSmsReceiveMode & aReceiveMode | On return, the current receive mode. |
IMPORT_C void | NackSmsStored | ( | TRequestStatus & | aReqStatus, |
const TDesC8 & | aMsgData, | |||
TInt | aRpCause | |||
) | const |
When the client receives an unstored SMS, it will use this member function to return a negative acknowledgment if it fails to decode and/or store that SMS.
This TPDU will contain the TP error cause that prevents the client from acknowledging the SMS. The client should also provide the RP error cause by placing it in the aRpCause parameter.
In GSM mode, once a client has rejected a received SMS due to storage full, the network will keep this message for later and suspend the forwarding of any further received SMS to this MS.
In CDMA mode, the network will save the message but it will repeat sending of the message to the MS until either the MS eventually accepts it or the retry limit is reached.
If retry limit is reached the network will tell the originator of the message that the transmission failed. In either case, when client-side memory is freed-up, the client must call ResumeSmsReception() in order to tell the phone and possibly the network that SMS can be received again.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingNackSmsStored) to cancel a previously placed asynchronous NackSmsStored() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
const TDesC8 & aMsgData | Holds the TPDU defined for a SMS-DELIVER-REPORT (for RP-ERROR) in GSM 03.40. |
TInt aRpCause | Contain one of the MS related extended error codes. |
IMPORT_C void | NotifyMoSmsBearerChange | ( | TRequestStatus & | aReqStatus, |
TMobileSmsBearer & | aBearer | |||
) |
This member function is used t notify the client if there is a change to the setting for the bearer type used for sending SMS messages.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingNotifyMoSmsBearerChange) to cancel a previously placed asynchronous NotifyMoSmsBearerChange() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
TMobileSmsBearer & aBearer | On completion, the new bearer. |
IMPORT_C void | NotifyReceiveModeChange | ( | TRequestStatus & | aStatus, |
TMobileSmsReceiveMode & | aReceiveMode | |||
) |
This member function is used to notify the client if there is a change to the setting of the TSY-Phone receive mode.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingNotifyReceiveModeChange) to cancel a previously placed asynchronous NotifyReceiveModeChange() request.
TRequestStatus & aStatus | On return, KErrNone if successful |
TMobileSmsReceiveMode & aReceiveMode | On return, the new SMS receive mode. |
IMPORT_C void | NotifySmspListChange | ( | TRequestStatus & | aReqStatus | ) | const |
This member function allows a client to be notified that changes have been made to the SMSP list. When it completes, it does not return the new version of the list so the client will have to retrieve the list again if it is interested in the new list.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingNotifySmspListChange) to cancel a previously placed asynchronous NotifySmspListChange() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
IMPORT_C TInt | Open | ( | RMobilePhone & | aPhone | ) |
This member function opens a SMS Messaging object. The name of the sub-session opened in the TSY will equal the string defined by the KETelSmsMessaging LIT definition.
RMobilePhone & aPhone | An existing RMobilePhone session. |
IMPORT_C void | ReceiveMessage | ( | TRequestStatus & | aReqStatus, |
TDes8 & | aMsgData, | |||
TDes8 & | aMsgAttributes | |||
) | const |
This member function will be used to wait for the next incoming SMS message. Once this member function completes, the client should immediately repost it if they want to receive the next incoming SMS message.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingReceiveMessage) to cancel a previously placed asynchronous ReceiveMessage() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
TDes8 & aMsgData | On completion, the message data. |
TDes8 & aMsgAttributes | On completion, a TMobileSmsReceiveAttributesV1Pckg containing the message attributes. |
IMPORT_C void | ResumeSmsReception | ( | TRequestStatus & | aReqStatus | ) | const |
This member functions resumes the reception of SMS messages.
SMS reception can become suspended because SMS storage is full. Therefore if client-side storage is full, the client must stop receiving unstored messages. However, if the user deletes some client-side stored SMS messages, the client must use this member function to tell the TSY to inform a GSM network that messages can be received again or the phone that CDMA messages can be accepted again.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingResumeSmsReception) to cancel a previously placed asynchronous ResumeSmsReception() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
IMPORT_C void | SendMessage | ( | TRequestStatus & | aReqStatus, |
const TDesC8 & | aMsgData, | |||
TDes8 & | aMsgAttributes | |||
) | const |
This member function sends an SMS message to the network.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingSendMessage) to cancel a previously placed asynchronous SendMessage() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful, KErrNotSupported if the phone does not support outgoing SMS, KErrMMEtelFormatNotSupported if the phone does not support the client's chosen message data format, any of the KErrGsmSms extended errors if the phone is in GSM mode and this is the error returned by the GSM network/service centre, Any of the KErrCdmaSms extended errors if the phone is in CDMA mode and this is the error returned by the CDMA network/service centre. Please note that the last three examples are "extended" errors and will only be returned to those clients that request them. Clients that only understand core Symbian OS and ETel errors will receive KErrGeneral for any error cases that the TSY can not interpret. |
const TDesC8 & aMsgData | The message data |
TDes8 & aMsgAttributes | A TMobileSmsSendAttributesV1Pckg with the message attributes. The fields required will probably be message data format, destination and possibly a new service centre address. On return, for either successful or failed transmission, the message reference number assigned to this sent message will be placed by the TSY in the iMsgRef field. Also, if the SMS was sent during GSM or WCDMA mode, then the SMS-SUBMIT-REPORT will be placed by the TSY in the iSubmitReport field. |
IMPORT_C void | SendMessageNoFdnCheck | ( | TRequestStatus & | aReqStatus, |
const TDesC8 & | aMsgData, | |||
TDes8 & | aMsgAttributes | |||
) | const |
Sends an outgoing SMS to the network.
The number used for sending the SMS is not checked against those in the Fixed Dialling Number list even if the FDN service is enabled.
TRequestStatus & aReqStatus | |
const TDesC8 & aMsgData | Supplies the TPDU to send |
TDes8 & aMsgAttributes | Supplies the attributes of the outgoing message |
IMPORT_C void | SetMoSmsBearer | ( | TRequestStatus & | aReqStatus, |
TMobileSmsBearer | aBearer | |||
) | const |
This member function sets the bearer type (GSM or GPRS) for sending SMS messages.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingSetMoSmsBearer) to cancel a previously placed asynchronous SetMoSmsBearer() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
TMobileSmsBearer aBearer | The bearer type to set. |
IMPORT_C void | SetReceiveMode | ( | TRequestStatus & | aReqStatus, |
TMobileSmsReceiveMode | aReceiveMode | |||
) | const |
This member function sets the setting of the TSY-phone incoming SMS receive mode. This setting dictates how the phone will handle incoming SMS messages before passing them on to TSY.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingSetReceiveMode) to cancel a previously placed asynchronous SetReceiveMode() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
TMobileSmsReceiveMode aReceiveMode | The receive mode to set. |
IMPORT_C void | StoreSmspListL | ( | TRequestStatus & | aReqStatus, |
CMobilePhoneSmspList * | aSmspList | |||
) | const |
This member function may be used to store a new version of the entire list of SMSP entries. It will overwrite the current contents of the storage and may cause other clients to be notified of the change in SMSP list.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileSmsMessagingStoreSmspList) to cancel a previously placed asynchronous StoreSmspListL() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful. |
CMobilePhoneSmspList * aSmspList | The list of SMSP entries to store, should not contain more entries than can be stored phone-side. |
Used by TSY to distinguish which SMS attribute class is used by client.
Modes: Common
KETelMobileSmsAttributesV1 = KETelExtMultimodeV1 |
The iExtensionId contents indicate that the packaged class is a TMobileSmsAttributesV1. |
KETelMobileSmsReceiveAttributesV1 |
The iExtensionId contents indicate that the packaged class is a TMobileSmsReceiveAttributesV1. |
KETelMobileSmsSendAttributesV1 |
The iExtensionId contents indicate that the packaged class is a TMobileSmsSendAttributesV1. |
KETelMobileSmsCdmaSendAttributesV4 = KETelExtMultimodeV4 |
The iExtensionId contents indicate that the packaged class is a TMobileSmsCdmaSendAttributesV4. 9.5 |
KCdmaTeleservice = 0x00000001 |
The iCdmaTeleservice field is valid in the attribute class. Modes: CDMA 9.5 |
KCdmaServiceCategory = 0x00000002 |
The iCdmaServiceCategory field is valid in the attribute class. Modes: CDMA 9.5 |
KGsmServiceCentre = 0x00000004 |
The iGsmServiceCentre field is valid in the attribute class. Modes: GSM/WCDMA |
KSmsDataFormat = 0x00000008 |
The iDataFormat field is valid in the attribute class. Modes: Common |
KRemotePartyInfo = 0x00000010 |
The iOriginator or iDestination field is valid in the attribute class. Modes: Common |
KIncomingStatus = 0x00000020 |
The iStatus field is valid in the attribute class. Modes: Common |
KStorageLocation = 0x00000040 |
The iStore and iStoreIndex fields are valid in the attribute class. Modes: Common |
KMessageReference = 0x00000080 |
The iMsgRef field is valid in the attribute class. Modes: Common |
KGsmSubmitReport = 0x00000100 |
The iSubmitReport field is valid in the attribute class. Modes: GSM/WCDMA |
KMoreToSend = 0x00000200 |
The iMore field is valid in the attribute class. Modes: Common |
KCdmaKeepChannelOpen = 0x00000400 |
Indicates to the TSY that it should keep the traffic channel open since there is another message ready to be sent immediately after this one (typically used when sending messages to multiple recipients). TSY should then keep the channel open until a message is sent with this bit cleared. Modes: CDMA 9.5 |
KCdmaTLAckRequired = 0x00000800 |
Indicates to the TSY that it must wait for the Transport Layer Acknowledgement from the network Modes: CDMA 9.5 |
KCdmaAddressAuthentication = 0x00001000 |
The iAddressAuthentication field is valid in the attribute class. Modes: CDMA 9.5 |
Defines the SMS bearer.
Modes: GSM
ESmsBearerPacketOnly |
SMS messages will only be sent over a packet-switched (GPRS) network. |
ESmsBearerCircuitOnly |
SMS messages will only be sent over a circuit-switched (GSM) network. |
ESmsBearerPacketPreferred |
SMS messages will be sent over the packet-switched (GPRS) network if possible, otherwise over circuit-switched (GSM) network. |
ESmsBearerCircuitPreferred |
SMS messages will be sent over the circuit-switched (GSM) network if possible, otherwise over packet-switched (GPRS) network. |
Defines SMS control capabilities.
Modes: Common
KCapsReceiveStored = 0x00000001 |
TSY supports receiving incoming SMS that have been stored and acknowledged by the phone prior to forwarding to the TSY. If this flag is set then KCapsReceiveEither will not be set and the client can receive stored messages only while the TSY-phone link is in "receive stored" mode. Modes: Common |
KCapsReceiveUnstoredPhoneAck = 0x00000002 |
TSY supports receiving incoming SMS that have been acknowledged by the phone but have NOT already been stored. It is the client's responsibility to do the storage. If this flag is set then KCapsReceiveEither will not be set and the client can receive unstored messages only while the TSY-phone link is in "receive unstored with phone ack" mode. Modes: Common |
KCapsReceiveUnstoredClientAck = 0x00000004 |
TSY supports receiving incoming SMS that have NOT already been stored and acknowledged by the phone. It is the client's responsibility to do both the storage and the acknowledgment or rejection. If this flag is set then KCapsReceiveEither will not be set and the client can receive unstored messages only while the TSY-phone link is in "receive unstored with client ack" mode. Modes: Common |
KCapsReceiveEither = 0x00000008 |
TSY supports receiving either stored or unstored incoming SMS at any time. If this flag is set then any other KCapsReceive... flags will not be set and the client can receive stored or unstored messages while the TSY-phone link is in "receive either" mode. Modes: Common |
KCapsCreateAck = 0x00000010 |
TSY supports creating a default acknowledgment or rejection TPDU using only a "cause code" supplied by the client. If this flag is not set then the client must supply the full ack or nack TPDU if it calls RMobileSmsMessaging::AckSmsStored() or RMobileSmsMessaging::NackSmsStored(). Modes: Common |
KCapsSendNoAck = 0x00000020 |
TSY supports sending SMS messages but does not support returning the service centre's acknowledgment of the submitted message to the client. Modes: Common |
KCapsSendWithAck = 0x00000040 |
TSY supports sending SMS messages and also supports returning the service centre's acknowledgment of the submitted message to the client. Modes: GSM/WCDMA |
KCapsGetSmspList = 0x00000080 |
TSY supports retrieval of the SMS parameter list. Modes: GSM/WCDMA |
KCapsSetSmspList = 0x00000100 |
TSY supports storage of the SMS parameter list Modes: GSM/WCDMA |
Defines the SMS data format.
Modes: Common
EFormatUnspecified |
The format is not specified. Modes: Common |
EFormatGsmTpdu |
The message data format complies to a SMS TPDU coded as octets according to GSM 03.40. Modes: GSM/WCDMA |
EFormatCdmaTpdu |
The message data format complies to a SMS Teleservice PDU coded as octets according to IS-637. Modes: CDMA 9.5 |
Defines attributes of incoming SMS messages.
Modes: Common
EMtMessageUnknownStatus |
The status of the incoming SMS is unknown. |
EMtMessageUnstoredPhoneAck |
The incoming SMS is not stored phone-side but has already been acknowledged by the phone. |
EMtMessageUnstoredClientAck |
The incoming SMS is not stored phone-side and needs to be acknowledged by the client. |
EMtMessageStored |
The incoming SMS is stored phone-side. |
Defines capabilities of SMS messaging.
Modes: GSM/WCDMA
KCapsGsmSms = 0x00000001 |
SMS is supported in GSM and WCDMA modes. SMS are sent across MM ETel API in a GSM 03.40 TPDU format. Modes: GSM/WCDMA |
KCapsCdmaSms = 0x00000002 |
SMS is supported in CDMA mode. SMS are sent across MM ETel API in a IS-637 Teleservice message PDU format. Modes: CDMA 9.5 |
Defines the SMS receive modes.
Modes: Common
EReceiveModeUnspecified |
Receive mode is unspecified and phone will use its default. |
EReceiveUnstoredPhoneAck |
Phone will acknowledge but NOT store all incoming messages before passing them onto TSY. It is client's responsibility to store the message. |
EReceiveUnstoredClientAck |
Phone will NOT acknowledge or store any incoming messages before passing them onto TSY. It is client's responsibility to attempt storage and then either acknowledge or reject the message. |
EReceiveStored |
Phone will store and acknowledge all incoming messages before passing them onto TSY. |
EReceiveEither |
Phone may pass on either stored or unstored messages to TSY. It is client's responsibility to check RMobileSmsMessaging::TMobileSmsReceiveAttributesV1::iStatus to determine what action(s) the client needs to take for a message. |
KDestinationIncluded = 0x00000001 |
The entry includes a valid iDestination field. |
KSCAIncluded = 0x00000002 |
The entry includes a valid iServiceCentre field. |
KProtocolIdIncluded = 0x00000004 |
The entry includes a valid iProtocolId field. |
KDcsIncluded = 0x00000008 |
The entry includes a valid iDcs field. |
KValidityPeriodIncluded = 0x00000010 |
The entry includes a valid iValidityPeriod field. |
typedef TPckg< TMobileSmsAttributesV1 > | TMobileSmsAttributesV1Pckg |
A typedef'd packaged TMobileSmsAttributesV1 for passing through a generic API member function.
typedef TPckg< TMobileSmsCapsV1 > | TMobileSmsCapsV1Pckg |
A typedef'd packaged TMobileSmsCapsV1 for passing through a generic API member function.
typedef TPckg< TMobileSmsCdmaSendAttributesV4 > | TMobileSmsCdmaSendAttributesV4Pckg |
A typedef'd packaged TMobileSmsCdmaSendAttributesV4 for passing through a generic API member function.
typedef TBuf8< KCdmaTpduSize > | TMobileSmsCdmaTpdu |
A typedef'd buffer for CDMA message data. 9.5
typedef TBuf8< KGsmTpduSize > | TMobileSmsGsmTpdu |
A typedef'd buffer for GSM or WCDMA message data.
typedef TPckg< TMobileSmsReceiveAttributesV1 > | TMobileSmsReceiveAttributesV1Pckg |
A typedef'd packaged TMobileSmsReceiveAttributesV1 for passing through a generic API member function.
typedef TPckg< TMobileSmsSendAttributesV1 > | TMobileSmsSendAttributesV1Pckg |
A typedef'd packaged TMobileSmsSendAttributesV1 for passing through a generic API member function.
typedef TPckg< TMobileSmspEntryV1 > | TMobileSmspEntryV1Pckg |
A typedef'd packaged TMobileSmspEntryV1 for passing through a generic API member function.
CSmsMessagingPtrHolder * | iSmsMessagingPtrHolder | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.