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 void Close ()
IMPORT_C void GetIconInfoL ( TUint8 , RIconEf &)
IMPORT_C CFbsBitmap * GetIconL (const TSatIconInfo &)
IMPORT_C TBool GetSetupIdleModeTextL ( HBufC *&, TSatIconQualifier &, TUint8 &)
IMPORT_C TInt NotifySetupIdleModeTextChange ( TRequestStatus &)
IMPORT_C void NotifySetupIdleModeTextChangeCancel ()
IMPORT_C void OpenL (const RSatSession &)
IMPORT_C void SetIdleModeTextResponse (const TSATIdleResult &)
Private Member Functions
RSatService (const RSatService &)
void CheckInfoValidityL (const TDesC8 &)
void FillInternalIconInfo (const TSatIconInfo &, TSatInternalIconInfo &)
void SetIconInfoL (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
enum TSATIdleResult { ESATIdleSuccess  = 0x00, ESATIdleSuccessRequestedIconNotDisplayed  = 0x04, ESATIdleMeUnableToProcessCmd  = 0x20, ESATIdleCmdBeyondMeCapabilities  = 0x30 }
enum TSatIconQualifier { ESatIconNoIcon  = 1, ESatIconSelfExplanatory , ESatIconNotSelfExplanatory }
Private Attributes
TIpcArgs iArgs
TInt iMaxIconDataSize
CSatPluginMonitor * iSatPluginMonitor

Constructor & Destructor Documentation

RSatService()

IMPORT_C RSatService ( )

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 &)

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.

Close()

IMPORT_C void Close ( )

Closes the sub-session.

Since
5.1

FillInternalIconInfo(const TSatIconInfo &, TSatInternalIconInfo &)

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

Convert TSatIconinfo to TSatInternalIconInfo.

Since
5.1

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.

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

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.

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 & aIconInfo Information of the selected icon.

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

IMPORT_C TBool GetSetupIdleModeTextL ( 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 *& 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 &)

IMPORT_C TInt NotifySetupIdleModeTextChange ( 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 & aStatus Request to be completed on update.

NotifySetupIdleModeTextChangeCancel()

IMPORT_C void NotifySetupIdleModeTextChangeCancel ( )

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

Since
5.1

OpenL(const RSatSession &)

IMPORT_C void OpenL ( const RSatSession & aSession )

Opens the sub-session.

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

Parameters

const RSatSession & aSession Sub-session.

SetIconInfoL(TSatIconInfo &, const TDesC8 &)

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

Set ETSI specified bitmap data to TSatIconInfo.

Since
5.1

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

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 & aResult Result 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