UserPromptService::RUpsSubsession Class Reference

class UserPromptService::RUpsSubsession : public RScsClientSubsessionBase

System servers use this class to establish a connection to the UPS for a specific client. Before checking a request with the User Prompt Service the Authorise method first checks whether authorisation from the User Prompt Service is required. If authorisation is not required e.g. the client has the correct capabilities for the service then Authorise completes immediately.

Inherits from

Public Member Functions
RUpsSubsession ()
IMPORT_C void Authorise ( TBool , const TServiceId &, const TDesC &, TUpsDecision &, TRequestStatus &)
IMPORT_C void Authorise ( TBool , const TServiceId &, const TDesC &, const TDesC8 &, TUpsDecision &, TRequestStatus &)
IMPORT_C void CancelPrompt ()
IMPORT_C void Close ()
IMPORT_C TInt Initialise ( RUpsSession &, const RThread &)
Private Member Functions
void AuthoriseInternal ( TBool , const TServiceId &, const TDesC &, const TDesC8 &, TUpsDecision &, TRequestStatus &)
TInt CreateSubsession ()
void ExecutePrompt ( TBool , TUpsDecision &, TRequestStatus &)
TInt PreparePrompt (const TServiceId &, const TDesC &, const TDesC8 &)
Inherited Functions
RScsClientSubsessionBase::CallSubsessionFunction(TInt)const
RScsClientSubsessionBase::CallSubsessionFunction(TInt,const TIpcArgs &)const
RScsClientSubsessionBase::CallSubsessionFunction(TInt,const TIpcArgs &,TRequestStatus &)const
RScsClientSubsessionBase::CancelSubsessionFunction(TInt)const
RScsClientSubsessionBase::CreateSubsession(const RScsClientBase &,TInt,const TIpcArgs &)
RScsClientSubsessionBase::RScsClientSubsessionBase()
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
Private Attributes
TProcessId iClientPid
TSecureId iClientSid
TThreadId iClientTid
TPtr8 iDecPtr
TBool iSubsessionCreated
RUpsSession * iUpsSession

Constructor & Destructor Documentation

RUpsSubsession()

IMPORT_C RUpsSubsession ( )

This constructor provides a single point of definition from which the superclass constructor is called.

Member Functions Documentation

Authorise(TBool, const TServiceId &, const TDesC &, TUpsDecision &, TRequestStatus &)

IMPORT_C void Authorise ( TBool aServerCheckOk,
const TServiceId & aServiceId,
const TDesC & aDestination,
TUpsDecision & aDecision,
TRequestStatus & aStatus
)

Determines whether the system server should perform the service requested by the client application. Depending on licensee configuration this function will either complete immediately if the client passed the system servers security policy check. Alternatively, every request may require additional authorisation by the User Prompt Service.

Parameters

TBool aServerCheckOk Whether the client request passed the security check implemented by the system server e.g. does the client have the correct capabilities for the requested service.
const TServiceId & aServiceId Service which the client wants to use.
const TDesC & aDestination More information about the service, e.g. this could be a telephone number is the client wanted to make a call.
TUpsDecision & aDecision When the request completes successfully, the verdict is written to this variable.
TRequestStatus & aStatus The server completes this request object when it has finished handling the request.

Authorise(TBool, const TServiceId &, const TDesC &, const TDesC8 &, TUpsDecision &, TRequestStatus &)

IMPORT_C void Authorise ( TBool aServerCheckOk,
const TServiceId & aServiceId,
const TDesC & aDestination,
const TDesC8 & aOpaqueData,
TUpsDecision & aDecision,
TRequestStatus & aStatus
)

Determines whether the system server should perform the service requested by the client application. Depending on licensee configuration this function will either complete immediately if the client passed the system servers security policy check. Alternatively, every request may require additional authorisation by the User Prompt Service.

Parameters

