class RMobileBroadcastMessaging : public RTelSubSessionBase |
This sub-session provides access to the broadcast message services provided by GSM/WCDMA and CDMA networks.
Clients will open a RMobileBroadcastMessaging sub-session and then wait for incoming broadcast messages. The broadcast messages received can depend upon a "message filter" which defines the languages and/or identifiers of acceptable (or unacceptable) messages. This sub-session and the function members within this section must be supported if the TSY indicates that it supports the MobileBroadcastMessaging functional unit.
Public Member Functions | |
---|---|
RMobileBroadcastMessaging() | |
IMPORT_C void | Close() |
IMPORT_C TInt | GetCaps(TDes8 &) |
IMPORT_C TInt | GetFilterSetting(TMobilePhoneBroadcastFilter &) |
IMPORT_C void | GetLanguageFilter(TRequestStatus &, TDes16 &) |
IMPORT_C void | NotifyBroadcastIdListChange(TRequestStatus &) |
IMPORT_C void | NotifyFilterSettingChange(TRequestStatus &, TMobilePhoneBroadcastFilter &) |
IMPORT_C void | NotifyLanguageFilterChange(TRequestStatus &, TDes16 &) |
IMPORT_C TInt | Open(RMobilePhone &) |
IMPORT_C void | ReceiveMessage(TRequestStatus &, TDes8 &, TDes8 &) |
IMPORT_C void | SetFilterSetting(TRequestStatus &, TMobilePhoneBroadcastFilter) |
IMPORT_C void | SetLanguageFilter(TRequestStatus &, const TDesC16 &) |
IMPORT_C void | StoreBroadcastIdListL(TRequestStatus &, CMobilePhoneBroadcastIdList *, TMobileBroadcastIdType) |
Protected Member Functions | |
---|---|
IMPORT_C void | ConstructL() |
IMPORT_C void | Destruct() |
Private Member Functions | |
---|---|
RMobileBroadcastMessaging(const RMobileBroadcastMessaging &) |
Public Member Enumerations | |
---|---|
enum | anonymous { KBroadcastPageSize = 88 } |
enum | anonymous { KGsmBroadcastDataSize = KBroadcastPageSize, KCdmaBroadcastDataSize = KBroadcastPageSize, KWCdmaBroadcastPageSize = KBroadcastPageSize } |
enum | TBroadcastMessagingFilterCaps { KCapsSimpleFilter = 0x00000001, KCapsLangFilter = 0x00000002, KCapsIdFilter = 0x00000004 } |
enum | TMobileBroadcastAttributeFlags { KBroadcastDataFormat = 0x00000001, KCdmaServiceCategory = 0x00000002 } |
enum | TMobileBroadcastDataFormat { EFormatUnspecified, EFormatGsmTpdu, EFormatCdmaTpdu, EFormatWcdmaTpdu } |
enum | TMobileBroadcastIdType { EGsmBroadcastId, ECdmaBroadcastId } |
enum | TMobileBroadcastModeCaps { KCapsGsmTpduFormat = 0x00000001, KCapsCdmaTpduFormat = 0x00000002, KCapsWcdmaTpduFormat = 0x00000004 } |
enum | TMobilePhoneBroadcastFilter { EBroadcastFilterUnspecified, EBroadcastAcceptNone, EBroadcastAcceptAll, EBroadcastAcceptFilter, EBroadcastRejectFilter } |
Inherited Enumerations | |
---|---|
RTelSubSessionBase:TReqPriorityType |
Public Member Type Definitions | |
---|---|
typedef | TBuf8< KBroadcastPageSize > TBroadcastPageData |
typedef | TBuf8< KCdmaBroadcastDataSize > TCdmaBroadcastMessageData |
typedef | TBuf8< KGsmBroadcastDataSize > TGsmBroadcastMessageData |
typedef | TPckg< TMobileBroadcastAttributesV1 > TMobileBroadcastAttributesV1Pckg |
typedef | TPckg< TMobileBroadcastAttributesV2 > TMobileBroadcastAttributesV2Pckg |
typedef | TPckg< TMobileBroadcastCapsV1 > TMobileBroadcastCapsV1Pckg |
typedef | TBuf8< KWCdmaBroadcastPageSize > TWCdmaBroadcastPageData |
Private Attributes | |
---|---|
CCbsMessagingPtrHolder * | iCbsMessagingPtrHolder |
Inherited Attributes | |
---|---|
RTelSubSessionBase::iPtrHolder |
RMobileBroadcastMessaging | ( | const RMobileBroadcastMessaging & | ) | [private] |
const RMobileBroadcastMessaging & |
IMPORT_C void | Close | ( | ) |
IMPORT_C TInt | GetCaps | ( | TDes8 & | aCaps | ) | const |
This function member gets a class that reflects the broadcast messaging capabilities of the phone.
TDes8 & aCaps | On completion, a TMobileBroadcastCapsV1Pckg with the broadcast messaging capabilities. |
IMPORT_C TInt | GetFilterSetting | ( | TMobilePhoneBroadcastFilter & | aSetting | ) | const |
This function member gets the current setting for the receipt of broadcast messages.
This setting will indicate whether all or no messages are being accepted or whether only those messages specified by the filters are going to be accepted or rejected.
If the returned setting, aSetting, equals EBroadcastAcceptFilter then the phone will accept messages whose identifier is included within the identifier list AND whose language is included within the language filter. If the returned setting, aSetting, equals EBroadcastRejectFilter then the phone will reject messages whose identifier is included within the identifier list OR whose language is included within the language filter.
N.B. If the phone supports both GSM/WCDMA and CDMA mode then it will probably need two identifier lists - one to contain a list of CBMI (for GSM/WCDMA mode) and the other to contain a list of Service Categories (for CDMA mode) This function member is synchronous because it is expected that this will be a TSY specific setting whose current value the TSY has previously determined.
TMobilePhoneBroadcastFilter & aSetting | On completion, the current filter settings. |
IMPORT_C void | GetLanguageFilter | ( | TRequestStatus & | aReqStatus, |
TDes16 & | aLangFilter | |||
) | const |
This function member allows a client to retrieve the current contents of the broadcast message language filter.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingGetLanguageFilter) to cancel a previously placed asynchronous GetLanguageFilter() request.
TRequestStatus & aReqStatus | On return KErrNone if successful, KErrNotFound if there is no language filter in place, and KErrNotSupported if the phone does not support a language filter. |
TDes16 & aLangFilter | On completion, contain as many languages (each coded on 16-bits) as can fit in the descriptor supplied by the client. This filter defines which are the desired (or undesired) language(s) of incoming broadcast messages. A language is defined either within one byte by its Cell Broadcast Data Coding Scheme (as defined in GSM 03.38) or within two bytes by its ISO 639 alphanumeric pair. Even if a language is represented by an 8-bit value it will be returned as a 16-bit value with the language in the least significant 8-bits. |
IMPORT_C void | NotifyBroadcastIdListChange | ( | TRequestStatus & | aReqStatus | ) | const |
This function member allows a client to be notified that changes have been made to the BroadcastId filter identifier list.
When it completes, it does not return the new version of the list so the client will have to retrieve the list using CRetrieveMobilePhoneBroadcastIdL again if it is interested in the new list.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingNotifyIdListChange) to cancel a previously placed asynchronous NotifyBroadcastIdListChange() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful, a system wide error code if not. |
IMPORT_C void | NotifyFilterSettingChange | ( | TRequestStatus & | aReqStatus, |
TMobilePhoneBroadcastFilter & | aSetting | |||
) | const |
This function member allows a client to be notified if there is a change in the setting for the receipt of broadcast messages.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingNotifyFilterSettingChange) to cancel a previously placed asynchronous NotifyFilterSetting() request.
TRequestStatus & aReqStatus | On return, KErrNone if successful, KErrNotSupported if the phone does not support a filter setting. |
TMobilePhoneBroadcastFilter & aSetting | On completion, the changed filter setting. |
IMPORT_C void | NotifyLanguageFilterChange | ( | TRequestStatus & | aReqStatus, |
TDes16 & | aLangFilter | |||
) | const |
This function member allows a client to be notified if there is a change in the contents of the language filter.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingNotifyLanguageFilterChange) to cancel a previously placed asynchronous NotifyLanguageFilterChange() request.
TRequestStatus & aReqStatus | On return, KErrNone, if successful, KErrNotSupported if the phone does not support a language filter. |
TDes16 & aLangFilter | On completion, the new language filter. |
IMPORT_C TInt | Open | ( | RMobilePhone & | aPhone | ) |
This function member opens a Broadcast Messaging object. The name of the sub-session opened in the TSY will equal the string defined by the KETelBroadcastMessaging LIT definition.
RMobilePhone & aPhone | The existing RMobilePhone session. |
IMPORT_C void | ReceiveMessage | ( | TRequestStatus & | aReqStatus, |
TDes8 & | aMsgData, | |||
TDes8 & | aMsgAttributes | |||
) | const |
This function member enables the client to receive the next incoming broadcast message from the network.
The request will be completed when a new message arrives. The client will pass a descriptor of size KBroadcastPageSize bytes, provided by the typedef TBroadcastPageData, to hold the returned broadcast message data into the aMsgData parameter.
This buffer size should be used for all types of messages: GSM, CDMA and WCDMA.
The function explicity checks that the aMsgData parameter is of size KBroadcastPageSize. If the buffer size does not equal KBroadcastPageSize, the client request will be completed with KErrArgument.
A TSY should handle ReceiveMessage() requests by making them repost immediately (to ensure none are missed) and possibly multiple completion enabled. When a new message arrives the TSY will copy the broadcast message contents into its stored pointer to the broadcast message data, fill in the broadcast message attributes and then complete the request.
TRequestStatus & aReqStatus | On return, KErrNone if successful, KErrArgument if the aMsgData buffer size does not equal KBroadcastPageSize, otherwise a system wide error code. |
TDes8 & aMsgData | On completion, the message data. |
TDes8 & aMsgAttributes | On completion, the broadcast message attributes, in an instance of the TMobileBroadcastAttributesV1Pckg class. |
IMPORT_C void | SetFilterSetting | ( | TRequestStatus & | aReqStatus, |
TMobilePhoneBroadcastFilter | aSetting | |||
) | const |
This function member sets a new setting for the receipt of broadcast messages.
This setting will specify whether all or no messages are being accepted or whether only those messages specified by the filters are going to be accepted or rejected.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingSetFilterSetting) to cancel a previously placed asynchronous SetFilterSetting() request.
TRequestStatus & aReqStatus | On return, the KErrNone if successful, KErrNotSupported if the phone does not support a filter setting. |
TMobilePhoneBroadcastFilter aSetting | On completion, the new filter setting of the phone. |
IMPORT_C void | SetLanguageFilter | ( | TRequestStatus & | aReqStatus, |
const TDesC16 & | aLangFilter | |||
) | const |
This function member allows a client to store new contents for the broadcast message language filter.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingSetLanguageFilter) to cancel a previously placed asynchronous SetLanguageFilter() request.
TRequestStatus & aReqStatus | On return, KErrNone, if successful, KErrNotSupported if the phone does not support a language filter. |
const TDesC16 & aLangFilter | Each element in this descriptor will define a language. This filter will define which are the desired (or undesired) language(s) of incoming broadcast messages. |
IMPORT_C void | StoreBroadcastIdListL | ( | TRequestStatus & | aReqStatus, |
CMobilePhoneBroadcastIdList * | aIdList, | |||
TMobileBroadcastIdType | aIdType | |||
) |
This function member may be used to store a new version of the entire BroadcastId list of identifier entries.
The list, should not contain more entries than can be stored phone-side. This function member will store all the identifier list entries into the phone-side storage. It will overwrite the current contents of the storage and may cause other clients to be notified of the change in identifier list.
Due to the probable time taken to store a list, there is only an asynchronous version of this function member. This function member will leave if an out of memory error occurs during allocation of a client-side buffer in which to store the streamed list contents.
Use RTelSubSessionBase::CancelAsyncRequest(EMobileBroadcastMessagingStoreIdList) to cancel a previously placed asynchronous StoreBroadcastIdListL() request. Will leave if the CBufFlat to hold the streamed contents can not be allocated
TRequestStatus & aReqStatus | On return, KErrNone if successful, a system wide error code if not. |
CMobilePhoneBroadcastIdList * aIdList | The list of BroadcastId identifier entries to be stored. |
TMobileBroadcastIdType aIdType | Specifies whether the list is to be stored as a GSM/WCDMA list of CBMI entries or a CDMA list of Service Category entries. |
A constant which defines the length of the buffer to be passed to ReceiveMessage.
This constant should be used for all message types: GSM, CDMA and WCDMA.
KBroadcastPageSize = 88 |
Old buffer sizes. KBroadcastPageSize should be used instead.
KGsmBroadcastDataSize = KBroadcastPageSize | |
KCdmaBroadcastDataSize = KBroadcastPageSize | |
KWCdmaBroadcastPageSize = KBroadcastPageSize |
KCapsSimpleFilter = 0x00000001 |
Phone supports switching broadcast messages on or off. This means the EbroadcastAcceptNone and EBroadcastAcceptAll settings of TMobilePhoneBroadcastFilter are supported. Modes: Common |
KCapsLangFilter = 0x00000002 |
Phone supports filtering of broadcast messages depending upon their language. The language filter is a list of languages used only for broadcast filtering. Modes: Common |
KCapsIdFilter = 0x00000004 |
Phone supports filtering of broadcast messages depending upon their subject. The subject of a message is identified in GSM/WCDMA mode by the Cell Broadcast Message Identifier (CBMI) and in CDMA mode by the Service Category. Modes: Common |
Defines the broadcast attributes.
Modes: Common
KBroadcastDataFormat = 0x00000001 |
The iFormat field is valid in the attribute class. Modes: Common |
KCdmaServiceCategory = 0x00000002 |
The iServiceCategory field is valid in the attribute class. Modes: CDMA 9.5 |
The mobile broadcast data format, used byTMobileBroadcastAttributesV1.
Modes: Common
EFormatUnspecified |
The message data format is not specified. Modes: Common |
EFormatGsmTpdu |
The message data format complies to a Cell Broadcast TPDU coded as 88 octets (6 for header and 82 for message data) according to GSM 03.41. Modes: GSM/WCDMA |
EFormatCdmaTpdu |
The message data format complies to IS-637-A encoding of the Bearer Data parameter within the Transport Layer's SMS-Broadcast message. Modes: CDMA 9.5 |
EFormatWcdmaTpdu |
The message data format complies to a Cell Broadcast TPDU coded as 1252 octets (6 for header and a maximum of 1246 for message data) according to 3GPP 25.324. Modes: WCDMA |
Defines the broadcast types.
EGsmBroadcastId |
GSM broadcast. |
ECdmaBroadcastId |
CDMA broadcast. 9.5 |
Broadcast capabilities.
Modes:GSM/WCDMA
KCapsGsmTpduFormat = 0x00000001 |
GSM 03.41 cell broadcast messages are supported. Modes:GSM/WCDMA |
KCapsCdmaTpduFormat = 0x00000002 |
IS-637-A broadcast messages are supported. Modes:CDMA 9.5 |
KCapsWcdmaTpduFormat = 0x00000004 |
3GPP 25.324 Release 4 cell broadcast messages are supported. Modes: WCDMA |
The filter settings of the mobile phone.
Modes: Common
EBroadcastFilterUnspecified |
The phone does not have a filter setting. |
EBroadcastAcceptNone |
The phone is not accepting any broadcast messages. |
EBroadcastAcceptAll |
The phone is accepting all broadcast messages. |
EBroadcastAcceptFilter |
The phone is accepting those broadcast messages included within the language and identifier filters. |
EBroadcastRejectFilter |
The phone is rejecting those broadcast messages included within the language or identifier filters. |
typedef TBuf8< KBroadcastPageSize > | TBroadcastPageData |
Buffer for received messages.
This buffer should be used for all message types: GSM, CDMA and WCDMA.
typedef TBuf8< KCdmaBroadcastDataSize > | TCdmaBroadcastMessageData |
Buffer for CDMA messages. TBroadcastPageData should be used instead. 9.5
typedef TBuf8< KGsmBroadcastDataSize > | TGsmBroadcastMessageData |
Buffer for GSM messages. TBroadcastPageData should be used instead.
typedef TPckg< TMobileBroadcastAttributesV1 > | TMobileBroadcastAttributesV1Pckg |
A typedef'd packaged TMobileBroadcastAttributesV1 for passing through a generic API function member.
typedef TPckg< TMobileBroadcastAttributesV2 > | TMobileBroadcastAttributesV2Pckg |
A typedef'd packaged TMobileBroadcastAttributesV1 for passing through a generic API function member.
typedef TPckg< TMobileBroadcastCapsV1 > | TMobileBroadcastCapsV1Pckg |
A typedef'd packaged TMobileBroadcastCapsV1 for passing through a generic API function member.
typedef TBuf8< KWCdmaBroadcastPageSize > | TWCdmaBroadcastPageData |
Buffer for WCDMA messages. TBroadcastPageData should be used instead.
CCbsMessagingPtrHolder * | iCbsMessagingPtrHolder | [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.