os/security/cryptoservices/certificateandkeymgmt/swicertstore/CSWICertStoreEntry.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/swicertstore/CSWICertStoreEntry.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 +* CSWICertStoreEntry class implementation
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @internalTechnology
1.26 +*/
1.27 +
1.28 +#ifndef __CSWICERTSTOREENTRY_H__
1.29 +#define __CSWICERTSTOREENTRY_H__
1.30 +
1.31 +#include <e32base.h>
1.32 +#include <s32std.h>
1.33 +#include <swicertstore.h>
1.34 +
1.35 +class MCTToken;
1.36 +class CCTCertInfo;
1.37 +
1.38 +/**
1.39 + * This class is used to associate an entry with the TStreamId of the stream
1.40 + * where the data of the certificate is stored.
1.41 + */
1.42 +NONSHARABLE_CLASS(CSWICertStoreEntry) : public CBase
1.43 + {
1.44 +public:
1.45 + static CSWICertStoreEntry* NewL(const CCTCertInfo& aCertInfo,const RArray<TUid>& aCertificateApps,TBool aTrusted,TStreamId aDataStreamId,const TCertMetaInfo& aCertMetaInfo,TInt aStoreIndex);
1.46 +
1.47 + /// Read a CSWICertStoreEntry from a stream.
1.48 + static CSWICertStoreEntry* NewLC(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex, TInt aStoreIndex = 0);
1.49 +
1.50 + virtual ~CSWICertStoreEntry();
1.51 +
1.52 + // Accessors
1.53 + const CCTCertInfo& CertInfo() const;
1.54 + TStreamId DataStreamId() const;
1.55 + const RArray<TUid>& CertificateApps() const;
1.56 + TBool IsApplicable(const TUid& aApplication) const;
1.57 + TBool Trusted() const;
1.58 + const TCertMetaInfo& CertMetaInfo() const;
1.59 + //returns the store index to which the entry belongs
1.60 + TInt StoreIndex() const;
1.61 +
1.62 +private:
1.63 + CSWICertStoreEntry(TInt aStoreIndex = 0);
1.64 + void ConstructL(const CCTCertInfo& aCertInfo,const RArray<TUid>& aCertificateApps,TBool aTrusted,TStreamId aDataStreamId,const TCertMetaInfo& aCertMetaInfo);
1.65 + void InternalizeL(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex);
1.66 +
1.67 +private:
1.68 + CCTCertInfo* iCertInfo;
1.69 + RArray<TUid> iCertificateApps;
1.70 + TBool iTrusted;
1.71 + TStreamId iDataStreamId;
1.72 + TCertMetaInfo iCertMetaInfo;
1.73 + //represents the store in which the certificate entry resides
1.74 + TInt iStoreIndex;
1.75 + };
1.76 +
1.77 +#endif