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