CKeyLockPolicyApi Class Reference

class CKeyLockPolicyApi : public CBase

CKeyLockPolicyApi. Trough CKeyLockPolicyApi users can

keylockpolicy.lib
Since
3.2

Inherits from

Constructor & Destructor Documentation

CKeyLockPolicyApi()

CKeyLockPolicyApi()[private]

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

~CKeyLockPolicyApi()

IMPORT_C~CKeyLockPolicyApi()

Destructor.

Member Functions Documentation

AddKeyCombination(TUint32, TUint32)

IMPORT_C TIntAddKeyCombination(TUint32aPrimaryKey,
TUint32aSecondaryKey
)

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

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey

ClearKeycombinations()

IMPORT_C TIntClearKeycombinations()

Clears all the defined key combinations from the policy.

ConstructL(TLockPolicyType)

voidConstructL(TLockPolicyTypeaType)[private]

Second constructor initializes the policy

Parameters

TLockPolicyType aType

DisableKeyguardFeature()

IMPORT_C TIntDisableKeyguardFeature()

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

EnableKeyguardFeature()

IMPORT_C TIntEnableKeyguardFeature()

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

GetKeyCombination(TInt, TUint32 &, TUint32 &)

IMPORT_C TIntGetKeyCombination(TIntaIndex,
TUint32 &aPrimaryKey,
TUint32 &aSecondaryKey
)

Retrieve a key combination on the given index.

Parameters

TInt aIndex
TUint32 & aPrimaryKey
TUint32 & aSecondaryKey

GetLastPrimaryKey()

IMPORT_C TUintGetLastPrimaryKey()

Returns Primary key scan code that has been pressed last.

HandleKeyEventL(const TKeyEvent &, const TEventCode)

IMPORT_C TBoolHandleKeyEventL(const TKeyEvent &aKeyEvent,
const TEventCodeaType
)

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

HasConfiguration()

IMPORT_C TBoolHasConfiguration()

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

KeyguardAllowed()

IMPORT_C static TBoolKeyguardAllowed()[static]

Whether keyguard feature is currently enabled or disabled.

NewL(TLockPolicyType)

IMPORT_C CKeyLockPolicyApi *NewL(TLockPolicyTypeaType)[static]

Use this to create keylock policy

Parameters

TLockPolicyType aType

PrimaryKeyPressed()

IMPORT_C TBoolPrimaryKeyPressed()

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

RemoveKeyCombination(TUint32, TUint32)

IMPORT_C TIntRemoveKeyCombination(TUint32aPrimaryKey,
TUint32aSecondaryKey
)

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

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey

Member Data Documentation

CKeyLockPolicyApiImpl * iKeylockpolicyImplementation

CKeyLockPolicyApiImpl *iKeylockpolicyImplementation[private]

Actual implemetation.