eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiConnection.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
child 55 9c2aa05919d9
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
     1 /*
       
     2 * Copyright (c) 2001-2006 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 the License "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:  EAP and WLAN authentication protocols.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: %
       
    20 */
       
    21 
       
    22 #ifndef _EAPTLSPEAPUICONNECTION_H_
       
    23 #define _EAPTLSPEAPUICONNECTION_H_
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 #include <d32dbms.h>
       
    28 //#include <EapType.h>
       
    29 #include <EapTypeDefinitions.h>
       
    30 #include <EapExpandedType.h>
       
    31 
       
    32 class CEapTlsPeapUiDataConnection;
       
    33 class CEapTlsPeapUiCipherSuites;
       
    34 class CEapTlsPeapUiCertificates;
       
    35 class CEapTlsPeapUiEapTypes;
       
    36 class MEapTlsPeapUiCertificates;
       
    37 class CEapFastPacStore;
       
    38 
       
    39 class CEapTlsPeapUiConnection : public CBase
       
    40 {
       
    41 
       
    42 public:
       
    43 
       
    44 	// This creates a connection between EAP plugin and the EAP UI.
       
    45 	// aTunnelingType - the Vendor-Type of Tunneling EAP type.
       
    46 	// aEapType - the Vendor-Type of the EAP type 
       
    47 	// Supported Vendor-ID here is 0x 0 (3 bytes) for both.
       
    48 
       
    49     CEapTlsPeapUiConnection(
       
    50         const TIndexType aIndexType,
       
    51         const TInt aIndex,
       
    52         const TEapExpandedType aTunnelingType,
       
    53         const TEapExpandedType aEapType);
       
    54 
       
    55     ~CEapTlsPeapUiConnection();
       
    56 
       
    57     TInt Connect();
       
    58 
       
    59     TInt Close();
       
    60 
       
    61     CEapTlsPeapUiDataConnection * GetDataConnection();
       
    62 
       
    63 	CEapTlsPeapUiCipherSuites * GetCipherSuiteConnection();
       
    64 	
       
    65 	CEapTlsPeapUiCertificates * GetCertificateConnection(MEapTlsPeapUiCertificates * const aParent);
       
    66 	
       
    67 	CEapTlsPeapUiEapTypes * GetEapTypeConnection();
       
    68 
       
    69     TIndexType GetIndexType();
       
    70 
       
    71     TInt GetIndex();
       
    72 
       
    73 	// Returns the Tunneling EAP type of this EAP type.
       
    74     TEapExpandedType GetTunnelingType();
       
    75 
       
    76 	// Returns the EAP type.
       
    77     TEapExpandedType GetEapType();
       
    78 
       
    79     // Check if there's the PAC store master key.
       
    80     // Call Connect() before doing this and Close() after.	
       
    81     // Returns ETrue if there is master key. EFalse if there is not.
       
    82 	TBool IsPacStoreMasterKeyPresentL();
       
    83 
       
    84     // This destroys the PAC store if it is created already.
       
    85     // Call Connect() before doing this and Close() after.
       
    86     // Returns KErrNone if successful. Symbian error code otherwise.
       
    87 	TInt DestroyPacStore();
       
    88 	
       
    89     // This check if the PAC store (or PAC store master key) can be decrypted 
       
    90 	// with the password provided.
       
    91     // Call Connect() before doing this and Close() after.	
       
    92     // Returns ETrue if successful.
       
    93 	TBool VerifyPacStorePasswordL(const TDesC& aPacStorePw);
       
    94 	
       
    95     // This creates the PAC store master key with the password provided.
       
    96     // Call Connect() before doing this and Close() after.	
       
    97     // Returns KErrNone if successful. Symbian error code otherwise.
       
    98 	TInt CreatePacStoreMasterKey(const TDesC& aPacStorePw);
       
    99 	
       
   100     void GetPacStorePasswordL(
       
   101 		TDes8 & aPassword8);
       
   102 
       
   103     void SetPacStorePasswordL(
       
   104 		const TDesC8 & aPassword8);
       
   105 
       
   106 protected:
       
   107 
       
   108     // Bearer type
       
   109 	TIndexType iIndexType;
       
   110 	
       
   111 	// Unique index
       
   112 	TInt iIndex;
       
   113 
       
   114 	// This stores the Vendor-Type of Tunneling EAP type. Supported Vendor-ID here is 0x 0 (3 bytes).
       
   115 	TEapExpandedType iTunnelingType;
       
   116 
       
   117 	// This stores the Vendor-Type of the EAP type. Supported Vendor-ID here is 0x 0 (3 bytes).
       
   118 	TEapExpandedType iEapType;
       
   119 	
       
   120     // database names, handlers etc...
       
   121 
       
   122     CEapTlsPeapUiDataConnection * iDataConn;
       
   123 
       
   124 	CEapTlsPeapUiCipherSuites * iCipherSuites;
       
   125 		
       
   126 	CEapTlsPeapUiEapTypes * iEapTypes;
       
   127 	
       
   128 	CEapTlsPeapUiCertificates * iCertificates;	
       
   129 	
       
   130 private:
       
   131 	
       
   132     void ConnectL();
       
   133     
       
   134 private:
       
   135 	
       
   136 	CEapFastPacStore * iPacStoreDb;
       
   137 };
       
   138 
       
   139 #endif
       
   140 
       
   141 // End of file