sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* CSWICertStoreEntryList class implementation
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
/**
|
sl@0
|
21 |
@file
|
sl@0
|
22 |
@internalTechnology
|
sl@0
|
23 |
*/
|
sl@0
|
24 |
|
sl@0
|
25 |
#ifndef __CSWICERTSTOREENTRYLIST_H__
|
sl@0
|
26 |
#define __CSWICERTSTOREENTRYLIST_H__
|
sl@0
|
27 |
|
sl@0
|
28 |
#include <s32file.h>
|
sl@0
|
29 |
|
sl@0
|
30 |
class MCTToken;
|
sl@0
|
31 |
class TCTTokenObjectHandle;
|
sl@0
|
32 |
class CSWICertStoreEntry;
|
sl@0
|
33 |
|
sl@0
|
34 |
/**
|
sl@0
|
35 |
* An in-memory list of the certs in the store.
|
sl@0
|
36 |
*/
|
sl@0
|
37 |
NONSHARABLE_CLASS(CSWICertStoreEntryList) : public CBase
|
sl@0
|
38 |
{
|
sl@0
|
39 |
public:
|
sl@0
|
40 |
/// Read the cert list from a stream
|
sl@0
|
41 |
static CSWICertStoreEntryList* NewL(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex = 0, TInt aStoreIndex = 0);
|
sl@0
|
42 |
|
sl@0
|
43 |
static CSWICertStoreEntryList* NewL();
|
sl@0
|
44 |
|
sl@0
|
45 |
virtual ~CSWICertStoreEntryList();
|
sl@0
|
46 |
|
sl@0
|
47 |
/// Get the number of certificates in the list
|
sl@0
|
48 |
TInt Count() const;
|
sl@0
|
49 |
|
sl@0
|
50 |
/// Determine whether a certificate exists with the specified label
|
sl@0
|
51 |
TBool LabelExists(const TDesC& aLabel) const;
|
sl@0
|
52 |
|
sl@0
|
53 |
/// Add a mapping and return its index, takes ownership
|
sl@0
|
54 |
TInt AppendL(CSWICertStoreEntry* aEntry);
|
sl@0
|
55 |
|
sl@0
|
56 |
/// Removes and an entry from the list
|
sl@0
|
57 |
void Remove(TInt aIndex);
|
sl@0
|
58 |
|
sl@0
|
59 |
/// Get a mapping given its index.
|
sl@0
|
60 |
const CSWICertStoreEntry& GetByIndex(TInt aIndex) const;
|
sl@0
|
61 |
|
sl@0
|
62 |
/// Get a mapping given the cert handle.
|
sl@0
|
63 |
/// @leave KErrNotFound If the specified cert is not present.
|
sl@0
|
64 |
const CSWICertStoreEntry& GetByHandleL(const TCTTokenObjectHandle& aHandle) const;
|
sl@0
|
65 |
|
sl@0
|
66 |
private:
|
sl@0
|
67 |
CSWICertStoreEntryList();
|
sl@0
|
68 |
void InternalizeL(RReadStream& aStream, MCTToken& aToken, TInt aCertIndex, TInt aStoreIndex);
|
sl@0
|
69 |
|
sl@0
|
70 |
private:
|
sl@0
|
71 |
RPointerArray<CSWICertStoreEntry> iEntries;
|
sl@0
|
72 |
};
|
sl@0
|
73 |
|
sl@0
|
74 |
#endif
|