RxSPViewServices Class Reference

class RxSPViewServices : public RSessionBase

The xSP View API, which is used to bring a certain view in front and get tab-view information.

There is an issue with KErrServerTerminated error code sometimes returned by this API functions. This situation may arise when server object is terminated with the Phonebook process but clients outside the Phonebook are not informed and their handles remain open. A way to deal with this KErrServerTerminated error is to close the handle first by calling Close() and then reopen it by calling Open() or Activate() methods which do not require explicit Open() calls.

The following panic codes are possible in case the API is abused:

Panic category xSPViewActivator. These panics represent programming errors which are detected by the view activator service that activates a tab view. Possible panic codes for this category are: EBadDescriptorLength = 0 (descriptor length was illegal), EBadDescriptor = 1 (descriptor type was not correct; could not write to client side descriptor buffer).

Inherits from

Public Member Functions
RxSPViewServices ()
IMPORT_C TInt Activate ( TUint32 , TInt )
IMPORT_C TInt Activate ( TUint32 , TInt , TPtr8 &)
IMPORT_C void Activate ( TUint32 , TInt , TPtr8 &, TRequestStatus &)
IMPORT_C void ActivateL ( TUint32 , TInt , MVPbkContactLink *, TInt )
IMPORT_C TInt CancelActivate ()
IMPORT_C TInt CancelGetPackedViewData ()
IMPORT_C TInt CancelGetPackedViewDataBufferLength ()
IMPORT_C TInt CancelGetViewCount ()
IMPORT_C void Close ()
IMPORT_C TInt GetPackedViewData ( TInt , TDes8 &)
IMPORT_C TInt GetPackedViewData ( TInt , TDes8 &, TRequestStatus &)
IMPORT_C TInt GetPackedViewDataBufferLength ( TInt , TInt &)
IMPORT_C TInt GetPackedViewDataBufferLength ( TInt , TInt &, TRequestStatus &)
IMPORT_C TInt GetViewCount ( TInt &)
IMPORT_C TInt GetViewCount ( TInt &, TRequestStatus &)
IMPORT_C TInt Open ()
IMPORT_C TInt Open ( TInt , TIpcSessionType , TRequestStatus &)
Private Member Functions
void StartPhonebookL ()
TVersion Version ()
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TPtr8 iPackedViewDataBufferLength
TPtr8 iViewCount
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RxSPViewServices()

IMPORT_C RxSPViewServices ( )

Constructor

Member Functions Documentation

Activate(TUint32, TInt)

IMPORT_C TInt Activate ( TUint32 aEComID,
TInt aOriginalViewID
)

Triggers xSP extension view activation. Starts the Phonebook if it was not running already. Designed to be used by the xSP extension view activator. If the session was not open, this method will open one and close it afterwards. If the session was open, this method will not close it afterwards.

Parameters

TUint32 aEComID xSP extension ECom implementation ID
TInt aOriginalViewID view original / old ID

Activate(TUint32, TInt, TPtr8 &)

IMPORT_C TInt Activate ( TUint32 aEComID,
TInt aOriginalViewID,
TPtr8 & aParamBuf
)

Triggers xSP extension view activation. Starts the Phonebook if it was not running already. Designed to be used by the xSP extension view activator. If the session was not open, this method will open one and close it afterwards. If the session was open, this method will not close it afterwards.

Parameters

TUint32 aEComID xSP extension ECom implementation ID
TInt aOriginalViewID view original / old ID
TPtr8 & aParamBuf specifies which contact to show (see CPbk2ViewState.h or CPbkViewState.h for details)

Activate(TUint32, TInt, TPtr8 &, TRequestStatus &)

IMPORT_C void Activate ( TUint32 aEComID,
TInt aOriginalViewID,
TPtr8 & aParamBuf,
TRequestStatus & aStatus
)

Triggers view activation asynchronously.

Parameters

TUint32 aEComID xSP extension ECom implementation ID
TInt aOriginalViewID view original / old ID
TPtr8 & aParamBuf specifies which contact to show (see CPbk2ViewState.h or CPbkViewState.h for details)
TRequestStatus & aStatus contains the status of the request on completion

