CPermission Class Reference

class CPermission : public CBase

Represents permission data structure.

A permission data is modelled as 32 bit unsigned integer type with the following layout :

  • With leftmost 20 bits representing one of symbian native capability value

  • Bits 25 to 28 represent various user prompt conditions like oneshot, session or blanket

  • Bits 29-32 represent default condition value

  • Bits 21-24 are reserved

Various accessor and modifier methods are provided to access underlying native capability value, the default condition and the conditions set for this permission data.

rtsecmgrutil.lib

Inherits from

Public Member Functions
~CPermission ()
IMPORT_C void AppendCapPermData ( TCapability )
IMPORT_C void Capabilitilites ( RCapabilityArray &)
IMPORT_C TCapability Capability ()
IMPORT_C TUserPromptOption Condition ()
IMPORT_C TUserPromptOption Default ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C CPermission * NewL ()
IMPORT_C CPermission * NewL (const CPermission &)
IMPORT_C CPermission * NewL (const RCapabilityArray &)
IMPORT_C CPermission * NewL (const RCapabilityArray &, TUserPromptOption )
IMPORT_C CPermission * NewL (const RCapabilityArray &, TUserPromptOption , TUserPromptOption )
IMPORT_C CPermission * NewLC ()
IMPORT_C CPermission * NewLC (const CPermission &)
IMPORT_C CPermission * NewLC (const RCapabilityArray &)
IMPORT_C CPermission * NewLC (const RCapabilityArray &, TUserPromptOption )
IMPORT_C CPermission * NewLC (const RCapabilityArray &, TUserPromptOption , TUserPromptOption )
IMPORT_C const TDesC & PermName ()
IMPORT_C TPermissionData PermissionData ()
IMPORT_C void SetCondition ( TUserPromptOption )
IMPORT_C void SetDefault ( TUserPromptOption )
IMPORT_C void SetPermName (const TDesC &)
IMPORT_C void SetPermissionData ( TPermissionData )
Private Member Functions
CPermission ()
CPermission (const CPermission &)
CPermission (const RCapabilityArray &)
CPermission (const RCapabilityArray &, TUserPromptOption )
CPermission (const RCapabilityArray &, TUserPromptOption , TUserPromptOption )
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()
Private Attributes
HBufC * iPermName
TPermissionData iPermissionData

Constructor & Destructor Documentation

CPermission()

CPermission ( ) [private, inline]

CPermission(const CPermission &)

CPermission ( const CPermission & aPermission ) [private]

Parameters

const CPermission & aPermission

CPermission(const RCapabilityArray &)

CPermission ( const RCapabilityArray & aCapabilities ) [private]

Parameters

const RCapabilityArray & aCapabilities

CPermission(const RCapabilityArray &, TUserPromptOption)

CPermission ( const RCapabilityArray & aCapabilities,
TUserPromptOption aDefOpt
) [private]

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt

CPermission(const RCapabilityArray &, TUserPromptOption, TUserPromptOption)

CPermission ( const RCapabilityArray & aCapabilities,
TUserPromptOption aDefOpt,
TUserPromptOption aCondition
) [private]

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt
TUserPromptOption aCondition

~CPermission()

IMPORT_C ~CPermission ( )

destructor

Member Functions Documentation

AppendCapPermData(TCapability)

IMPORT_C void AppendCapPermData ( TCapability aCap )

Parameters

TCapability aCap

Capabilitilites(RCapabilityArray &)

IMPORT_C void Capabilitilites ( RCapabilityArray & aCapabilities ) const

Returns capability of the permission

Parameters

RCapabilityArray & aCapabilities RCapabilityArray& contains the capabilities

Capability()

IMPORT_C TCapability Capability ( ) const

Returns capability value

Condition()

IMPORT_C TUserPromptOption Condition ( ) const

Returns condition

Default()

IMPORT_C TUserPromptOption Default ( ) const

Returns default prompt option

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aOutStream ) const

Externalizes permission data to stream

Parameters

RWriteStream & aOutStream RWriteStream output stream

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aInStream )

Internalizes permission data from stream

Parameters

RReadStream & aInStream RReadStream input source stream

NewL()

IMPORT_C CPermission * NewL ( ) [static]

Default constructor

NewL(const CPermission &)

IMPORT_C CPermission * NewL ( const CPermission & aPermission ) [static]

Copy constructor

Parameters

const CPermission & aPermission TPermission permission source from which copy is made

NewL(const RCapabilityArray &)

IMPORT_C CPermission * NewL ( const RCapabilityArray & aCapabilities ) [static]

Overloaded constructor taking capability

Parameters

const RCapabilityArray & aCapabilities

NewL(const RCapabilityArray &, TUserPromptOption)

IMPORT_C CPermission * NewL ( const RCapabilityArray & aCapabilities,
TUserPromptOption aDefOpt
) [static]

Overloaded constructor taking capability and default condition

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt

NewL(const RCapabilityArray &, TUserPromptOption, TUserPromptOption)

IMPORT_C CPermission * NewL ( const RCapabilityArray & aCapabilities,
TUserPromptOption aDefOpt,
TUserPromptOption aCondition
) [static]

Overloaded constructor taking capability, default condition and conditions of permission

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt
TUserPromptOption aCondition TUserPromptOption Conditions to be set

NewLC()

IMPORT_C CPermission * NewLC ( ) [static]

Default constructor

NewLC(const CPermission &)

IMPORT_C CPermission * NewLC ( const CPermission & aPermission ) [static]

Copy constructor

Parameters

const CPermission & aPermission TPermission permission source from which copy is made

NewLC(const RCapabilityArray &)

IMPORT_C CPermission * NewLC ( const RCapabilityArray & aCapabilities ) [static]

Overloaded constructor taking capability

Parameters

const RCapabilityArray & aCapabilities

NewLC(const RCapabilityArray &, TUserPromptOption)

IMPORT_C CPermission * NewLC ( const RCapabilityArray & aCapabilities,
TUserPromptOption aDefOpt
) [static]

Overloaded constructor taking capability and default condition

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt

NewLC(const RCapabilityArray &, TUserPromptOption, TUserPromptOption)

IMPORT_C CPermission * NewLC ( const RCapabilityArray & aCapabilities,
TUserPromptOption aDefOpt,
TUserPromptOption aCondition
) [static]

Overloaded constructor taking capability, default condition and conditions of permission

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt
TUserPromptOption aCondition TUserPromptOption Conditions to be set

PermName()

IMPORT_C const TDesC & PermName ( ) const

Returns Name of the permission

PermissionData()

IMPORT_C TPermissionData PermissionData ( ) const

Returns iPermissionData of the permission

SetCondition(TUserPromptOption)

IMPORT_C void SetCondition ( TUserPromptOption aCondition )

Sets condition value

Parameters

TUserPromptOption aCondition TUserPromptOption condition value

SetDefault(TUserPromptOption)

IMPORT_C void SetDefault ( TUserPromptOption aDefaultOption )

Sets default condition value

Parameters

TUserPromptOption aDefaultOption TUserPromptOption default condition value

SetPermName(const TDesC &)

IMPORT_C void SetPermName ( const TDesC & aName )

Sets the name of the permission

Parameters

const TDesC & aName const TDesC& value

SetPermissionData(TPermissionData)

IMPORT_C void SetPermissionData ( TPermissionData aPermData )

Parameters

TPermissionData aPermData

Member Data Documentation

HBufC * iPermName

HBufC * iPermName [private]

TPermissionData iPermissionData

TPermissionData iPermissionData [private]