CKeyLockPolicyApiImpl Class Reference

class CKeyLockPolicyApiImpl : public CBase

Keylock policy component supports three policy types:

EPolicyActivateKeyguard keys used for keyguard locking EPolicyDeactivateKeyguard keys used for keyguard unlocking EPolicyDevicelockQuery keys used for showing devicelock query CKeyLockPolicyApi . Trough CKeyLockPolicyApi users can

keylockpolicy.lib
Since
3.2

Inherits from

Constructor & Destructor Documentation

CKeyLockPolicyApiImpl(TLockPolicyType)

CKeyLockPolicyApiImpl ( TLockPolicyType aType ) [private]

C++ default constructor (private so cannot be derived).

Parameters

TLockPolicyType aType

~CKeyLockPolicyApiImpl()

~CKeyLockPolicyApiImpl ( )

Destructor.

Member Functions Documentation

AddKeyCombination(TUint32, TUint32)

TInt AddKeyCombination ( TUint32 aPrimaryKey,
TUint32 aSecondaryKey
)

Adds a key combination for the policy type defined in the construction.

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey

ClearKeycombinations()

TInt ClearKeycombinations ( )

Clears all the defined key combinations from the policy.

ConstructL()

void ConstructL ( ) [private]

Second constructor initializes the policy

DisableKeyguardFeature()

TInt DisableKeyguardFeature ( )

Disables support for keyguard feature so the phone keys cannot be locked with keyguard. Does not affect the devicelock.

EnableKeyguardFeature()

TInt EnableKeyguardFeature ( )

Activates support for keyguard feature so the phone keys cannot be locked with keyguard. Does not affect the devicelock.

FindKeyCombinationIndex(TUint32, TUint32, TInt &)

TInt FindKeyCombinationIndex ( TUint32 aPrimaryKey,
TUint32 aSecondaryKey,
TInt & aIndex
) [private]

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey
TInt & aIndex

GetKeyCombination(TInt, TUint32 &, TUint32 &)

TInt GetKeyCombination ( TInt aIndex,
TUint32 & aPrimaryKey,
TUint32 & aSecondaryKey
)

Retrieve a key combination on the given index.

Parameters

TInt aIndex
TUint32 & aPrimaryKey
TUint32 & aSecondaryKey

GetLastPrimaryKey()

TUint GetLastPrimaryKey ( )

Returns Primary key scan code that has been pressed last.

GetNewKeyCombinationIndex(TInt &)

TInt GetNewKeyCombinationIndex ( TInt & aIndex ) [private]

Parameters

TInt & aIndex

HandleKeyEventL(const TKeyEvent &, const TEventCode)

TBool HandleKeyEventL ( const TKeyEvent & aKeyEvent,
const TEventCode aType
)

Handles Key events, returns ETrue the key events match any of the defined key combinations. Only uses scancodes with type EEventKeyDown.

Parameters

const TKeyEvent & aKeyEvent
const TEventCode aType

HandleKeyLockTimerTimeout(TAny *)

TInt HandleKeyLockTimerTimeout ( TAny * aSelf ) [private, static]

A call back to the keylock timer param TAny aSelf a pointer to the parent class

Parameters

TAny * aSelf

HandleNotifyInt(TUint32, TInt)

void HandleNotifyInt ( TUint32 aId,
TInt aNewValue
) [private]

From MCenRepNotifyHandlerCallback . Changes in the observed central repository keys are communicated trough this method.

Parameters

TUint32 aId
TInt aNewValue

HasConfiguration()

TBool HasConfiguration ( )

If no policy has been defined for the type it cannot be used.

KeyguardAllowed()

TBool KeyguardAllowed ( ) [static]

Whether keyguard feature is currently enabled or disabled.

NewL(TLockPolicyType)

CKeyLockPolicyApiImpl * NewL ( TLockPolicyType aType ) [static]

Use this to create keylock policy

Parameters

TLockPolicyType aType

PrimaryKeyPressed()

TBool PrimaryKeyPressed ( )

Returns true if primary button is pressed and note should be shown.

RemoveKeyCombination(TUint32, TUint32)

TInt RemoveKeyCombination ( TUint32 aPrimaryKey,
TUint32 aSecondaryKey
)

Removes a key combination for the policy type defined in the construction.

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey

SetKeyCombination(TUint32, TUint32, TInt)

TInt SetKeyCombination ( TUint32 aPrimaryKey,
TUint32 aSecondaryKey,
TInt aIndex
) [private]

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey
TInt aIndex

Member Data Documentation

CCenRepNotifyHandler * iAllowNotif

CCenRepNotifyHandler * iAllowNotif [private]

TUint iAllowed

TUint iAllowed [private]

TBool iInitialised

TBool iInitialised [private]

CPeriodic * iKeyLockTimer

CPeriodic * iKeyLockTimer [private]

TUint iLastPrimaryKeyIndex

TUint iLastPrimaryKeyIndex [private]

TUint iMask

TUint iMask [private]

TUint iMode

TUint iMode [private]

CCenRepNotifyHandler * iModeNotif

CCenRepNotifyHandler * iModeNotif [private]

TBool iPrimaryKeyDown

TBool iPrimaryKeyDown [private]

RArray< TUint > iPrimaryKeys

RArray < TUint > iPrimaryKeys [private]

CRepository * iRep

CRepository * iRep [private]

RArray< TUint > iSecondaryKeys

RArray < TUint > iSecondaryKeys [private]

TUint iTimeout

TUint iTimeout [private]

TUint iType

TUint iType [private]

RArray< TUint > iWaitingKeys

RArray < TUint > iWaitingKeys [private]