|
1 /* |
|
2 * Copyright (c) 2003-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: Application UI class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CERTSAVERAPPUI_H |
|
20 #define CERTSAVERAPPUI_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <eikapp.h> |
|
24 #include <eikdoc.h> |
|
25 #include <e32std.h> |
|
26 #include <coeccntx.h> |
|
27 #include <aknappui.h> |
|
28 #include <eikdialg.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CCertSaverDialog; |
|
32 class CCertSaverDocument; |
|
33 class CCertSaverContainer; |
|
34 |
|
35 |
|
36 // CONSTANTS |
|
37 |
|
38 // CLASS DECLARATION |
|
39 class CCertSaverModel; |
|
40 |
|
41 /** |
|
42 * Application UI class. |
|
43 * Provides support for the following features: |
|
44 * - detects if an unhandled leave occurs |
|
45 * |
|
46 */ |
|
47 class CCertSaverAppUi : public CAknAppUi |
|
48 { |
|
49 public: // // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * EPOC default constructor. |
|
53 */ |
|
54 void ConstructL(); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CCertSaverAppUi(); |
|
60 |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Starts certificate saving. |
|
65 * @param void |
|
66 */ |
|
67 void RunFileL(); |
|
68 |
|
69 void RunFileL( RFile& aFile ); |
|
70 |
|
71 /** |
|
72 * Returns pointer to control environment. |
|
73 * @param void |
|
74 */ |
|
75 const CCoeEnv* CoeEnv() const; |
|
76 |
|
77 /** |
|
78 * Notifies iDoorObserver about exit, and then exits. |
|
79 * In this case iDoorObserver is Document Handler. |
|
80 * @param void |
|
81 */ |
|
82 void doExit(); |
|
83 |
|
84 public: // Functions from base classes |
|
85 |
|
86 //From CEikAppUi |
|
87 TErrorHandlerResponse HandleError ( |
|
88 TInt aError, |
|
89 const SExtendedError& aExtErr, |
|
90 TDes& aErrorText, |
|
91 TDes& aContextText ); |
|
92 |
|
93 protected: // Functions from base classes |
|
94 // From CEikAppUi |
|
95 TBool ProcessCommandParametersL( |
|
96 TApaCommand aCommand , |
|
97 TFileName& aDocumentName, |
|
98 const TDesC8& Tail ); |
|
99 |
|
100 //From CCoeAppUi |
|
101 void HandleForegroundEventL( TBool aForeground ); |
|
102 |
|
103 private: |
|
104 // From MEikMenuObserver |
|
105 void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane ); |
|
106 |
|
107 /** |
|
108 * From CEikAppUi, takes care of command handling. |
|
109 * @param aCommand command to be handled |
|
110 */ |
|
111 void HandleCommandL( TInt aCommand ); |
|
112 |
|
113 private: |
|
114 |
|
115 |
|
116 CCertSaverDocument* Document() const |
|
117 { |
|
118 return( (CCertSaverDocument*)iDocument ); |
|
119 } |
|
120 |
|
121 void ConstructPKCS12QueryMsgL( HBufC* aMessage ) const; |
|
122 |
|
123 /** |
|
124 * From CEikAppUi, handles key events. |
|
125 * @param aKeyEvent Event to handled. |
|
126 * @param aType Type of the key event. |
|
127 * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). |
|
128 */ |
|
129 virtual TKeyResponse HandleKeyEventL( |
|
130 const TKeyEvent& aKeyEvent,TEventCode aType ); |
|
131 |
|
132 private: //Data |
|
133 CCertSaverModel* iModel; |
|
134 TBool iErrorOccured; |
|
135 CCertSaverContainer* iContainer; |
|
136 }; |
|
137 |
|
138 #endif // CERTSAVERAPPUI_H |
|
139 |
|
140 // End of File |