RSatService Class Reference
class RSatService : public RSubSessionBase |
Sub-session for SAT services to SIM
In order to use SAT Service API, services of an another API is needed:
Idle mode text client needs to monitor for idle mode content changes and call SetIdleModeTextResponse() if content is updated. Result needs to be reported also if there already is initial content after startup, when change notification has not been requested yet. Example sequence for Idle mode client: 1. Startup 2. Request notification for idle mode content updates from. 3. Try to get initial idle mode text. 4. Use initial content, if there was some. 5. Report result if there was content. Later: 6. Idle mode text change notification request is completed. 7. Renew notification request. 8. Read new content. 9. Use new content. 10. Report result.
// How to connect to SAT service :
// How to request notification on SetupIdleModeText change:
RSatSession satSession;
RSatService satService;
// Connect session
satSession.ConnectL();
satService.OpenL( satSession );
// Start observing asynchronously for changes
satService.NotifySetupIdleModeTextChange( status );
//How to read Idle Mode Text and icon:
// Read text and icon after startup and when notified about change.
TSatIconQualifier iconQualif( ESatIconNoIcon );
TUint8 recordId( 0 );
TInt error( KErrNone );
HBufC* text = NULL;
satService.GetSetupIdleModeTextL(
text, iconQualif, recordId );
CFbsBitmap* icon = NULL;
if ( text )
{
// Use text, take care of cleanup.
}
if ( ESatIconNoIcon != iconQualif )
{
// There's an icon to be displayed.
// Get icon records into array.
RIconEf iconInfos;
CleanupStack::PushL( TCleanupItem(
LocalArrayCleanupFunction, iconInfos )
satService.GetIconInfoL( recordId, iconInfos );
// Resolve which icon to use using icon infos.
// Then get the icon you selected.
icon = satService.GetIconL( iconInfos[ 0 ] );
CleanupStack::PopAndDestroy(); // iconInfos
if ( ESatIconSelfExplanatory == iconQualif )
{
// Only icon should be displayed.
}
else if ( ESatIconNotSelfExplanatory == iconQualif )
{
// Both text and icon should be displayed.
}
}
// else: only text should be displayed
// Display text and/or icon, take care of their cleanup.
Inherited Functions |
---|
| RSubSessionBase::CloseSubSession(TInt) |
| RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &) |
| RSubSessionBase::CreateSubSession(const RSessionBase &,TInt) |
| RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &) |
| RSubSessionBase::RSubSessionBase() |
| RSubSessionBase::Send(TInt)const |
| RSubSessionBase::Send(TInt,const TIpcArgs &)const |
| RSubSessionBase::SendReceive(TInt)const |
| RSubSessionBase::SendReceive(TInt,TRequestStatus &)const |
| RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const |
| RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const |
| RSubSessionBase::Session()const |
| RSubSessionBase::SubSessionHandle()const |
Constructor & Destructor Documentation
RSatService(const RSatService &)
Prohibit copy constructor if not deriving from CBase.
Member Functions Documentation
CheckInfoValidityL(const TDesC8 &)
void | CheckInfoValidityL | ( | const TDesC8 & | aData | ) | const [private] |
Checks that the data from SIM is valid.
- Since
- 5.1
-
leave
- KErrCorrupt if the info is invalid.
Parameters
const TDesC8 & aData | Icon info to be checked. |
FillInternalIconInfo(const TSatIconInfo &, TSatInternalIconInfo &)
void | FillInternalIconInfo | ( | const TSatIconInfo & | aIconInfo, |
| TSatInternalIconInfo & | aInternalIconInfo |
| ) | const [private] |
Convert TSatIconinfo to TSatInternalIconInfo.
Parameters
const TSatIconInfo & aIconInfo | user side icon info. |
TSatInternalIconInfo & aInternalIconInfo | |
GetIconInfoL(TUint8, RIconEf &)
IMPORT_C void | GetIconInfoL | ( | TUint8 | aRecordNumber, |
| RIconEf & | aIconEf |
| ) | const |
Gets the information of icons from the SIM.
Parameters
TUint8 aRecordNumber | Record number from proactive command. |
RIconEf & aIconEf | Contains the icon information. |
GetIconL(const TSatIconInfo &)
IMPORT_C CFbsBitmap * | GetIconL | ( | const TSatIconInfo & | aIconInfo | ) | const |
Gets the bitmap of selected icon from SIM. Client should determine the suitable icon using GetIconInfoL.
Parameters
const TSatIconInfo & aIconInfo | Information of the selected icon. |
GetSetupIdleModeTextL(HBufC *&, TSatIconQualifier &, TUint8 &)
Get idle mode text and icon.
Icon and text should be displayed depending on how aIconQualifier specifies icon role. Result must be reported using RSatService::SetIdleModeTextResponse(). Notice: result needs to be reported also if content is available already after startup when client requests notification for the first time. If unable to display icon, then only text can be displayed (adjust reported result value).
- Since
- 5.1
-
leave
- KErrNotFound ESatIconNotSelfExplanatory icon without text.
Parameters
HBufC *& aText | New text, if available. Ownership transferred. NULL if no text to display. |
TSatIconQualifier & aIconQualifier | Specifies if icon, text or both are preferred. |
TUint8 & aRecordNumber | Record id for icon. |
NotifySetupIdleModeTextChange(TRequestStatus &)
Requests notification when idle mode text or image are updated.
Idle client needs to monitor for setup idle mode content updates. When a request is completed, the Idle client can read new content using GetSetupIdleModeTextL and must report idle mode content displaying result using SetIdleModeTextResponse().
NotifySetupIdleModeTextChangeCancel()
IMPORT_C void | NotifySetupIdleModeTextChangeCancel | ( | ) | |
Cancels notification request for setup idle mode text or image change.
OpenL(const RSatSession &)
SetIconInfoL(TSatIconInfo &, const TDesC8 &)
void | SetIconInfoL | ( | TSatIconInfo & | aContainer, |
| const TDesC8 & | aIconSatData |
| ) | const [private] |
Set ETSI specified bitmap data to TSatIconInfo.
Parameters
TSatIconInfo & aContainer | Client side Icon info. |
const TDesC8 & aIconSatData | RSat::TIcon data from server. |
SetIdleModeTextResponse(const TSATIdleResult &)
IMPORT_C void | SetIdleModeTextResponse | ( | const TSATIdleResult & | aResult | ) | const |
Parameters
const TSATIdleResult & aResult | Result of displaying idle mode text and icon. |
operator=(const RSatService &)
Prohibit assigment operator if not deriving from CBase.
Member Enumerations Documentation
Enum TSATIdleResult
Result options for idle mode text setup.
Enumerators
ESATIdleSuccess = 0x00 |
Text and Icon were set up successfully
|
ESATIdleSuccessRequestedIconNotDisplayed = 0x04 |
Text was set up successfully, but requested icon was not displayed
|
ESATIdleMeUnableToProcessCmd = 0x20 |
Text could not be displayed - temporary problem
|
ESATIdleCmdBeyondMeCapabilities = 0x30 |
Text could not be displayed - permanent problem
|
Enum TSatIconQualifier
Enumerators
ESatIconNoIcon = 1 |
Icon is not available.
|
ESatIconSelfExplanatory |
Icon is self-explanatory, i.e. if displayed, it replaces the text string.
|
ESatIconNotSelfExplanatory |
Icon is not self-explanatory, i.e. if displayed, it shall be displayed together with the text string.
|
Member Data Documentation
TIpcArgs
iArgs
Arguments for asynchronous message.
TInt
iMaxIconDataSize
TInt
| iMaxIconDataSize | [private] |
Maximum support icon size.
CSatPluginMonitor * iSatPluginMonitor
CSatPluginMonitor * | iSatPluginMonitor | [private] |
SetupIdleMode content monitoring. Own
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.