UserPromptService::CPolicy Class Reference

class UserPromptService::CPolicy : public CBase

Class for a single policy record.

Inherits from

Public Member Functions
~CPolicy ()
IMPORT_C TBool Default ()
IMPORT_C const TDesC & Destination ()
IMPORT_C const TUid & DialogCreator ()
IMPORT_C TUint16 Flags ()
IMPORT_C TUint16 MajorVersion ()
IMPORT_C TBool Matches (const TSecureId &, const TDesC &, TBool )
IMPORT_C TUint16 MinorVersion ()
IMPORT_C CPolicy * NewL (const TSidClasses &, const RArray < TSecureId > &, const TDesC &, TUint , const TUid &, const TUid &, TUint16 , TSystemServerSecurity , TUint16 , TUint16 , TBool )
IMPORT_C CPolicy * NewLC (const TSidClasses &, const RArray < TSecureId > &, const TDesC &, TUint , const TUid &, const TUid &, TUint16 , TSystemServerSecurity , TUint16 , TUint16 , TBool )
IMPORT_C TOptions Options ()
IMPORT_C const TUid & PolicyEvaluator ()
IMPORT_C TBool PromptRequired ()
IMPORT_C const TSidClasses & SidClasses ()
IMPORT_C const RArray < TSecureId > & SidList ()
IMPORT_C TSystemServerSecurity SystemServerSecurity ()
Private Member Functions
CPolicy (const TSidClasses &, TUint , const TUid &, const TUid &, TUint16 , TSystemServerSecurity , TUint16 , TUint16 , TBool )
void ConstructL (const RArray < TSecureId > &, const TDesC &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TOptions {
EYes  = 0x01, ENo  = 0x02, ESession  = 0x04, ESessionYes  = 0x04, EAlways  = 0x08, ENever  = 0x10, ESessionNo  = 0x20
}
enum TSystemServerSecurity { ESystemServerSecurityPassedOrFailed  = 0, ESystemServerSecurityFailed  = 1, ESystemServerSecurityPassed  = 2 }
Private Attributes
TBool iDefault
HBufC * iDestination
TUid iDialogCreator
TUint16 iFlags
TUint16 iMajorVersion
TUint16 iMinorVersion
TUint iOptions
TUid iPolicyEvaluator
TSidClasses iSidClasses
RArray < TSecureId > iSidList
TSystemServerSecurity iSystemServerSecurity

Constructor & Destructor Documentation

CPolicy(const TSidClasses &, TUint, const TUid &, const TUid &, TUint16, TSystemServerSecurity, TUint16, TUint16, TBool)

CPolicy ( const TSidClasses & aSidClasses,
TUint aOptions,
const TUid & aPolicyEvaluator,
const TUid & aDialogCreator,
TUint16 aFlags,
TSystemServerSecurity aSystemServerSecurity,
TUint16 aMajorVersion,
TUint16 aMinorVersion,
TBool aDefault
) [private]

Parameters

const TSidClasses & aSidClasses
TUint aOptions
const TUid & aPolicyEvaluator
const TUid & aDialogCreator
TUint16 aFlags
TSystemServerSecurity aSystemServerSecurity
TUint16 aMajorVersion
TUint16 aMinorVersion
TBool aDefault

~CPolicy()

~CPolicy ( )

Member Functions Documentation

ConstructL(const RArray< TSecureId > &, const TDesC &)

void ConstructL ( const RArray < TSecureId > & aSidList,
const TDesC & aDescription
) [private]

Parameters

const RArray < TSecureId > & aSidList
const TDesC & aDescription

Default()

IMPORT_C TBool Default ( ) const

Destination()

IMPORT_C const TDesC & Destination ( ) const

DialogCreator()

IMPORT_C const TUid & DialogCreator ( ) const

Flags()

IMPORT_C TUint16 Flags ( ) const

MajorVersion()

IMPORT_C TUint16 MajorVersion ( ) const

Matches(const TSecureId &, const TDesC &, TBool)

IMPORT_C TBool Matches ( const TSecureId & aClientSid,
const TDesC & aDestination,
TBool aSecurityResult
) const

Parameters

const TSecureId & aClientSid
const TDesC & aDestination
TBool aSecurityResult

MinorVersion()

IMPORT_C TUint16 MinorVersion ( ) const

NewL(const TSidClasses &, const RArray< TSecureId > &, const TDesC &, TUint, const TUid &, const TUid &, TUint16, TSystemServerSecurity, TUint16, TUint16, TBool)

IMPORT_C CPolicy * NewL ( const TSidClasses & aSidClasses,
const RArray < TSecureId > & aSidList,
const TDesC & aDestination,
TUint aOptions,
const TUid & aPolicyEvaluator,
const TUid & aDialogCreator,
TUint16 aFlags,
TSystemServerSecurity aSystemServerSecurity,
TUint16 aMajorVersion,
TUint16 aMinorVersion,
TBool aDefault = EFalse
) [static]

Parameters

const TSidClasses & aSidClasses
const RArray < TSecureId > & aSidList
const TDesC & aDestination
TUint aOptions
const TUid & aPolicyEvaluator
const TUid & aDialogCreator
TUint16 aFlags
TSystemServerSecurity aSystemServerSecurity
TUint16 aMajorVersion
TUint16 aMinorVersion
TBool aDefault = EFalse

NewLC(const TSidClasses &, const RArray< TSecureId > &, const TDesC &, TUint, const TUid &, const TUid &, TUint16, TSystemServerSecurity, TUint16, TUint16, TBool)

IMPORT_C CPolicy * NewLC ( const TSidClasses & aSidClasses,
const RArray < TSecureId > & aSidList,
const TDesC & aDestination,
TUint aOptions,
const TUid & aPolicyEvaluator,
const TUid & aDialogCreator,
TUint16 aFlags,
TSystemServerSecurity aSystemServerSecurity,
TUint16 aMajorVersion,
TUint16 aMinorVersion,
TBool aDefault = EFalse
) [static]

Parameters

const TSidClasses & aSidClasses
const RArray < TSecureId > & aSidList
const TDesC & aDestination
TUint aOptions
const TUid & aPolicyEvaluator
const TUid & aDialogCreator
TUint16 aFlags
TSystemServerSecurity aSystemServerSecurity
TUint16 aMajorVersion
TUint16 aMinorVersion
TBool aDefault = EFalse

Options()

IMPORT_C TOptions Options ( ) const

PolicyEvaluator()

IMPORT_C const TUid & PolicyEvaluator ( ) const

PromptRequired()

IMPORT_C TBool PromptRequired ( ) const

SidClasses()

IMPORT_C const TSidClasses & SidClasses ( ) const

SidList()

IMPORT_C const RArray < TSecureId > & SidList ( ) const

SystemServerSecurity()

IMPORT_C TSystemServerSecurity SystemServerSecurity ( ) const

Member Enumerations Documentation

Enum TOptions

Defines the elements in the options field that determines whether a prompt should be displayed and if so what buttons are available.

All other bits are reserved for future use and should be ignored by the custom Policy Evaluators and Dialog Creators.

Enumerators

EYes = 0x01
ENo = 0x02
ESession = 0x04
ESessionYes = 0x04
EAlways = 0x08
ENever = 0x10
ESessionNo = 0x20

Enum TSystemServerSecurity

Allows policies to be matched according to whether the client process passed security check defined by the system server. Typically, this corresponds to whether the client has the correct capabilities for the requested service. However, system servers are free to use features other than capabilities in their security check.

E.g. If the client has the correct capabilities for the requested service then the "Always" and "Never" options will be enabled in the policy; otherwise, a different policy will be matched where the prompt is limited to one-shot permissions ("Yes" and "No").

Enumerators

ESystemServerSecurityPassedOrFailed = 0

The policy applies regardless of whether the client process passed the system server's security check.

ESystemServerSecurityFailed = 1

The policy only applies if the client process failed the system server's security check.

ESystemServerSecurityPassed = 2

The policy only applies if the client process passed the system server's security check.

Member Data Documentation

TBool iDefault

TBool iDefault [private]

HBufC * iDestination

HBufC * iDestination [private]

TUid iDialogCreator

TUid iDialogCreator [private]

TUint16 iFlags

TUint16 iFlags [private]

TUint16 iMajorVersion

TUint16 iMajorVersion [private]

TUint16 iMinorVersion

TUint16 iMinorVersion [private]

TUint iOptions

TUint iOptions [private]

TUid iPolicyEvaluator

TUid iPolicyEvaluator [private]

TSidClasses iSidClasses

TSidClasses iSidClasses [private]

RArray< TSecureId > iSidList

RArray < TSecureId > iSidList [private]

TSystemServerSecurity iSystemServerSecurity

TSystemServerSecurity iSystemServerSecurity [private]

Whether this policy is specific to clients that passed/failed the system server's security check.