os/security/cryptoservices/certificateandkeymgmt/tadditionalstores/tadditionalstoremappings.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tadditionalstores/tadditionalstoremappings.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +/*
     1.5 +* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* FILECERTSTOREMAPPINGS.H
    1.19 +* CFileCertStoreMappings class implementation
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +/**
    1.25 + @file 
    1.26 + @internalTechnology
    1.27 +*/
    1.28 + 
    1.29 +#ifndef __FILECERTSTOREMAPPINGS_H__
    1.30 +#define __FILECERTSTOREMAPPINGS_H__
    1.31 +
    1.32 +#include <s32file.h>
    1.33 +#include "tadditionalstoremapping.h"
    1.34 +
    1.35 +
    1.36 +class CFileCertStoreMappings : public CBase
    1.37 +	{
    1.38 +public:
    1.39 +	static CFileCertStoreMappings* NewL(TStreamId aStreamId, 
    1.40 +		CPermanentFileStore& aStore);
    1.41 +	void ConstructL();
    1.42 +	~CFileCertStoreMappings();
    1.43 +	TInt Count();
    1.44 +	void AddL(CFileCertStoreMapping* aEntry);
    1.45 +	/**
    1.46 +	 * Removes an entry from the list
    1.47 +	 * @param aEntry The entry to delete
    1.48 +	 * @return KErrNotFound if aEntry is not found in the list, KErrNone is the
    1.49 +	 * entry was successfully deleted.
    1.50 +	 */
    1.51 +	TInt Remove(const CCTCertInfo& aEntry);
    1.52 +	TInt SetTempRemove(const CCTCertInfo& aCertInfo, TBool aFlag);
    1.53 +	void UpdateL(const CCTCertInfo& aEntry);
    1.54 +	void ReplaceL();
    1.55 +	/**
    1.56 +	 * Returns the index in the store of aEntry. The function goes through
    1.57 +	 * the store entries and returns the index of the first entry whose label
    1.58 +	 * matches the label of aEntry.
    1.59 +	 * @param aEntry The entry we want the index of.
    1.60 +	 * @return The index of aEntry in the store.
    1.61 +	 */
    1.62 +	TInt Index(const CCTCertInfo& aEntry);
    1.63 +	CFileCertStoreMapping* Mapping(TInt aIndex);
    1.64 +	TStreamId StreamId() const;
    1.65 +	const CCTCertInfo& Entry(TInt aIndex);
    1.66 +	const CCTCertInfo& EntryByHandleL(TInt aHandle) const;
    1.67 +	TInt NextHandle() const;
    1.68 +
    1.69 +protected:
    1.70 +	CFileCertStoreMappings(TStreamId aStreamId, CPermanentFileStore& aStore);
    1.71 +	void ExternalizeL(RWriteStream& aStream) const;
    1.72 +	RPointerArray<CFileCertStoreMapping>* iMappings;
    1.73 +	TStreamId iStreamId;
    1.74 +	CPermanentFileStore& iStore;
    1.75 +	};
    1.76 +
    1.77 +#endif