sl@0: /* sl@0: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * CSWICertStoreEntry class implementation sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __CSWICERTSTOREENTRY_H__ sl@0: #define __CSWICERTSTOREENTRY_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class MCTToken; sl@0: class CCTCertInfo; sl@0: sl@0: /** sl@0: * This class is used to associate an entry with the TStreamId of the stream sl@0: * where the data of the certificate is stored. sl@0: */ sl@0: NONSHARABLE_CLASS(CSWICertStoreEntry) : public CBase sl@0: { sl@0: public: sl@0: static CSWICertStoreEntry* NewL(const CCTCertInfo& aCertInfo,const RArray& aCertificateApps,TBool aTrusted,TStreamId aDataStreamId,const TCertMetaInfo& aCertMetaInfo,TInt aStoreIndex); sl@0: sl@0: /// Read a CSWICertStoreEntry from a stream. sl@0: static CSWICertStoreEntry* NewLC(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex, TInt aStoreIndex = 0); sl@0: sl@0: virtual ~CSWICertStoreEntry(); sl@0: sl@0: // Accessors sl@0: const CCTCertInfo& CertInfo() const; sl@0: TStreamId DataStreamId() const; sl@0: const RArray& CertificateApps() const; sl@0: TBool IsApplicable(const TUid& aApplication) const; sl@0: TBool Trusted() const; sl@0: const TCertMetaInfo& CertMetaInfo() const; sl@0: //returns the store index to which the entry belongs sl@0: TInt StoreIndex() const; sl@0: sl@0: private: sl@0: CSWICertStoreEntry(TInt aStoreIndex = 0); sl@0: void ConstructL(const CCTCertInfo& aCertInfo,const RArray& aCertificateApps,TBool aTrusted,TStreamId aDataStreamId,const TCertMetaInfo& aCertMetaInfo); sl@0: void InternalizeL(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex); sl@0: sl@0: private: sl@0: CCTCertInfo* iCertInfo; sl@0: RArray iCertificateApps; sl@0: TBool iTrusted; sl@0: TStreamId iDataStreamId; sl@0: TCertMetaInfo iCertMetaInfo; sl@0: //represents the store in which the certificate entry resides sl@0: TInt iStoreIndex; sl@0: }; sl@0: sl@0: #endif