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 voidAuthorise(TBool, const TServiceId &, const TDesC &, TUpsDecision &, TRequestStatus &)
IMPORT_C voidAuthorise(TBool, const TServiceId &, const TDesC &, const TDesC8 &, TUpsDecision &, TRequestStatus &)
IMPORT_C voidCancelPrompt()
IMPORT_C voidClose()
IMPORT_C TIntInitialise(RUpsSession &, const RThread &)
Private Member Functions
voidAuthoriseInternal(TBool, const TServiceId &, const TDesC &, const TDesC8 &, TUpsDecision &, TRequestStatus &)
TInt CreateSubsession()
voidExecutePrompt(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_CRUpsSubsession()

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 voidAuthorise(TBoolaServerCheckOk,
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.

RUpsSubsession::AuthoriseInternal
capability
ProtServ

Parameters

TBool aServerCheckOkWhether 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 & aServiceIdService which the client wants to use.
const TDesC & aDestinationMore information about the service, e.g. this could be a telephone number is the client wanted to make a call.
TUpsDecision & aDecisionWhen the request completes successfully, the verdict is written to this variable.
TRequestStatus & aStatusThe server completes this request object when it has finished handling the request.

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

IMPORT_C voidAuthorise(TBoolaServerCheckOk,
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.

RUpsSubsession::AuthoriseInternal
capability
ProtServ

Parameters

TBool aServerCheckOkWhether 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 & aServiceIdService which the client wants to use.
const TDesC & aDestinationMore information about the service, e.g. this could be a telephone number is the client wanted to make a call.
const TDesC8 & aOpaqueDataAdditional information to describe the request.
TUpsDecision & aDecisionWhen the request completes successfully, the verdict is written to this variable.
TRequestStatus & aStatusThe server completes this request object when it has finished handling the request.

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

voidAuthoriseInternal(TBoolaServerCheckOk,
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 aServerCheckOkDid the system server checks pass?
const TServiceId & aServiceIdService which the client wants to use.
const TDesC & aDestinationMore information about the service, e.g. this could be a telephone number is the client wanted to make a call.
const TDesC8 & aOpaqueDataAdditional information to describe the request. This is KNullDesC8 if the SS used the Authorise overload which did not take opaque data.
TUpsDecision & aDecisionWhen the request completes successfully, the verdict is written to this variable.
TRequestStatus & aStatusThe server completes this request object when it has finished handling the request.

CancelPrompt()

IMPORT_C voidCancelPrompt()

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

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

voidExecutePrompt(TBoolaServerCheckOk,
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 & aDecisionWhen the request completes successfully, this argument is updated with the verdict.
TRequestStatus & aStatusThe server completes this request object when it has finished handling the request.

Initialise(RUpsSession &, const RThread &)

IMPORT_C TIntInitialise(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 & aSessionConnected session to the UPS server.
const RThread & aClientSS 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 & aServiceIdService which the client wants to use.
const TDesC & aDestinationMore information about the service, e.g. this could be a telephone number is the client wanted to make a call.
const TDesC8 & aOpaqueDataAdditional 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]