|
1 /* |
|
2 * Copyright (c) 2007-2009 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: |
|
15 * Name : strtsecuritynote.h |
|
16 * Part of : System Startup / Starter |
|
17 * Interface : None |
|
18 * Declaration of CStrtSecurityNote class. |
|
19 * Version : %version: ou1s60rt#4 % |
|
20 * This material, including documentation and any related computer |
|
21 * programs, is protected by copyright controlled by Nokia. All |
|
22 * rights are reserved. Copying, including reproducing, storing, |
|
23 * adapting or translating, any or all of this material requires the |
|
24 * prior written consent of Nokia. This material also contains |
|
25 * confidential information which may not be disclosed to others |
|
26 * without the prior written consent of Nokia. |
|
27 * Template version: 4.0 |
|
28 * Nokia Core OS * |
|
29 * File renamed from strtsecuritynote.h to ssmsecuritychecknotifier.h as part of Core OS transfer. |
|
30 * |
|
31 */ |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 /** |
|
37 @file |
|
38 @internalComponent |
|
39 @released |
|
40 */ |
|
41 |
|
42 #ifndef __SSMSECURITYCHECKNOTIFIER_H__ |
|
43 #define __SSMSECURITYCHECKNOTIFIER_H__ |
|
44 |
|
45 #include <ssm/ssmcustomcommand.h> |
|
46 #include <ssm/ssmcmd.hrh> |
|
47 #include "ssmpanic.h" |
|
48 |
|
49 #include "strtsecuritynotetype.h" |
|
50 #include "securitynotification.h" |
|
51 #include "e32property.h" |
|
52 |
|
53 NONSHARABLE_CLASS (CSsmSecurityCheckNotifier) : public CActive |
|
54 { |
|
55 public: |
|
56 static CSsmSecurityCheckNotifier* NewL(); |
|
57 static CSsmSecurityCheckNotifier* NewL(TStrtSecurityNoteType aNoteType); |
|
58 |
|
59 ~CSsmSecurityCheckNotifier(); |
|
60 TBool IsCodeAccepted(); |
|
61 void ShowNoteL(TStrtSecurityNoteType aNoteType, TRequestStatus& aRequest); |
|
62 void ShowNoteL(TRequestStatus& aRequest); |
|
63 TInt SecurityCheckResult() const; |
|
64 protected: |
|
65 // from CActive |
|
66 void RunL(); |
|
67 void DoCancel(); |
|
68 TInt RunError(TInt aError); |
|
69 |
|
70 void ConstructL(); |
|
71 void CleanupAndCancel(TInt aError); |
|
72 |
|
73 private: |
|
74 CSsmSecurityCheckNotifier(); |
|
75 CSsmSecurityCheckNotifier(TStrtSecurityNoteType aNoteType); |
|
76 void StartNotifier(); |
|
77 TBool IsDlgCancellableL(); |
|
78 |
|
79 private: |
|
80 enum TPinCustomCmdState |
|
81 { |
|
82 EIdle = 1, |
|
83 ENotifierIsActive, |
|
84 EEmergencyCallIsActive |
|
85 }; |
|
86 |
|
87 // Indicates whether its waiting for response from security notifier or |
|
88 // an emergency call to finish. |
|
89 TPinCustomCmdState iCmdState; |
|
90 TPckgBuf<TInt> iPinResult; |
|
91 RProperty iSsmEmergencyCallProperty; |
|
92 RNotifier iSecurityPinNotifier; |
|
93 TBool iIsDlgCancellable; |
|
94 TRequestStatus* iExecuteRequest; |
|
95 TStrtSecurityNoteType iNoteType; |
|
96 TBool iCodeOk; |
|
97 TUid iSecurityPinNotifierUid; |
|
98 |
|
99 // Indicates whether the query is made during or after startup. The |
|
100 // information affects for instance whether the query can be cancelled. |
|
101 // This value is set when a new query is made. |
|
102 TBool iAfterStartup; |
|
103 |
|
104 // Prameters for SecurityNotifier. |
|
105 TSecurityNotificationPckg iParams; |
|
106 }; |
|
107 |
|
108 #endif // __SSMSECURITYCHECKNOTIFIER_H__ |