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