63
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 "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: Helper class to construct certificate list
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef ADVSECSETTINGSCERTLISTBUILDER_SYMBIAN_H
|
|
19 |
#define ADVSECSETTINGSCERTLISTBUILDER_SYMBIAN_H
|
|
20 |
|
|
21 |
#include <e32base.h> // CActive
|
|
22 |
#include "advsecsettingscertificate.h" // CertificateType
|
|
23 |
#include <ct/rmpointerarray.h> // RMPointerArray
|
|
24 |
#include <unifiedcertstore.h> // CUnifiedCertStore
|
|
25 |
#include <QList>
|
|
26 |
|
|
27 |
class RFs;
|
|
28 |
class CCTCertInfo;
|
|
29 |
class CCertAttributeFilter;
|
|
30 |
class CAdvSecSettingsLabeledCertInfo;
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Certificate list builder helper class.
|
|
35 |
*/
|
|
36 |
class CAdvSecSettingsCertListBuilder : public CActive
|
|
37 |
{
|
|
38 |
public: // constructor and destructor
|
|
39 |
static CAdvSecSettingsCertListBuilder *NewL(RFs &aFs, CUnifiedCertStore &aCertStore);
|
|
40 |
~CAdvSecSettingsCertListBuilder();
|
|
41 |
|
|
42 |
public: // new functions
|
|
43 |
void GetCertificateList(QList<AdvSecSettingsCertificate*> &certList,
|
|
44 |
RMPointerArray<CCTCertInfo> &aCertInfoArray, TRequestStatus &aStatus);
|
|
45 |
|
|
46 |
protected: // from CActive
|
|
47 |
void DoCancel();
|
|
48 |
void RunL();
|
|
49 |
TInt RunError(TInt aError);
|
|
50 |
|
|
51 |
private: // new functions
|
|
52 |
CAdvSecSettingsCertListBuilder(RFs &aFs, CUnifiedCertStore &aCertStore);
|
|
53 |
void ConstructL();
|
|
54 |
void ResetCertAttributeFilter();
|
|
55 |
void ProcessFirstCertificateL();
|
|
56 |
void ProcessNextCertificateL();
|
|
57 |
void StartProcessingCertificateL();
|
|
58 |
void CompleteProcessingCertificateL();
|
|
59 |
void ReturnCertificateListL();
|
|
60 |
AdvSecSettingsCertificate::CertificateType CertType(const CCTCertInfo &aCertInfo);
|
|
61 |
|
|
62 |
private: // data
|
|
63 |
RFs &iFs;
|
|
64 |
CUnifiedCertStore &iCertStore;
|
|
65 |
TRequestStatus *iClientStatus; // not owned
|
|
66 |
QList<AdvSecSettingsCertificate*> *iCertList; // not owned
|
|
67 |
RMPointerArray<CCTCertInfo> *iClientInfoArray; // not owned
|
|
68 |
RMPointerArray<CCTCertInfo> iCertInfoArray;
|
|
69 |
CCertAttributeFilter *iCertAttributeFilter;
|
|
70 |
TInt iCertInfoIndex;
|
|
71 |
HBufC8 *iCertificate;
|
|
72 |
TPtr8 iCertPtr;
|
|
73 |
RPointerArray<CAdvSecSettingsLabeledCertInfo> iLabeledCertInfos;
|
|
74 |
|
|
75 |
enum TCertListBuilderState {
|
|
76 |
EIdle,
|
|
77 |
EListingCerts,
|
|
78 |
ERetrievingCert,
|
|
79 |
EProcessingCert
|
|
80 |
} iState;
|
|
81 |
};
|
|
82 |
|
|
83 |
#endif // ADVSECSETTINGSCERTLISTBUILDER_SYMBIAN_H
|