1 /* |
|
2 * Copyright (c) 2010 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: Declaration of the CCertManUIContainerTrust class |
|
15 * Maintains correct list of trusted clients depending |
|
16 * on the certificate that was in focus in Authority |
|
17 * certificates view when Trust Settings view was entered. |
|
18 * Shows and changes correct Yes/No text for the Trusted client. |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 #ifndef CPCERTTRUSTVIEW_H |
|
24 #define CPCERTTRUSTVIEW_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <cpbasesettingview.h> |
|
28 #include <QList> |
|
29 |
|
30 // CONSTANTS |
|
31 const TInt KTrustSettingsResourceIndexWAP = 0; |
|
32 const TInt KTrustSettingsResourceIndexMailAndImageConn = 1; |
|
33 const TInt KTrustSettingsResourceIndexAppCtrl = 2; |
|
34 const TInt KTrustSettingsResourceIndexJavaInstall = 3; |
|
35 const TInt KTrustSettingsResourceIndexOCSPCheck = 4; |
|
36 const TInt KTrustSettingsResourceIndexVPN = 5; |
|
37 const TInt KTrustSettingsResourceIndexWidget = 6; |
|
38 const TInt KTrustSettingsResourceIndexValueYes = 0; |
|
39 const TInt KTrustSettingsResourceIndexValueNo = 1; |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 class CCertificateAppInfoManager; |
|
43 class CpCertDataContainer; |
|
44 class TCertificateAppInfo; |
|
45 class CCTCertInfo; |
|
46 |
|
47 class QString; |
|
48 |
|
49 class HbDataFormModel; |
|
50 |
|
51 // CLASS DECLARATION |
|
52 class CpCertTrustView : public CpBaseSettingView |
|
53 { |
|
54 Q_OBJECT |
|
55 |
|
56 public: |
|
57 explicit CpCertTrustView( TInt certificateIndex, |
|
58 CpCertDataContainer& certDataContainer, |
|
59 QGraphicsItem *parent = 0 ); |
|
60 virtual ~CpCertTrustView(); |
|
61 void saveTrustSettings(); |
|
62 |
|
63 private: |
|
64 void viewTrustSettings(); |
|
65 void updateListBoxL(); |
|
66 TInt trustIdIndex( TUid aTrusterUid ) const; |
|
67 TBool checkCertificateClientTrustL( const TUid clientUid, const CCTCertInfo& entry ) const; |
|
68 TUid trusterId(const QString& clientDescription) const; |
|
69 |
|
70 private: |
|
71 CpCertDataContainer& mCertDataContainer; |
|
72 /** |
|
73 * Application manager class, used to get applications in system. |
|
74 */ |
|
75 CCertificateAppInfoManager* mAppInfoManager; |
|
76 |
|
77 /** |
|
78 * Client Uids of the certstore |
|
79 */ |
|
80 RArray<TUid> mClientUids; |
|
81 |
|
82 /** |
|
83 * To get the names of the trusted clients from the resources |
|
84 */ |
|
85 QList<QString> mTrustedClients; |
|
86 |
|
87 /** |
|
88 * To get the yes/no trust texts from the resources |
|
89 */ |
|
90 QList<QString> mTrustValues; |
|
91 |
|
92 TInt mCertificateIndex; |
|
93 |
|
94 HbDataFormModel* mFormModel; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif // CPCERTTRUSTVIEW_H |
|
99 |
|
100 // End of File |
|