|
1 /* |
|
2 * Copyright (c) 2002 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: Represents one certificate info with trust settings. |
|
15 * This entity is called here as a "mapping". |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef WIMCERTSTOREMAPPING_H |
|
21 #define WIMCERTSTOREMAPPING_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <s32std.h> |
|
27 #include <ct.h> |
|
28 #include <mctcertstore.h> |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * This class is used to associate an entry with the mappings class |
|
34 * |
|
35 * |
|
36 * @lib WimPlugin |
|
37 * @since Series60 2.1 |
|
38 */ |
|
39 class CWimCertStoreMapping : public CBase |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Constructors |
|
45 */ |
|
46 static CWimCertStoreMapping* NewL(); |
|
47 |
|
48 static CWimCertStoreMapping* NewLC(); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 ~CWimCertStoreMapping(); |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * Sets the mapping class certificate part (iEntry). |
|
59 * If there is already an entry, it is deleted. |
|
60 * @param aCertInfo (IN) Certificate info class. |
|
61 * @return void |
|
62 */ |
|
63 void SetEntryL( CCTCertInfo* aCertInfo ); |
|
64 |
|
65 /** |
|
66 * Returns a pointer to the mapping class certificate object (iEntry). |
|
67 * @return A pointer to object of certificate info class. |
|
68 */ |
|
69 CCTCertInfo* Entry() const; |
|
70 |
|
71 /** |
|
72 * Returns an array of applications the mapping supports. |
|
73 * @return A array of of references to integers (application id's) |
|
74 */ |
|
75 const RArray<TUid>& CertificateApps() const; |
|
76 |
|
77 /** |
|
78 * Sets an array of applications to the mapping. |
|
79 * @param aCertificateApps (IN) TUids of applications |
|
80 * @return void |
|
81 */ |
|
82 void SetCertificateAppsL( RArray<TUid>* aCertificateApps ); |
|
83 |
|
84 /** |
|
85 * Returns a boolean value indicating whether or not |
|
86 * the certificate part of mapping supports given application. |
|
87 * @param aApplication (IN) A TUid of application |
|
88 * @return A boolean value true or false |
|
89 */ |
|
90 TBool IsApplicable( const TUid& aApplication ) const; |
|
91 |
|
92 /** |
|
93 * Returns a boolean value indicating whether or not |
|
94 * the certificte part of mapping is trusted. |
|
95 * @return A boolean value true or false |
|
96 */ |
|
97 TBool Trusted() const; |
|
98 |
|
99 /** |
|
100 * Sets a boolean value to mapping trusted settings |
|
101 * indicating whether or not the certificate part of mapping is trusted. |
|
102 * @param aTrusted (IN) A boolean value |
|
103 * @return ETrue, when trusted, EFalse when not trusted |
|
104 */ |
|
105 void SetTrusted( TBool aTrusted ); |
|
106 |
|
107 private: |
|
108 |
|
109 /** |
|
110 * Second phase constructor |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 /** |
|
115 * Default constructor |
|
116 */ |
|
117 CWimCertStoreMapping(); |
|
118 |
|
119 private: |
|
120 |
|
121 // A pointer to the certificate part of one mapping entry. |
|
122 // This class don't own the pointed object. |
|
123 CCTCertInfo* iEntry; |
|
124 |
|
125 // An array of applications the certificate part of mapping supports. |
|
126 // This class owns the pointer objects. |
|
127 RArray<TUid>* iCertificateApps; |
|
128 |
|
129 // Is the certificate part of this mapping trusted or not |
|
130 TBool iTrusted; |
|
131 }; |
|
132 |
|
133 #endif // WIMCERTSTOREMAPPING_H |
|
134 |
|
135 //end of file |