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 voidAppendCapPermData(TCapability)
IMPORT_C voidCapabilitilites(RCapabilityArray &)
IMPORT_C TCapabilityCapability()
IMPORT_C TUserPromptOptionCondition()
IMPORT_C TUserPromptOptionDefault()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidInternalizeL(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 TPermissionDataPermissionData()
IMPORT_C voidSetCondition(TUserPromptOption)
IMPORT_C voidSetDefault(TUserPromptOption)
IMPORT_C voidSetPermName(const TDesC &)
IMPORT_C voidSetPermissionData(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,
TUserPromptOptionaDefOpt
)[private]

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt

CPermission(const RCapabilityArray &, TUserPromptOption, TUserPromptOption)

CPermission(const RCapabilityArray &aCapabilities,
TUserPromptOptionaDefOpt,
TUserPromptOptionaCondition
)[private]

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt
TUserPromptOption aCondition

~CPermission()

IMPORT_C~CPermission()

destructor

Member Functions Documentation

AppendCapPermData(TCapability)

IMPORT_C voidAppendCapPermData(TCapabilityaCap)

Parameters

TCapability aCap

Capabilitilites(RCapabilityArray &)

IMPORT_C voidCapabilitilites(RCapabilityArray &aCapabilities)const

Returns capability of the permission

Parameters

RCapabilityArray & aCapabilitiesRCapabilityArray& contains the capabilities

Capability()

IMPORT_C TCapabilityCapability()const

Returns capability value

Condition()

IMPORT_C TUserPromptOptionCondition()const

Returns condition

Default()

IMPORT_C TUserPromptOptionDefault()const

Returns default prompt option

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aOutStream)const

Externalizes permission data to stream

Parameters

RWriteStream & aOutStreamRWriteStream output stream

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aInStream)

Internalizes permission data from stream

Parameters

RReadStream & aInStreamRReadStream 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 & aPermissionTPermission 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,
TUserPromptOptionaDefOpt
)[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,
TUserPromptOptionaDefOpt,
TUserPromptOptionaCondition
)[static]

Overloaded constructor taking capability, default condition and conditions of permission

Parameters

const RCapabilityArray & aCapabilities
TUserPromptOption aDefOpt
TUserPromptOption aConditionTUserPromptOption 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 & aPermissionTPermission 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,
TUserPromptOptionaDefOpt
)[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,
TUserPromptOptionaDefOpt,
TUserPromptOptionaCondition
)[static]

Overloaded constructor taking capability, default condition and conditions of permission

Parameters

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

PermName()

IMPORT_C const TDesC &PermName()const

Returns Name of the permission

PermissionData()

IMPORT_C TPermissionDataPermissionData()const

Returns iPermissionData of the permission

SetCondition(TUserPromptOption)

IMPORT_C voidSetCondition(TUserPromptOptionaCondition)

Sets condition value

Parameters

TUserPromptOption aConditionTUserPromptOption condition value

SetDefault(TUserPromptOption)

IMPORT_C voidSetDefault(TUserPromptOptionaDefaultOption)

Sets default condition value

Parameters

TUserPromptOption aDefaultOptionTUserPromptOption default condition value

SetPermName(const TDesC &)

IMPORT_C voidSetPermName(const TDesC &aName)

Sets the name of the permission

Parameters

const TDesC & aNameconst TDesC& value

SetPermissionData(TPermissionData)

IMPORT_C voidSetPermissionData(TPermissionDataaPermData)

Parameters

TPermissionData aPermData

Member Data Documentation

HBufC * iPermName

HBufC *iPermName[private]

TPermissionData iPermissionData

TPermissionData iPermissionData[private]