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 CDevEncUiCreateKeyProcess. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "DevEncLog.h" |
|
19 #include "DevEncUiCreateKeyProcess.h" |
|
20 #include <devencui.rsg> |
|
21 |
|
22 CDevEncUiCreateKeyProcess::CDevEncUiCreateKeyProcess() |
|
23 { |
|
24 iCount = 0; |
|
25 } |
|
26 |
|
27 CDevEncUiCreateKeyProcess::~CDevEncUiCreateKeyProcess() |
|
28 { |
|
29 } |
|
30 |
|
31 void CDevEncUiCreateKeyProcess::ProcessFinished() |
|
32 { |
|
33 } |
|
34 |
|
35 void CDevEncUiCreateKeyProcess::DialogDismissedL( TInt /*aButtonId*/ ) |
|
36 { |
|
37 } |
|
38 |
|
39 //TInt CDevEncUiCreateKeyProcess::CycleError( TInt aError ) |
|
40 // { |
|
41 // return aError; |
|
42 // } |
|
43 |
|
44 TBool CDevEncUiCreateKeyProcess::IsProcessDone() const |
|
45 { |
|
46 return ( iCount == 3 ); |
|
47 } |
|
48 |
|
49 void CDevEncUiCreateKeyProcess::StepL() |
|
50 { |
|
51 // Simulate processing |
|
52 User::After( 1000000 ); |
|
53 iCount++; |
|
54 } |
|
55 |
|
56 TBool CDevEncUiCreateKeyProcess::RunLD() |
|
57 { |
|
58 TBool returnvalue = EFalse; |
|
59 |
|
60 CDevEncUiCreateKeyProcess* process = new ( ELeave ) CDevEncUiCreateKeyProcess(); |
|
61 CleanupStack::PushL( process ); |
|
62 |
|
63 CAknWaitNoteWrapper* waitNoteWrapper = |
|
64 CAknWaitNoteWrapper::NewL(); |
|
65 |
|
66 CleanupStack::PushL( reinterpret_cast<CBase*>( waitNoteWrapper ) ); |
|
67 |
|
68 if ( waitNoteWrapper->ExecuteL( R_DEVENCUI_CREATING_KEY_WAITNOTE, |
|
69 *process, |
|
70 ETrue ) ) |
|
71 { |
|
72 returnvalue = ETrue; |
|
73 } |
|
74 else //note was cancelled |
|
75 { |
|
76 returnvalue = EFalse; |
|
77 } |
|
78 |
|
79 CleanupStack::PopAndDestroy( waitNoteWrapper ); |
|
80 CleanupStack::PopAndDestroy( process ); |
|
81 return returnvalue; |
|
82 } |
|