os/security/cryptoservices/certificateandkeymgmt/tadditionalstores/tadditionalstoremappings.h
First public contribution.
2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * FILECERTSTOREMAPPINGS.H
16 * CFileCertStoreMappings class implementation
26 #ifndef __FILECERTSTOREMAPPINGS_H__
27 #define __FILECERTSTOREMAPPINGS_H__
30 #include "tadditionalstoremapping.h"
33 class CFileCertStoreMappings : public CBase
36 static CFileCertStoreMappings* NewL(TStreamId aStreamId,
37 CPermanentFileStore& aStore);
39 ~CFileCertStoreMappings();
41 void AddL(CFileCertStoreMapping* aEntry);
43 * Removes an entry from the list
44 * @param aEntry The entry to delete
45 * @return KErrNotFound if aEntry is not found in the list, KErrNone is the
46 * entry was successfully deleted.
48 TInt Remove(const CCTCertInfo& aEntry);
49 TInt SetTempRemove(const CCTCertInfo& aCertInfo, TBool aFlag);
50 void UpdateL(const CCTCertInfo& aEntry);
53 * Returns the index in the store of aEntry. The function goes through
54 * the store entries and returns the index of the first entry whose label
55 * matches the label of aEntry.
56 * @param aEntry The entry we want the index of.
57 * @return The index of aEntry in the store.
59 TInt Index(const CCTCertInfo& aEntry);
60 CFileCertStoreMapping* Mapping(TInt aIndex);
61 TStreamId StreamId() const;
62 const CCTCertInfo& Entry(TInt aIndex);
63 const CCTCertInfo& EntryByHandleL(TInt aHandle) const;
64 TInt NextHandle() const;
67 CFileCertStoreMappings(TStreamId aStreamId, CPermanentFileStore& aStore);
68 void ExternalizeL(RWriteStream& aStream) const;
69 RPointerArray<CFileCertStoreMapping>* iMappings;
71 CPermanentFileStore& iStore;