eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapCertFetcher.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: %
    19 * %version: 13.1.2 %
    20 */
    20 */
    21 
    21 
    22 #ifndef _EAPTLSPEAPCERTFETCHER_H_
    22 #ifndef _EAPTLSPEAPCERTFETCHER_H_
    23 #define _EAPTLSPEAPCERTFETCHER_H_
    23 #define _EAPTLSPEAPCERTFETCHER_H_
    24 
    24 
    27 #include <unifiedcertstore.h>
    27 #include <unifiedcertstore.h>
    28 #include <mctwritablecertstore.h>
    28 #include <mctwritablecertstore.h>
    29 #include "EapTlsPeapUtils.h"
    29 #include "EapTlsPeapUtils.h"
    30 
    30 
    31 
    31 
    32 class CAbsEapCertificateFetcher;
    32 class CEapTlsPeapUiCertificates;
    33 
    33 
    34 // CLASS DECLARATION
    34 // CLASS DECLARATION
    35 class CEapTlsPeapCertFetcher 
    35 class CEapTlsPeapCertFetcher 
    36 : public CActive
    36 : public CActive
    37 {
    37 {
    38 
       
    39 public:
    38 public:
    40 
    39 	static CEapTlsPeapCertFetcher* NewL(CEapTlsPeapUiCertificates* const aParent);	
    41 	static CEapTlsPeapCertFetcher* NewL(CAbsEapCertificateFetcher* const aParent);
       
    42 	
    40 	
    43 	virtual ~CEapTlsPeapCertFetcher();	
    41 	virtual ~CEapTlsPeapCertFetcher();	
    44 	
    42 	
    45 	void GetCertificatesL();
    43 	void GetCertificatesL();
    46 
    44 
    47 	// DON'T USE THESE. ONLY USED FOR EapTlsPeapUtils.
    45 	// DON'T USE THESE. ONLY USED FOR EapTlsPeapUtils.
    48 	static CEapTlsPeapCertFetcher* NewL();	
    46 	static CEapTlsPeapCertFetcher* NewL();	
    49 	void GetSymbianSubjectKeyIdL( TDes8& aSubjectKeyId, EapCertificateEntry aCertEntry );
    47 	void GetSymbianSubjectKeyIdL( TDes8& aSubjectKeyId, CertificateEntry aCertEntry );
    50 	
    48 	
    51 protected:
    49 protected:
    52 	
    50 	
    53 	CEapTlsPeapCertFetcher(CAbsEapCertificateFetcher* const aParent);
    51 	CEapTlsPeapCertFetcher(CEapTlsPeapUiCertificates* const aParent);
    54 	
    52 	
    55 	void ConstructL();
    53 	void ConstructL();
    56 	
    54 	
    57 	void RunL();
    55 	void RunL();
    58 	
    56 	
    61 private:
    59 private:
    62 
    60 
    63 	// DON'T USE THIS. ONLY USED FOR EapTlsPeapUtils.
    61 	// DON'T USE THIS. ONLY USED FOR EapTlsPeapUtils.
    64 	CEapTlsPeapCertFetcher();	
    62 	CEapTlsPeapCertFetcher();	
    65 
    63 
    66 	void InitializeQuery();
       
    67 
       
    68 private:
    64 private:
    69 
    65 
    70 	enum TState
    66 	enum TState
    71 	{
    67 	{
    72 		EGetCertificatesNone,
       
    73 		EGetCertificatesInitStore,
    68 		EGetCertificatesInitStore,
    74 		EGetCertificatesGetCertList,
    69 		EGetCertificatesGetCertList,
    75 		EGetCertificatesGetUserCertList,
       
    76 		EGetCertificatesRetrieveCert,
    70 		EGetCertificatesRetrieveCert,
    77 		EGetSymbianSubjectKeyId // DON'T USE THIS. ONLY USED FOR EapTlsPeapUtils.		
    71 		EGetSymbianSubjectKeyId // DON'T USE THIS. ONLY USED FOR EapTlsPeapUtils.		
    78 	};
    72 	};
    79 	
    73 	
    80 	TState iState;
    74 	TState iState;
    81 	
    75 	
    82 	CAbsEapCertificateFetcher* const iParent;
    76 	CEapTlsPeapUiCertificates* const iParent;
    83 
    77 
    84 	RMPointerArray<CCTCertInfo> iCertInfos;
    78 	RMPointerArray<CCTCertInfo> iCertInfos;
    85 	
    79 	
    86 	CUnifiedCertStore* iCertStore;
    80 	CUnifiedCertStore* iCertStore;
    87 	
    81 	
    88 	RFs iFs;
    82 	RFs iFs;
    89 
    83 
    90 	CCertAttributeFilter* iCertFilter;
    84 	CCertAttributeFilter* iCertFilter;
    91 
    85 
    92 	RPointerArray<EapCertificateEntry> iUserCerts;
    86 	RArray<SCertEntry> iUserCerts;
    93 	
    87 	
    94 	RPointerArray<EapCertificateEntry> iCACerts;
    88 	RArray<SCertEntry> iCACerts;
    95 	
    89 	
       
    90     // For wrapping asynchronous calls.
       
    91     CActiveSchedulerWait iWait;
       
    92     
    96 	HBufC8* iEncodedCertificate;
    93 	HBufC8* iEncodedCertificate;
    97 	TPtr8 iCertPtr;
    94 	TPtr8 iCertPtr;
    98 
    95 
    99 	TCertificateOwnerType iOwnertype;
       
   100 	TInt iCertInfoIndex;
       
   101 	
    96 	
   102 }; 
    97 }; 
   103 
    98 
   104 #endif // _EAPTLSPEAPCERTFETCHER_H_
    99 #endif // _EAPTLSPEAPCERTFETCHER_H_
   105 
   100