|
1 /* |
|
2 * Copyright (c) 2008-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 : strtdevlockcheck.h |
|
16 * Part of : System Startup / StrtDevLockPlg |
|
17 * Declaration of CStrtDevLockCheck class. |
|
18 * Version : %version: 1 % |
|
19 * This material, including documentation and any related computer |
|
20 * programs, is protected by copyright controlled by Nokia. All |
|
21 * rights are reserved. Copying, including reproducing, storing, |
|
22 * adapting or translating, any or all of this material requires the |
|
23 * prior written consent of Nokia. This material also contains |
|
24 * confidential information which may not be disclosed to others |
|
25 * without the prior written consent of Nokia. |
|
26 * Template version: 4.2 |
|
27 * Nokia Core OS * |
|
28 * File renamed from strtdevlockcheck.h to cmddevicesecuritycheck.h as part of Core OS transfer. |
|
29 * |
|
30 */ |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 /** |
|
36 @file |
|
37 @internalComponent |
|
38 @released |
|
39 */ |
|
40 |
|
41 #ifndef __CMDDEVICESECURITYCHECK_H__ |
|
42 #define __CMDDEVICESECURITYCHECK_H__ |
|
43 |
|
44 #include <ssm/ssmcustomcommand.h> |
|
45 #include "ssmsecuritychecknotifier.h" |
|
46 #include <etel.h> |
|
47 #include <etelmm.h> |
|
48 |
|
49 NONSHARABLE_CLASS (CCustomCmdDeviceSecurityCheck) : public CActive , public MSsmCustomCommand |
|
50 { |
|
51 public: |
|
52 static CCustomCmdDeviceSecurityCheck* NewL(); |
|
53 |
|
54 // from MSsmcustomCommand |
|
55 TInt Initialize(CSsmCustomCommandEnv* aCmdEnv); |
|
56 void Execute(const TDesC8& aParams, TRequestStatus& aStatus); |
|
57 void Close(); |
|
58 void Release(); |
|
59 void ExecuteCancel(); |
|
60 |
|
61 protected: |
|
62 // from CActive |
|
63 void RunL(); |
|
64 void DoCancel(); |
|
65 TInt RunError(TInt aError); |
|
66 |
|
67 protected: |
|
68 void ConstructL(); |
|
69 void Cleanup(TInt aError); |
|
70 |
|
71 private: |
|
72 CCustomCmdDeviceSecurityCheck(); |
|
73 ~CCustomCmdDeviceSecurityCheck(); |
|
74 |
|
75 private: |
|
76 //Response to LockPhoneDevice lock status query has been received. |
|
77 void LockPhoneDeviceRespReceivedL(); |
|
78 |
|
79 //Response to LockPhoneToIcc lock status query has been received. |
|
80 void LockPhoneToIccRespReceivedL(); |
|
81 |
|
82 //Response to security code request from user has been received. |
|
83 void SecCodeQueryRespReceivedL(); |
|
84 |
|
85 //Query the security code from the user. |
|
86 void QuerySecCodeL(); |
|
87 |
|
88 void CompleteClientRequest(TInt aReason); |
|
89 |
|
90 private: |
|
91 //Internal state |
|
92 enum TDeviceSecurityCheckState |
|
93 { |
|
94 EDeviceSecurityCheckNone = 0, |
|
95 EGetLockPhoneDevice, |
|
96 EGetLockPhoneToIcc, |
|
97 EQuerySecCode, |
|
98 EDeviceSecurityCheckMaxState |
|
99 }; |
|
100 |
|
101 private: |
|
102 TDeviceSecurityCheckState iState; |
|
103 RTelServer iServer; |
|
104 RMobilePhone iPhone; |
|
105 RMobilePhone::TMobilePhoneLockInfoV1 iLockInfo; |
|
106 RMobilePhone::TMobilePhoneLockInfoV1Pckg iLockInfoPckg; |
|
107 HBufC* iTsyModuleName; |
|
108 TRequestStatus* iExecuteRequest; |
|
109 CSsmSecurityCheckNotifier* iSsmSecurityCheckNotifier; |
|
110 |
|
111 #ifdef TEST_CUSTCMD_MACRO |
|
112 friend class CCustomCmdTestDeviceSecurityCheck; |
|
113 #endif |
|
114 }; |
|
115 #endif // __CMDDEVICESECURITYCHECK_H__ |