author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
permissions | -rw-r--r-- |
williamr@4 | 1 |
/* |
williamr@4 | 2 |
* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). |
williamr@4 | 3 |
* All rights reserved. |
williamr@4 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@4 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@4 | 8 |
* |
williamr@4 | 9 |
* Initial Contributors: |
williamr@4 | 10 |
* Nokia Corporation - initial contribution. |
williamr@4 | 11 |
* |
williamr@4 | 12 |
* Contributors: |
williamr@4 | 13 |
* |
williamr@4 | 14 |
* Description: Avkon keylock client class definition. |
williamr@4 | 15 |
* |
williamr@4 | 16 |
*/ |
williamr@4 | 17 |
|
williamr@4 | 18 |
|
williamr@4 | 19 |
#ifndef __AKNKEYLOCK_H__ |
williamr@4 | 20 |
#define __AKNKEYLOCK_H__ |
williamr@4 | 21 |
|
williamr@4 | 22 |
#include <e32base.h> |
williamr@4 | 23 |
#include <AknNotifyStd.h> |
williamr@4 | 24 |
|
williamr@4 | 25 |
/** |
williamr@4 | 26 |
* A handle class API disabling/enabling keylock state. |
williamr@4 | 27 |
* |
williamr@4 | 28 |
* @lib avkon.lib |
williamr@4 | 29 |
* @since S60 0.9 |
williamr@4 | 30 |
*/ |
williamr@4 | 31 |
class RAknKeyLock : public RNotifier |
williamr@4 | 32 |
{ |
williamr@4 | 33 |
public: |
williamr@4 | 34 |
/** |
williamr@4 | 35 |
* Locks the keys of the device and shows a keys locked note. |
williamr@4 | 36 |
*/ |
williamr@4 | 37 |
IMPORT_C void EnableKeyLock(); |
williamr@4 | 38 |
|
williamr@4 | 39 |
/** |
williamr@4 | 40 |
* Unlocks the keys of the device and shows a keys unlocked note. |
williamr@4 | 41 |
*/ |
williamr@4 | 42 |
IMPORT_C void DisableKeyLock(); |
williamr@4 | 43 |
|
williamr@4 | 44 |
/** |
williamr@4 | 45 |
* Returns whether the phone keys have been locked or not. |
williamr@4 | 46 |
* |
williamr@4 | 47 |
* @return ETrue if the keys have been locked normally or the phone is in |
williamr@4 | 48 |
* autolock state. |
williamr@4 | 49 |
*/ |
williamr@4 | 50 |
IMPORT_C TBool IsKeyLockEnabled(); |
williamr@4 | 51 |
|
williamr@4 | 52 |
/** |
williamr@4 | 53 |
* Controls whether soft notifications will be shown at all. |
williamr@4 | 54 |
* |
williamr@4 | 55 |
* @param ETrue if soft notifications should be shown. |
williamr@4 | 56 |
*/ |
williamr@4 | 57 |
IMPORT_C void EnableSoftNotifications(TBool aEnable); |
williamr@4 | 58 |
|
williamr@4 | 59 |
/** |
williamr@4 | 60 |
* Shows a note on the screen asking the user permission to lock the keypad. |
williamr@4 | 61 |
*/ |
williamr@4 | 62 |
IMPORT_C void OfferKeyLock(); |
williamr@4 | 63 |
|
williamr@4 | 64 |
/** |
williamr@4 | 65 |
* All notifications queued to be shown are cancelled. |
williamr@4 | 66 |
*/ |
williamr@4 | 67 |
IMPORT_C void CancelAllNotifications(); |
williamr@4 | 68 |
|
williamr@4 | 69 |
/** |
williamr@4 | 70 |
* Locks the device keys similar to autolock/device lock state. |
williamr@4 | 71 |
* |
williamr@4 | 72 |
* @internal |
williamr@4 | 73 |
* @since S60 2.0 |
williamr@4 | 74 |
*/ |
williamr@4 | 75 |
IMPORT_C void EnableAutoLockEmulation(); |
williamr@4 | 76 |
|
williamr@4 | 77 |
/** |
williamr@4 | 78 |
* Unlocks the keys of the device without showing the keys unlocked note. |
williamr@4 | 79 |
* |
williamr@4 | 80 |
* @since S60 2.0 |
williamr@4 | 81 |
*/ |
williamr@4 | 82 |
IMPORT_C void DisableWithoutNote(); |
williamr@4 | 83 |
|
williamr@4 | 84 |
/** |
williamr@4 | 85 |
* Locks the keys of the device without showing the keys locked note. |
williamr@4 | 86 |
* |
williamr@4 | 87 |
* @since S60 2.1 |
williamr@4 | 88 |
*/ |
williamr@4 | 89 |
IMPORT_C void EnableWithoutNote(); |
williamr@4 | 90 |
|
williamr@4 | 91 |
private: |
williamr@4 | 92 |
void SendMessage(TKeyLockNotifierReason aMessage); |
williamr@4 | 93 |
}; |
williamr@4 | 94 |
|
williamr@4 | 95 |
/** |
williamr@4 | 96 |
* Direct client to AknCapServer. |
williamr@4 | 97 |
* |
williamr@4 | 98 |
* @lib avkon.lib |
williamr@4 | 99 |
* @since S60 3.0 |
williamr@4 | 100 |
*/ |
williamr@4 | 101 |
class RAknKeylock2 : public RAknKeyLock |
williamr@4 | 102 |
{ |
williamr@4 | 103 |
public: |
williamr@4 | 104 |
/** |
williamr@4 | 105 |
* Connects to the AknCapServer. |
williamr@4 | 106 |
* |
williamr@4 | 107 |
* @return KErrNone if connection was successful, KErrNotSupported if |
williamr@4 | 108 |
* CCoeEnv is not accessible. Other system wide error codes are |
williamr@4 | 109 |
* also possible in error situations. |
williamr@4 | 110 |
*/ |
williamr@4 | 111 |
IMPORT_C TInt Connect(); |
williamr@4 | 112 |
}; |
williamr@4 | 113 |
|
williamr@4 | 114 |
#endif // __AKNKEYLOCK_H__ |