os/security/cryptoservices/certificateandkeymgmt/tadditionalstores/tadditionalstoremappings.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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  @file 
    23  @internalTechnology
    24 */
    25  
    26 #ifndef __FILECERTSTOREMAPPINGS_H__
    27 #define __FILECERTSTOREMAPPINGS_H__
    28 
    29 #include <s32file.h>
    30 #include "tadditionalstoremapping.h"
    31 
    32 
    33 class CFileCertStoreMappings : public CBase
    34 	{
    35 public:
    36 	static CFileCertStoreMappings* NewL(TStreamId aStreamId, 
    37 		CPermanentFileStore& aStore);
    38 	void ConstructL();
    39 	~CFileCertStoreMappings();
    40 	TInt Count();
    41 	void AddL(CFileCertStoreMapping* aEntry);
    42 	/**
    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.
    47 	 */
    48 	TInt Remove(const CCTCertInfo& aEntry);
    49 	TInt SetTempRemove(const CCTCertInfo& aCertInfo, TBool aFlag);
    50 	void UpdateL(const CCTCertInfo& aEntry);
    51 	void ReplaceL();
    52 	/**
    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.
    58 	 */
    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;
    65 
    66 protected:
    67 	CFileCertStoreMappings(TStreamId aStreamId, CPermanentFileStore& aStore);
    68 	void ExternalizeL(RWriteStream& aStream) const;
    69 	RPointerArray<CFileCertStoreMapping>* iMappings;
    70 	TStreamId iStreamId;
    71 	CPermanentFileStore& iStore;
    72 	};
    73 
    74 #endif