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 TInt AddKeyCombination ( TUint32 aPrimaryKey,
TUint32 aSecondaryKey
)

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

Parameters

TUint32 aPrimaryKey
TUint32 aSecondaryKey

ClearKeycombinations()

IMPORT_C TInt ClearKeycombinations ( )

Clears all the defined key combinations from the policy.

ConstructL(TLockPolicyType)

void ConstructL ( TLockPolicyType aType ) [private]

Second constructor initializes the policy

Parameters

TLockPolicyType aType

DisableKeyguardFeature()

IMPORT_C TInt DisableKeyguardFeature ( )

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

EnableKeyguardFeature()

IMPORT_C TInt EnableKeyguardFeature ( )

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 TInt GetKeyCombination ( TInt aIndex,
TUint32 & aPrimaryKey,
TUint32 & aSecondaryKey
)

Retrieve a key combination on the given index.

Parameters

TInt aIndex
TUint32 & aPrimaryKey
TUint32 & aSecondaryKey

GetLastPrimaryKey()

IMPORT_C TUint GetLastPrimaryKey ( )

Returns Primary key scan code that has been pressed last.

HandleKeyEventL(const TKeyEvent &, const TEventCode)

IMPORT_C 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

HasConfiguration()

IMPORT_C TBool HasConfiguration ( )

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

KeyguardAllowed()

IMPORT_C static TBool KeyguardAllowed ( ) [static]

Whether keyguard feature is currently enabled or disabled.

NewL(TLockPolicyType)

IMPORT_C CKeyLockPolicyApi * NewL ( TLockPolicyType aType ) [static]

Use this to create keylock policy

Parameters

TLockPolicyType aType

PrimaryKeyPressed()

IMPORT_C TBool PrimaryKeyPressed ( )

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

RemoveKeyCombination(TUint32, TUint32)

IMPORT_C TInt RemoveKeyCombination ( TUint32 aPrimaryKey,
TUint32 aSecondaryKey
)

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.