|
1 /* |
|
2 * Copyright (c) 2005 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: Implementation of terminalsecurity components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SCPQUERYDIALOG_H |
|
21 #define SCPQUERYDIALOG_H |
|
22 |
|
23 #include <AknQueryDialog.h> |
|
24 #include <aknnotedialog.h> |
|
25 #include <AknEcs.h> |
|
26 #include "SCPClient.h" |
|
27 #include "SCPLockObserver.h" |
|
28 // LOCAL CONSTANTS |
|
29 const TInt KSCPModeNormal = 0; |
|
30 const TInt KSCPModeRestricted = 1; |
|
31 |
|
32 /** |
|
33 * Definition for the dialog class |
|
34 */ |
|
35 class CSCPQueryDialog : public CAknTextQueryDialog, public MAknEcsObserver |
|
36 { |
|
37 public: // Construction and destruction |
|
38 |
|
39 /** |
|
40 * C++ Constructor. |
|
41 * @param aDataText TDes& (code which is entered in query) |
|
42 * @param aMinLength TInt (code min length) |
|
43 * @param aMaxLength TInt (code max length) |
|
44 * @param aMode TInt (mode ESecUiCodeEtelReqest\ESecUiNone) |
|
45 */ |
|
46 CSCPQueryDialog( TDes& aDataText, |
|
47 RSCPClient::TSCPButtonConfig aButtonsShown, |
|
48 TInt aMinLength, |
|
49 TInt aMaxLength, |
|
50 TBool aECSSupport |
|
51 ); |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CSCPQueryDialog(); |
|
56 public: |
|
57 /** |
|
58 * Allows dismissing of code queries. Only mandatory requirement is that PIN |
|
59 * queries are dismissed by the # |
|
60 * |
|
61 * @param aKeyEvent TKeyEvent& |
|
62 * @return ETrue query is dismissed |
|
63 * EFalse not dismissed |
|
64 */ |
|
65 TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); |
|
66 void TryCancelQueryL(TInt aReason); |
|
67 protected://from CAknTextQueryDialog |
|
68 /** |
|
69 * From CAknTextQueryDialog This function is called by the UIKON dialog framework |
|
70 * just before the dialog is activated, after it has called |
|
71 * PreLayoutDynInitL() and the dialog has been sized. |
|
72 */ |
|
73 void PreLayoutDynInitL(); |
|
74 /** |
|
75 * From CAknTextQueryDialog This function is called by the UIKON framework |
|
76 * if the user activates a button in the button panel. |
|
77 * It is not called if the Cancel button is activated, |
|
78 * unless the EEikDialogFlagNotifyEsc flag is set. |
|
79 * @param aButtonId The ID of the button that was activated |
|
80 * @return Should return ETrue if the dialog should exit, and EFalse if it should not. |
|
81 */ |
|
82 TBool OkToExitL(TInt aButtonId); |
|
83 |
|
84 /** |
|
85 * From CAknTextQueryDialog This function is called by the UIKON dialog framework |
|
86 * just after a key is pressed |
|
87 * @param aKeyEvent TKeyEvent& |
|
88 * @param aType TEventCode |
|
89 */ |
|
90 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
91 |
|
92 void HandleEcsEvent(CAknEcsDetector* aDetector, CAknEcsDetector::TState aUpdatedState); |
|
93 void ShowWarningNoteL(); |
|
94 |
|
95 private: |
|
96 |
|
97 /* |
|
98 * SetIncallBubbleAllowedInUsualL |
|
99 */ |
|
100 void SetIncallBubbleAllowedInUsualL(TBool aAllowed); |
|
101 |
|
102 |
|
103 private: // DATA |
|
104 TInt iMinLength; |
|
105 TInt iMaxLength; |
|
106 TInt iMode; |
|
107 TBool iFront; |
|
108 TInt iAppKey; |
|
109 TInt iVoiceKey1; |
|
110 TInt iVoiceKey2; |
|
111 TInt iValidTextLen; |
|
112 RSCPClient::TSCPButtonConfig iButtons; |
|
113 TBool iECSSupport; |
|
114 CAknEcsDetector* iEcsDetector; // owned |
|
115 TBool iEMCallActivated; |
|
116 TBool iShowingEMNumber; |
|
117 TBool iPreviousCharacterWasInvalid; |
|
118 TBuf<KSCPPasscodeMaxLength+1> iTextBuffer; |
|
119 TBuf<KSCPPasscodeMaxLength+1> iTmpBuffer; |
|
120 TBool iPrioritySet; |
|
121 TBool iPriorityDropped; |
|
122 /** An integer variable to define the input mode of the lock code query */ |
|
123 TInt def_mode; |
|
124 TInt iKeyUsed; |
|
125 CSCPLockObserver* iDeviceLockStatusObserver; |
|
126 CSCPLockObserver* iCallStatusObserver; |
|
127 }; |
|
128 #endif |
|
129 |
|
130 // End of file |