TBool aServerCheckOk Whether the client request passed the security check implemented by the system server e.g. does the client have the correct capabilities for the requested service.
const TServiceId & aServiceId Service which the client wants to use.
const TDesC & aDestination More information about the service, e.g. this could be a telephone number is the client wanted to make a call.
const TDesC8 & aOpaqueData Additional information to describe the request.
TUpsDecision & aDecision When the request completes successfully, the verdict is written to this variable.
TRequestStatus & aStatus The server completes this request object when it has finished handling the request.

AuthoriseInternal(TBool, const TServiceId &, const TDesC &, const TDesC8 &, TUpsDecision &, TRequestStatus &)

void AuthoriseInternal ( TBool aServerCheckOk,
const TServiceId & aServiceId,
const TDesC & aDestination,
const TDesC8 & aOpaqueData,
TUpsDecision & aDecision,
TRequestStatus & aStatus
) [private]

This helper function is called by the exported overloads of Authorise. It sends the data supplied by the SS to the UPS server.

capability
ProtServ

Parameters

TBool aServerCheckOk Did the system server checks pass?
const TServiceId & aServiceId Service which the client wants to use.
const TDesC & aDestination More information about the service, e.g. this could be a telephone number is the client wanted to make a call.
const TDesC8 & aOpaqueData Additional information to describe the request. This is KNullDesC8 if the SS used the Authorise overload which did not take opaque data.
TUpsDecision & aDecision When the request completes successfully, the verdict is written to this variable.
TRequestStatus & aStatus The server completes this request object when it has finished handling the request.

CancelPrompt()

IMPORT_C void CancelPrompt ( )

Cancel the prompt request which was launched by calling Authorise.

This function has no effect if there is no outstanding request.
capability
ProtServ

Close()

IMPORT_C void Close ( )

Close and clean up this subsession object.

CreateSubsession()

TInt CreateSubsession ( ) [private]

Create a subsession for a specific SS client over the supplied session.

capability
ProtServ

ExecutePrompt(TBool, TUpsDecision &, TRequestStatus &)

void ExecutePrompt ( TBool aServerCheckOk,
TUpsDecision & aDecision,
TRequestStatus & aStatus
) [private]

Ask the UPS to execute the request which was set up with PreparePrompt.

capability
ProtServ
PreparePrompt

Parameters

TBool aServerCheckOk
TUpsDecision & aDecision When the request completes successfully, this argument is updated with the verdict.
TRequestStatus & aStatus The server completes this request object when it has finished handling the request.

Initialise(RUpsSession &, const RThread &)

IMPORT_C TInt Initialise ( RUpsSession & aSession,
const RThread & aClient
)

Saves the details required to create a subsession specific to the client thread.

The actual subsession creation is defered until the subsession is required (which may be never if the policy says server checks are sufficient).

Several RUpsSubsession objects can share a single RUpsSession .

If any of the RUpsSubsession objects are to be used in a different thread to the RUpsSession , then ShareAuto() must be called on the RUpsSession .

RSubSessionBase::CreateSubsession

Parameters

RUpsSession & aSession Connected session to the UPS server.
const RThread & aClient SS client for whom this session is set up.

PreparePrompt(const TServiceId &, const TDesC &, const TDesC8 &)

TInt PreparePrompt ( const TServiceId & aServiceId,
const TDesC & aDestination,
const TDesC8 & aOpaqueData
) [private]

Ask the UPS server to prepare to make a decision. This will be followed by a call to ExecutePrompt.

capability
ProtServ
ExecutePrompt

Parameters

const TServiceId & aServiceId Service which the client wants to use.
const TDesC & aDestination More information about the service, e.g. this could be a telephone number is the client wanted to make a call.
const TDesC8 & aOpaqueData Additional information to describe the request. This is KNullDesC8 if the SS used the Authorise overload which did not take opaque data.

Member Data Documentation

TProcessId iClientPid

TProcessId iClientPid [private]

TSecureId iClientSid

TSecureId iClientSid [private]

TThreadId iClientTid

TThreadId iClientTid [private]

TPtr8 iDecPtr

TPtr8 iDecPtr [private]

Describes the TUpsDecision reference passed into Authorise.

TBool iSubsessionCreated

TBool iSubsessionCreated [private]

RUpsSession * iUpsSession

RUpsSession * iUpsSession [private]