|
1 /* |
|
2 * Copyright (c) 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: Idle (unlocked) UI |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef LOCKAPPIDLECONTROL_H |
|
20 #define LOCKAPPIDLECONTROL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <eiknotapi.h> |
|
24 #include <eikbtgpc.h> |
|
25 #include <AknNotifyStd.h> |
|
26 #include <aknnotedialog.h> |
|
27 #include <AknNotifierControllerPlugin.h> |
|
28 #include <AknQueryDialog.h> // phone query |
|
29 #include "lockappbasecontrol.h" |
|
30 |
|
31 /** |
|
32 * CLockAppIdleControl class represents the unlocked state in the locking state machine. |
|
33 * |
|
34 * @lib lockapp |
|
35 * @since 5.0 |
|
36 * @author Joona Petrell |
|
37 * @author Tamas Koteles |
|
38 * @see CLockAppBaseControl |
|
39 * @see MLockAppStateControl |
|
40 */ |
|
41 class CLockAppIdleControl : public CLockAppBaseControl, public MEikCommandObserver |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CLockAppIdleControl* NewL( MLockAppStateControl& aStateControl ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CLockAppIdleControl( ); |
|
54 |
|
55 private: |
|
56 |
|
57 /** |
|
58 * Constructor for performing 1st stage construction |
|
59 */ |
|
60 CLockAppIdleControl( MLockAppStateControl& aStateControl ); |
|
61 |
|
62 /** |
|
63 * EPOC default constructor for performing 2nd stage construction |
|
64 */ |
|
65 void ConstructL( ); |
|
66 |
|
67 public: |
|
68 |
|
69 void OfferKeyLock( ); |
|
70 |
|
71 void CancelOfferKeyLock( ); |
|
72 |
|
73 void HandleActivateEventL( TUint aEnvMask ); |
|
74 |
|
75 void HandleDeActivateEventL( TUint aEnvMask ); |
|
76 |
|
77 public: |
|
78 |
|
79 void HandleResourceChange( TInt aType ); |
|
80 |
|
81 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
82 |
|
83 private: |
|
84 |
|
85 TInt CountComponentControls( ) const; |
|
86 |
|
87 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
88 |
|
89 private: |
|
90 /** |
|
91 * From @c MEikCommandObserver. Dialogs and CBA send |
|
92 * UI commands to parent using method ProcessCommandL. |
|
93 * |
|
94 * @param aCommandId Command to be handled |
|
95 */ |
|
96 void ProcessCommandL( TInt aCommandId ); |
|
97 |
|
98 private: |
|
99 |
|
100 // "offer to lock keys" note |
|
101 CLockAppLockedNote* iOfferLockNote; |
|
102 |
|
103 }; |
|
104 |
|
105 #endif // LOCKAPPIDLECONTROL_H |