|
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 * FILECERTSTOREMAPPINGS.H |
|
16 * CFileCertStoreMappings class implementation |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @internalTechnology |
|
26 */ |
|
27 |
|
28 #ifndef __FILECERTSTOREMAPPINGS_H__ |
|
29 #define __FILECERTSTOREMAPPINGS_H__ |
|
30 |
|
31 #include <s32file.h> |
|
32 #include "tadditionalstoremapping.h" |
|
33 |
|
34 |
|
35 class CFileCertStoreMappings : public CBase |
|
36 { |
|
37 public: |
|
38 static CFileCertStoreMappings* NewL(TStreamId aStreamId, |
|
39 CPermanentFileStore& aStore); |
|
40 void ConstructL(); |
|
41 ~CFileCertStoreMappings(); |
|
42 TInt Count(); |
|
43 void AddL(CFileCertStoreMapping* aEntry); |
|
44 /** |
|
45 * Removes an entry from the list |
|
46 * @param aEntry The entry to delete |
|
47 * @return KErrNotFound if aEntry is not found in the list, KErrNone is the |
|
48 * entry was successfully deleted. |
|
49 */ |
|
50 TInt Remove(const CCTCertInfo& aEntry); |
|
51 TInt SetTempRemove(const CCTCertInfo& aCertInfo, TBool aFlag); |
|
52 void UpdateL(const CCTCertInfo& aEntry); |
|
53 void ReplaceL(); |
|
54 /** |
|
55 * Returns the index in the store of aEntry. The function goes through |
|
56 * the store entries and returns the index of the first entry whose label |
|
57 * matches the label of aEntry. |
|
58 * @param aEntry The entry we want the index of. |
|
59 * @return The index of aEntry in the store. |
|
60 */ |
|
61 TInt Index(const CCTCertInfo& aEntry); |
|
62 CFileCertStoreMapping* Mapping(TInt aIndex); |
|
63 TStreamId StreamId() const; |
|
64 const CCTCertInfo& Entry(TInt aIndex); |
|
65 const CCTCertInfo& EntryByHandleL(TInt aHandle) const; |
|
66 TInt NextHandle() const; |
|
67 |
|
68 protected: |
|
69 CFileCertStoreMappings(TStreamId aStreamId, CPermanentFileStore& aStore); |
|
70 void ExternalizeL(RWriteStream& aStream) const; |
|
71 RPointerArray<CFileCertStoreMapping>* iMappings; |
|
72 TStreamId iStreamId; |
|
73 CPermanentFileStore& iStore; |
|
74 }; |
|
75 |
|
76 #endif |