|
1 /* |
|
2 * Copyright (c) 1998-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 the License "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: |
|
15 * CSWICertStoreEntry class implementation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 @internalTechnology |
|
25 */ |
|
26 |
|
27 #ifndef __CSWICERTSTOREENTRY_H__ |
|
28 #define __CSWICERTSTOREENTRY_H__ |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <s32std.h> |
|
32 #include <swicertstore.h> |
|
33 |
|
34 class MCTToken; |
|
35 class CCTCertInfo; |
|
36 |
|
37 /** |
|
38 * This class is used to associate an entry with the TStreamId of the stream |
|
39 * where the data of the certificate is stored. |
|
40 */ |
|
41 NONSHARABLE_CLASS(CSWICertStoreEntry) : public CBase |
|
42 { |
|
43 public: |
|
44 static CSWICertStoreEntry* NewL(const CCTCertInfo& aCertInfo,const RArray<TUid>& aCertificateApps,TBool aTrusted,TStreamId aDataStreamId,const TCertMetaInfo& aCertMetaInfo,TInt aStoreIndex); |
|
45 |
|
46 /// Read a CSWICertStoreEntry from a stream. |
|
47 static CSWICertStoreEntry* NewLC(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex, TInt aStoreIndex = 0); |
|
48 |
|
49 virtual ~CSWICertStoreEntry(); |
|
50 |
|
51 // Accessors |
|
52 const CCTCertInfo& CertInfo() const; |
|
53 TStreamId DataStreamId() const; |
|
54 const RArray<TUid>& CertificateApps() const; |
|
55 TBool IsApplicable(const TUid& aApplication) const; |
|
56 TBool Trusted() const; |
|
57 const TCertMetaInfo& CertMetaInfo() const; |
|
58 //returns the store index to which the entry belongs |
|
59 TInt StoreIndex() const; |
|
60 |
|
61 private: |
|
62 CSWICertStoreEntry(TInt aStoreIndex = 0); |
|
63 void ConstructL(const CCTCertInfo& aCertInfo,const RArray<TUid>& aCertificateApps,TBool aTrusted,TStreamId aDataStreamId,const TCertMetaInfo& aCertMetaInfo); |
|
64 void InternalizeL(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex); |
|
65 |
|
66 private: |
|
67 CCTCertInfo* iCertInfo; |
|
68 RArray<TUid> iCertificateApps; |
|
69 TBool iTrusted; |
|
70 TStreamId iDataStreamId; |
|
71 TCertMetaInfo iCertMetaInfo; |
|
72 //represents the store in which the certificate entry resides |
|
73 TInt iStoreIndex; |
|
74 }; |
|
75 |
|
76 #endif |