|
1 /* |
|
2 * Copyright (c) 2002-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: Crypto Token Security Dialog Notifier |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CTSECURITYDIALOGNOTIFIER_H |
|
21 #define __CTSECURITYDIALOGNOTIFIER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CTSecurityDialogDefs.h" |
|
25 #include "CTSecurityDialogsLogger.h" |
|
26 #include <secdlgimpldefs.h> |
|
27 #include <eiknotapi.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class RReadStream; |
|
31 class CEikonEnv; |
|
32 class CUnifiedCertStore; |
|
33 class CCTCertInfo; |
|
34 class CCertAttributeFilter; |
|
35 class CCTSecurityDialogsAO; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * CCTSecurityDialogNotifier is the Server-side class for Notifier plugin. |
|
41 * @lib |
|
42 * @since |
|
43 */ |
|
44 NONSHARABLE_CLASS( CCTSecurityDialogNotifier ): public CBase, public MEikSrvNotifierBase2 |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CCTSecurityDialogNotifier* NewL(); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CCTSecurityDialogNotifier(); |
|
57 |
|
58 public: // new functions |
|
59 |
|
60 // Loads the resource strings etc for TDialogType aType |
|
61 |
|
62 HBufC* LoadResourceStringLC( const TInt aType, const TDesC& aDynamicText = KNullDesC, const TDesC& aDynamicText2= KNullDesC ); |
|
63 |
|
64 // Finds the corresponding resource items for aType |
|
65 TDialogTypeItem GetDialogTypeItem( const TInt aType ); |
|
66 |
|
67 private: // from MEikSrvNotifierBase2 |
|
68 |
|
69 /** |
|
70 * Deletes this |
|
71 */ |
|
72 void Release(); |
|
73 |
|
74 /** |
|
75 * |
|
76 * @return TNotifierInfo |
|
77 */ |
|
78 TNotifierInfo RegisterL(); |
|
79 |
|
80 /** |
|
81 * |
|
82 * @return TNotifierInfo |
|
83 */ |
|
84 TNotifierInfo Info() const; |
|
85 |
|
86 /** |
|
87 * StartL is the Notifier request handler. |
|
88 * @param aBuffer Data that is passed from the client-side. |
|
89 * @param aReplySlot Identifies which message argument to use for the reply. |
|
90 * @param aMessage Encapsulates a client request. |
|
91 */ |
|
92 void StartL( const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage ); |
|
93 |
|
94 /** |
|
95 * Does nothing. |
|
96 * @param aBuffer |
|
97 * @return KNullDesC |
|
98 */ |
|
99 TPtrC8 StartL( const TDesC8& aBuffer ); |
|
100 |
|
101 /** |
|
102 * Does nothing |
|
103 */ |
|
104 void Cancel(); |
|
105 |
|
106 /** |
|
107 * Does nothing |
|
108 * @param aBuffer |
|
109 * @return KNullDesC |
|
110 */ |
|
111 TPtrC8 UpdateL( const TDesC8& aBuffer ); |
|
112 |
|
113 private: |
|
114 |
|
115 /** |
|
116 * C++ default constructor. |
|
117 */ |
|
118 CCTSecurityDialogNotifier(); |
|
119 |
|
120 /** |
|
121 * By default Symbian 2nd phase constructor is private. |
|
122 */ |
|
123 void ConstructL(); |
|
124 |
|
125 void DoStartL( const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage ); |
|
126 |
|
127 private: // Data |
|
128 |
|
129 CEikonEnv* iEikEnv; |
|
130 TInt iResourceFileOffset; |
|
131 TInt iResourceFileOffset2; |
|
132 TBool iSaveReceipt; //text to save to notepad |
|
133 TInt32 iDialogType; |
|
134 CCTSecurityDialogsAO* iSecurityDialogAO; |
|
135 TBool iSecurityDialogAODeleted; |
|
136 }; |
|
137 |
|
138 #endif // __CTSECURITYDIALOGNOTIFIER_H |
|
139 |