|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Resource mapper for CT Security Dialogs. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CTSECURITYDIALOGDEFS_H |
|
20 #define __CTSECURITYDIALOGDEFS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <CTSecDlgs.rsg> |
|
25 #include <avkon.rsg> |
|
26 #include <secdlg.h> |
|
27 #include <data_caging_path_literals.hrh> |
|
28 #include <secdlgimpldefs.h> |
|
29 |
|
30 const TUid KUidCTSecDlgAppServer = { 0x10207445 }; |
|
31 |
|
32 /** |
|
33 * Input data for the ESaveCert operation. |
|
34 */ |
|
35 class TSaveCertInput |
|
36 { |
|
37 public: |
|
38 TSecurityDialogNotification iOperation; |
|
39 TCertificateFormat iCertFormat; |
|
40 TCertificateOwnerType iCertOwnerType; |
|
41 TInt iDataSize; |
|
42 }; |
|
43 |
|
44 /** */ |
|
45 typedef TPckgBuf<TSaveCertInput> TSaveCertInputBuf; |
|
46 |
|
47 |
|
48 // Selection types |
|
49 enum |
|
50 { |
|
51 EServerCertNotAccepted, |
|
52 EServerCertAcceptedTemporarily, |
|
53 EServerCertAcceptedPermanently |
|
54 }; |
|
55 |
|
56 // Dialog types for Security dialogs and notes. |
|
57 enum TDialogType |
|
58 { |
|
59 EEnterPinNR, |
|
60 EEnterNewPinNR, |
|
61 EEnterPukNR, |
|
62 EVerifyPinNR, |
|
63 EEnterPw, |
|
64 EEnterKeyStorePw, |
|
65 EEnterNewKeyStorePw, |
|
66 EVerifyKeyStorePw, |
|
67 |
|
68 EImportKeyPw, |
|
69 EExportKeyPw, |
|
70 //ESignText, |
|
71 // something wrong with the server certificate) |
|
72 EInfoSignTextRequested, |
|
73 EInfoSignTextCancelled, |
|
74 EInfoSignTextDone, |
|
75 EInfoPinCodeUnblocked, |
|
76 EInfoPwCreating, |
|
77 |
|
78 EErrorPinCodeIncorrect, |
|
79 EErrorPinCodeBlocked, |
|
80 EErrorPukCodeIncorrect, |
|
81 EErrorPukCodeBlocked, |
|
82 EErrorCodesDoNotMatch, |
|
83 EErrorWimNotAvailable, |
|
84 |
|
85 EPinCodeBlockedInfo, |
|
86 ENoMatchingPersonalCert, |
|
87 EErrorInternal, |
|
88 ESaveReceipt, |
|
89 |
|
90 EUserAuthentication, |
|
91 EUserAuthenticationText, |
|
92 ECreateCSR, |
|
93 ECertDetails, |
|
94 ESaveCert, |
|
95 EDeleteCert, |
|
96 }; |
|
97 |
|
98 // Layout types for Dialogs/Notes |
|
99 enum TNoteType |
|
100 { |
|
101 EInfoNote, // Meaning 'information', with green ! sign |
|
102 EErrorNote, // Meaning 'error', with red ! sign |
|
103 EConfirmationNote, // Meaning 'confirmed', with green V sign |
|
104 |
|
105 EInfoDialog, // Information dlg, |
|
106 EWarningDialog, // |
|
107 EErrorDialog, // |
|
108 EConfirmationDialog,// Confirmation dlg, with blue |
|
109 EOkDialog, // |
|
110 |
|
111 EEnterPinGCodeDialog, // |
|
112 EVerifyPinGCodeDialog, // |
|
113 EEnterPinNRCodeDialog, // |
|
114 EVerifyPinNRCodeDialog, // |
|
115 EEnterPinPinCodeDialog, |
|
116 EEnterPwDialog, |
|
117 EEnterPwPwDialog, |
|
118 |
|
119 ESecurityAlertDialog |
|
120 }; |
|
121 |
|
122 // KDialogTypeToResourceMapper item definition |
|
123 struct TDialogTypeItem |
|
124 { |
|
125 TInt iDialogType; // Dialog type |
|
126 TInt iResourceIdentifier; // Main resource id |
|
127 TInt iDynamicResourceIdentifier; // dynamic resource for main resource |
|
128 TNoteType iNoteType; // Type of dialog/note that we are going to use. |
|
129 TInt iSoftKeyResource; // Softkey Resource to use for dlg (does not have effect on notes) // if 0 -> The dialog uses its defaults. |
|
130 }; |
|
131 |
|
132 // Dialog type to resource mapper array. Items are TDialogTypeItems. |
|
133 const TDialogTypeItem KDialogTypeToResourceMapper[] = |
|
134 { |
|
135 { EEnterPinNR, R_QTN_WIM_PRMT_GEN_WIM_PIN, 0, EEnterPinNRCodeDialog, 0 }, |
|
136 { EEnterNewPinNR, R_QTN_WIM_NEW_PIN, 0, EEnterPinPinCodeDialog, 0 }, |
|
137 { EEnterPukNR, R_QTN_WIM_PIN_UNBLOCK_QUERY, 0, EEnterPinNRCodeDialog, 0 }, |
|
138 { EVerifyPinNR, R_QTN_WIM_VERIFY_PIN, 0, EVerifyPinNRCodeDialog, 0 }, |
|
139 { EEnterPw, R_QTN_CM_TITLE_P12_PASSWORD, 0, EEnterPwDialog, 0 }, |
|
140 //{ EEnterKeyStorePw, R_QTN_CM_TITLE_KEYSTORE_PASSWORD, 0, EEnterPwDialog, 0 }, |
|
141 { EEnterKeyStorePw, R_QTN_SN_ENTER_PHONE_KEYSTORE, 0, EEnterPwDialog, 0 }, |
|
142 //{ EEnterNewKeyStorePw, R_QTN_CM_TITLE_NEW_KEYSTORE_PASSWORD, 0, EEnterPwPwDialog, 0 }, |
|
143 { EEnterNewKeyStorePw, R_QTN_SN_NEW_PHONE_KEYSTORE, 0, EEnterPwPwDialog, 0 }, |
|
144 //{ EVerifyKeyStorePw, R_QTN_CM_TITLE_VERIFY_PASSWORD, 0, EEnterPwPwDialog, 0 }, |
|
145 { EVerifyKeyStorePw, R_QTN_WIM_VERIFY_PIN, 0, EEnterPwPwDialog, 0 }, |
|
146 { EImportKeyPw, R_QTN_SN_PROMPT_IMPORT_KEY, 0, EEnterPwDialog, 0 }, |
|
147 { EExportKeyPw, R_QTN_SN_PROMPT1_CREATE_CODE, 0, EEnterPwPwDialog, 0 }, |
|
148 |
|
149 |
|
150 // { ESignText, 0, 0, EErrorNote, 0 }, // just a dummy |
|
151 |
|
152 { EInfoSignTextRequested, R_QTN_WIM_INFO_DIGIT_SIGN_REQ, 0, EInfoNote, 0 }, |
|
153 { EInfoSignTextCancelled, R_QTN_WIM_SIGN_CANCELLED, 0, EInfoNote, 0 }, |
|
154 { EInfoSignTextDone, R_QTN_WIM_INFO_SIGNATURE_MADE, 0, EConfirmationNote, 0 }, |
|
155 { EInfoPinCodeUnblocked, R_QTN_WIM_INFO_PIN_UNBLOCKED, 0, EConfirmationNote, 0 }, |
|
156 { EInfoPwCreating, R_QTN_CM_CREATING_KEYSTORE, 0, EInfoNote, 0 }, |
|
157 |
|
158 { EErrorPinCodeIncorrect, R_QTN_WIM_ERR_WRONG_PIN, 0, EErrorNote, 0 }, |
|
159 { EErrorPinCodeBlocked, R_QTN_WIM_ERR_PIN_BLOCKED, 0, EErrorNote, 0 }, |
|
160 { EErrorPukCodeIncorrect, R_QTN_WIM_WRONG_UNBLOCK_CODE, 0, EErrorNote, 0 }, |
|
161 { EErrorPukCodeBlocked, R_QTN_WIM_PIN_TOTALBLOCKED, 0, EErrorNote, 0 }, |
|
162 { EErrorCodesDoNotMatch, R_QTN_WIM_ERR_CODES_DO_NOT_MATCH, 0, EErrorNote, 0 }, |
|
163 |
|
164 { EPinCodeBlockedInfo, R_QTN_WIM_UNBLOCK_INFO, 0, EInfoNote, 0 }, |
|
165 { ENoMatchingPersonalCert, R_QTN_WIM_NO_MATCHING_CERTIFICATE, 0, EInfoDialog, 0 }, |
|
166 { EErrorInternal, R_QTN_WIM_ERR_IO_ERROR, 0, EErrorNote, 0 }, |
|
167 { EErrorWimNotAvailable, R_QTN_WIM_NOT_AVAILABLE, 0, EErrorNote, 0 }, |
|
168 { ESaveReceipt, R_QTN_WIM_RECEIPT_SAVED, 0, EConfirmationDialog, 0 }, |
|
169 { EUserAuthentication, R_QTN_SN_AUTHENTICATION_NOTE, 0, EInfoNote, 0 } |
|
170 }; |
|
171 |
|
172 const TInt KCTSecDialSendBufLen = 128; |
|
173 |
|
174 #endif |
|
175 |
|
176 // End of File |