ActivateL(TUint32, TInt, MVPbkContactLink *, TInt)

IMPORT_C void ActivateL ( TUint32 aEComID,
TInt aOriginalViewID,
MVPbkContactLink * aContactLink,
TInt aFocusedField
)

Triggers xSP extension view activation. Starts the Phonebook if it was not running already. Designed to be used by the xSP extension view activator. If the session was not open, this method will open one and close it afterwards. If the session was open, this method will not close it afterwards.

Parameters

TUint32 aEComID xSP extension ECom implementation ID
TInt aOriginalViewID view original / old ID
MVPbkContactLink * aContactLink which contact item to show
TInt aFocusedField which field gets the focus

CancelActivate()

IMPORT_C TInt CancelActivate ( ) const

Cancel activate

CancelGetPackedViewData()

IMPORT_C TInt CancelGetPackedViewData ( ) const

Cancel get packet view data

CancelGetPackedViewDataBufferLength()

IMPORT_C TInt CancelGetPackedViewDataBufferLength ( ) const

Cancel async get packed view data buffer length

CancelGetViewCount()

IMPORT_C TInt CancelGetViewCount ( ) const

Cancel async get view count

Close()

IMPORT_C void Close ( )

Closes the session.

GetPackedViewData(TInt, TDes8 &)

IMPORT_C TInt GetPackedViewData ( TInt aIndex,
TDes8 & aPackedViewData
) const

Get packed view data

Parameters

TInt aIndex view index
TDes8 & aPackedViewData reference to allocated buffer. The buffer will contain packed data on successful return

GetPackedViewData(TInt, TDes8 &, TRequestStatus &)

IMPORT_C TInt GetPackedViewData ( TInt aIndex,
TDes8 & aPackedViewData,
TRequestStatus & aStatus
)

Get packed view data. Async version.

Parameters

TInt aIndex view index
TDes8 & aPackedViewData reference to allocated buffer. The buffer will contain packed data on successful completion
TRequestStatus & aStatus request status

GetPackedViewDataBufferLength(TInt, TInt &)

IMPORT_C TInt GetPackedViewDataBufferLength ( TInt aIndex,
TInt & aLength
) const

Get packed view data buffer length

Parameters

TInt aIndex view index
TInt & aLength placeholder for buffer length

GetPackedViewDataBufferLength(TInt, TInt &, TRequestStatus &)

IMPORT_C TInt GetPackedViewDataBufferLength ( TInt aIndex,
TInt & aLength,
TRequestStatus & aStatus
)

Get packed view data buffer length. Async version.

Parameters

TInt aIndex view index
TInt & aLength placeholder for buffer length
TRequestStatus & aStatus request status

GetViewCount(TInt &)

IMPORT_C TInt GetViewCount ( TInt & aCount ) const

Get view count

Parameters

TInt & aCount placeholder for view count

GetViewCount(TInt &, TRequestStatus &)

IMPORT_C TInt GetViewCount ( TInt & aCount,
TRequestStatus & aStatus
)

Get view count. Async version.

Parameters

TInt & aCount placeholder for view count
TRequestStatus & aStatus request status

Open()

IMPORT_C TInt Open ( )

Opens a session to the server. Launches Phonebook in the background.

Open(TInt, TIpcSessionType, TRequestStatus &)

IMPORT_C TInt Open ( TInt aAsyncMessageSlots,
TIpcSessionType aType,
TRequestStatus & aStatus
)

Opens a session to the server. Async version. Launches Phonebook in the background.

Parameters

TInt aAsyncMessageSlots The number of message slots available to session.
TIpcSessionType aType type of session to create.
TRequestStatus & aStatus request status

StartPhonebookL()

void StartPhonebookL ( ) [private]

Starts the Phonebook if it is not already running.

Version()

TVersion Version ( ) const [private]

Returns the client side API version.

Member Data Documentation

TPtr8 iPackedViewDataBufferLength

TPtr8 iPackedViewDataBufferLength [private]

TPtr8 iViewCount

TPtr8 iViewCount [private]