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:
  • SAT Client API For connecting SAT Session

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.
SatClient.lib
Since
5.1

Inherits from

Public Member Functions
RSatService()
IMPORT_C voidClose()
IMPORT_C voidGetIconInfoL(TUint8, RIconEf &)
IMPORT_C CFbsBitmap *GetIconL(const TSatIconInfo &)
IMPORT_C TBoolGetSetupIdleModeTextL(HBufC *&, TSatIconQualifier &, TUint8 &)
IMPORT_C TIntNotifySetupIdleModeTextChange(TRequestStatus &)
IMPORT_C voidNotifySetupIdleModeTextChangeCancel()
IMPORT_C voidOpenL(const RSatSession &)
IMPORT_C voidSetIdleModeTextResponse(const TSATIdleResult &)
Private Member Functions
RSatService(const RSatService &)
voidCheckInfoValidityL(const TDesC8 &)
voidFillInternalIconInfo(const TSatIconInfo &, TSatInternalIconInfo &)
voidSetIconInfoL(TSatIconInfo &, const TDesC8 &)
RSatService &operator=(const RSatService &)
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
Public Member Enumerations
enumTSATIdleResult { ESATIdleSuccess = 0x00, ESATIdleSuccessRequestedIconNotDisplayed = 0x04, ESATIdleMeUnableToProcessCmd = 0x20, ESATIdleCmdBeyondMeCapabilities = 0x30 }
enumTSatIconQualifier { ESatIconNoIcon = 1, ESatIconSelfExplanatory, ESatIconNotSelfExplanatory }
Private Attributes
TIpcArgs iArgs
TInt iMaxIconDataSize
CSatPluginMonitor *iSatPluginMonitor

Constructor & Destructor Documentation

RSatService()

IMPORT_CRSatService()

C++ default constructor.

RSatService(const RSatService &)

RSatService(const RSatService &)[private]

Prohibit copy constructor if not deriving from CBase.

Parameters

const RSatService &

Member Functions Documentation

CheckInfoValidityL(const TDesC8 &)

voidCheckInfoValidityL(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 & aDataIcon info to be checked.

Close()

IMPORT_C voidClose()

Closes the sub-session.

Since
5.1

FillInternalIconInfo(const TSatIconInfo &, TSatInternalIconInfo &)

voidFillInternalIconInfo(const TSatIconInfo &aIconInfo,
TSatInternalIconInfo &aInternalIconInfo
)const [private]

Convert TSatIconinfo to TSatInternalIconInfo.

Since
5.1

Parameters

const TSatIconInfo & aIconInfouser side icon info.
TSatInternalIconInfo & aInternalIconInfo

GetIconInfoL(TUint8, RIconEf &)

IMPORT_C voidGetIconInfoL(TUint8aRecordNumber,
RIconEf &aIconEf
)const

Gets the information of icons from the SIM.

Since
5.1
leave
Error value returned by RSubSessionBase::SendReceive.
leave
KErrCorrupt if the info is invalid.

Parameters

TUint8 aRecordNumberRecord number from proactive command.
RIconEf & aIconEfContains 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.

Since
5.1
leave
Error value returned by RSubSessionBase::SendReceive.
leave
Error value returned by CFbsBitmap::Duplicate.
leave
Error value returned by RSubSessionBase::Send.

Parameters

const TSatIconInfo & aIconInfoInformation of the selected icon.

GetSetupIdleModeTextL(HBufC *&, TSatIconQualifier &, TUint8 &)

IMPORT_C TBoolGetSetupIdleModeTextL(HBufC *&aText,
TSatIconQualifier &aIconQualifier,
TUint8 &aRecordNumber
)

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 *& aTextNew text, if available. Ownership transferred. NULL if no text to display.
TSatIconQualifier & aIconQualifierSpecifies if icon, text or both are preferred.
TUint8 & aRecordNumberRecord id for icon.

NotifySetupIdleModeTextChange(TRequestStatus &)

IMPORT_C TIntNotifySetupIdleModeTextChange(TRequestStatus &aStatus)

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().

Since
5.1

Parameters

TRequestStatus & aStatusRequest to be completed on update.

NotifySetupIdleModeTextChangeCancel()

IMPORT_C voidNotifySetupIdleModeTextChangeCancel()

Cancels notification request for setup idle mode text or image change.

Since
5.1

OpenL(const RSatSession &)

IMPORT_C voidOpenL(const RSatSession &aSession)

Opens the sub-session.

Since
5.1
leave
Error value returned by RSubSessionBase::CreateSubSession.

Parameters

const RSatSession & aSessionSub-session.

SetIconInfoL(TSatIconInfo &, const TDesC8 &)

voidSetIconInfoL(TSatIconInfo &aContainer,
const TDesC8 &aIconSatData
)const [private]

Set ETSI specified bitmap data to TSatIconInfo.

Since
5.1

Parameters

TSatIconInfo & aContainerClient side Icon info.
const TDesC8 & aIconSatDataRSat::TIcon data from server.

SetIdleModeTextResponse(const TSATIdleResult &)

IMPORT_C voidSetIdleModeTextResponse(const TSATIdleResult &aResult)const

Sets SetUpIdleModeText response.

This must be called by the Idle client application after IdleModeText has been modified by SAT, meaning when RSatService::NotifySetupIdleModeTextChange() is completed. Also needs to be called if GetSetupIdleModeTextL() returned content and RSatService::NotifySetupIdleModeTextChange() notification was not requested yet.

Since
5.1

Parameters

const TSATIdleResult & aResultResult of displaying idle mode text and icon.

operator=(const RSatService &)

RSatService &operator=(const RSatService &)[private]

Prohibit assigment operator if not deriving from CBase.

Parameters

const RSatService &

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

Specifies icon role.

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

TIpcArgs iArgs[private]

Arguments for asynchronous message.

TInt iMaxIconDataSize

TInt iMaxIconDataSize[private]

Maximum support icon size.

CSatPluginMonitor * iSatPluginMonitor

CSatPluginMonitor *iSatPluginMonitor[private]

SetupIdleMode content monitoring. Own