eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeap.h
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 27 %
    19 * %version: 38 %
    20 */
    20 */
    21 
    21 
    22 #ifndef _EAPTLSPEAP_H_
    22 #ifndef _EAPTLSPEAP_H_
    23 #define _EAPTLSPEAP_H_
    23 #define _EAPTLSPEAP_H_
    24 
    24 
    25 // INCLUDES
    25 // INCLUDES
    26 #include <EapTypePlugin.h>
    26 #include <EapTypePlugin.h>
       
    27 #include "eap_am_export.h"
       
    28 // Start: added by script change_export_macros.sh.
       
    29 #if defined(EAP_NO_EXPORT_EAPTLSPEAP_H)
       
    30 	#define EAP_CLASS_VISIBILITY_EAPTLSPEAP_H EAP_NONSHARABLE 
       
    31 	#define EAP_FUNC_VISIBILITY_EAPTLSPEAP_H 
       
    32 	#define EAP_C_FUNC_VISIBILITY_EAPTLSPEAP_H 
       
    33 	#define EAP_FUNC_EXPORT_EAPTLSPEAP_H 
       
    34 	#define EAP_C_FUNC_EXPORT_EAPTLSPEAP_H 
       
    35 #elif defined(EAP_EXPORT_EAPTLSPEAP_H)
       
    36 	#define EAP_CLASS_VISIBILITY_EAPTLSPEAP_H EAP_EXPORT 
       
    37 	#define EAP_FUNC_VISIBILITY_EAPTLSPEAP_H EAP_FUNC_EXPORT 
       
    38 	#define EAP_C_FUNC_VISIBILITY_EAPTLSPEAP_H EAP_C_FUNC_EXPORT 
       
    39 	#define EAP_FUNC_EXPORT_EAPTLSPEAP_H EAP_FUNC_EXPORT 
       
    40 	#define EAP_C_FUNC_EXPORT_EAPTLSPEAP_H EAP_C_FUNC_EXPORT 
       
    41 #else
       
    42 	#define EAP_CLASS_VISIBILITY_EAPTLSPEAP_H EAP_IMPORT 
       
    43 	#define EAP_FUNC_VISIBILITY_EAPTLSPEAP_H EAP_FUNC_IMPORT 
       
    44 	#define EAP_C_FUNC_VISIBILITY_EAPTLSPEAP_H EAP_C_FUNC_IMPORT 
       
    45 	#define EAP_FUNC_EXPORT_EAPTLSPEAP_H 
       
    46 	#define EAP_C_FUNC_EXPORT_EAPTLSPEAP_H 
       
    47 #endif
       
    48 // End: added by script change_export_macros.sh.
       
    49 #if defined(USE_FAST_EAP_TYPE)
       
    50 	#include "tls_application_eap_fast.h"
       
    51 	#include "PacStoreInitialization.h"
       
    52 	#include "AbsPacStoreInitializer.h"
       
    53 #else
       
    54 	class AbsPacStoreInitializer;
       
    55 #endif
    27 #include "eap_header.h"
    56 #include "eap_header.h"
    28 #if defined(USE_FAST_EAP_TYPE)
    57 #include "abs_eap_base_timer.h"
    29 #include "tls_application_eap_fast.h"
    58 
    30 #endif
       
    31 // CLASS DECLARATION
    59 // CLASS DECLARATION
    32 /**
    60 /**
    33 * Class that implements the generic EAP type interface. Implements EAP TLS protocol.
    61 * Class that implements the generic EAP type interface. Implements EAP TLS protocol.
    34 */
    62 */
    35 class CEapTlsPeap : public CEapTypePlugin
    63 class EAP_CLASS_VISIBILITY_EAPTLSPEAP_H CEapTlsPeap
       
    64 : public CEapTypePlugin
       
    65 #if defined(USE_FAST_EAP_TYPE)
       
    66 , public abs_pac_store_initializer_c
       
    67 #endif //#if defined(USE_FAST_EAP_TYPE)
       
    68 , public abs_eap_base_timer_c
    36 {
    69 {
    37 public:		
    70 public:		
    38 
    71 
    39 	/**
    72 	/**
    40 	* Construction function for TLS. Called by ECom after the DLL has been loaded.
    73 	* Construction function for TLS. Called by ECom after the DLL has been loaded.
    41 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    74 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    42 	* @return Pointer to the instance.
    75 	* @return Pointer to the instance.
    43 	*/
    76 	*/
    44 	static CEapTlsPeap* NewTlsL(SIapInfo *aIapInfo);
    77 	static CEapTlsPeap* NewTlsL(SPluginInfo *aIapInfo);
    45 
    78 
    46 	/**
    79 	/**
    47 	* Construction function for PEAP. Called by ECom after the DLL has been loaded.
    80 	* Construction function for PEAP. Called by ECom after the DLL has been loaded.
    48 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    81 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    49 	* @return Pointer to the instance.
    82 	* @return Pointer to the instance.
    50 	*/
    83 	*/
    51 	static CEapTlsPeap* NewPeapL(SIapInfo *aIapInfo);
    84 	static CEapTlsPeap* NewPeapL(SPluginInfo *aIapInfo);
    52 
    85 
    53 	/**
    86 	/**
    54 	* Construction function for TTLS. Called by ECom after the DLL has been loaded.
    87 	* Construction function for TTLS. Called by ECom after the DLL has been loaded.
    55 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    88 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    56 	* @return Pointer to the instance.
    89 	* @return Pointer to the instance.
    57 	*/
    90 	*/
    58 #if defined(USE_TTLS_EAP_TYPE)
    91 #if defined(USE_TTLS_EAP_TYPE)
    59 	static CEapTlsPeap* NewTtlsL(SIapInfo *aIapInfo);
    92 	static CEapTlsPeap* NewTtlsL(SPluginInfo *aIapInfo);
    60 #endif // #if defined(USE_TTLS_EAP_TYPE)
    93 #endif // #if defined(USE_TTLS_EAP_TYPE)
    61 
    94 
    62 	/**
    95 	/**
    63 	* Construction function for TTLS-PAP.
    96 	* Construction function for TTLS-PAP.
    64 	* 
    97 	* 
    66 	* @param aIapInfo Pointer to the class that contains information
    99 	* @param aIapInfo Pointer to the class that contains information
    67 	*                 about bearer type and unique index.
   100 	*                 about bearer type and unique index.
    68 	* @return Pointer to the instance.
   101 	* @return Pointer to the instance.
    69 	*/
   102 	*/
    70 	
   103 	
    71 	static CEapTlsPeap* NewTtlsPapL( SIapInfo* aIapInfo );
   104 	static CEapTlsPeap* NewTtlsPapL( SPluginInfo* aIapInfo );
    72 	
   105 	
    73 	/**
   106 	/**
    74 	* Construction function for FAST. Called by ECom after the DLL has been loaded.
   107 	* Construction function for FAST. Called by ECom after the DLL has been loaded.
    75 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
   108 	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
    76 	* @return Pointer to the instance.
   109 	* @return Pointer to the instance.
    77 	*/
   110 	*/
    78 #if defined(USE_FAST_EAP_TYPE)
   111 #if defined(USE_FAST_EAP_TYPE)
    79 	static CEapTlsPeap* NewFastL(SIapInfo *aIapInfo);
   112 	static CEapTlsPeap* NewFastL(SPluginInfo *aIapInfo);
    80 #endif
   113 #endif
    81 
   114 
    82 	/**
   115 	/**
    83 	* Destructor does nothing.
   116 	* Destructor does nothing.
    84 	*/
   117 	*/
   177 	* Copies the EAP types configuration
   210 	* Copies the EAP types configuration
   178 	* @param aDestinationIndex ID to where copy the settings.
   211 	* @param aDestinationIndex ID to where copy the settings.
   179 	*/
   212 	*/
   180 	void CopySettingsL(const TIndexType aDestinationIndexType, const TInt aDestinationIndex);
   213 	void CopySettingsL(const TIndexType aDestinationIndexType, const TInt aDestinationIndex);
   181 
   214 
       
   215 	TInt InitialisePacStore(AbsPacStoreInitializer * const initializer);
       
   216 
       
   217 #if defined(USE_FAST_EAP_TYPE)
       
   218 
       
   219 	eap_status_e complete_start_initialize_PAC_store(
       
   220 		const eap_fast_completion_operation_e completion_operation,
       
   221 		const eap_fast_initialize_pac_store_completion_e completion);
       
   222 
       
   223 #endif //#if defined(USE_FAST_EAP_TYPE)
       
   224 
       
   225 	eap_status_e timer_expired(
       
   226 		const u32_t id, void *data);
       
   227 
       
   228 	eap_status_e timer_delete_data(
       
   229 		const u32_t id, void *data);
       
   230 
   182 protected:
   231 protected:
   183 	
   232 	
   184 	/**
   233 	/**
   185 	* Constructor initialises member variables.
   234 	* Constructor initialises member variables.
   186 	*/
   235 	*/
   187 	CEapTlsPeap(const TIndexType aIndexType, const TInt aIndex, const eap_type_value_e aEapType);
   236 	CEapTlsPeap(const TIndexType aIndexType, const TInt aIndex, const eap_type_value_e aEapType, abs_eap_am_tools_c * const aTools);
   188 
   237 
   189 #if defined(USE_FAST_EAP_TYPE)
       
   190 	tls_application_eap_fast_c* GetTlsInterfaceL(abs_eap_am_tools_c* const aTools, 
       
   191 											   const bool is_client_when_true,
       
   192 											   const eap_am_network_id_c * const receive_network_id);	
       
   193 #endif
       
   194 private:
   238 private:
   195 
   239 
   196 #ifdef USE_PAC_STORE
   240 #ifdef USE_PAC_STORE
   197 
   241 
   198 	void UpdatePacStoreCleanupTableL(const TIndexType aIndexType,
   242 	void UpdatePacStoreCleanupTableL(const TIndexType aIndexType,
   199 		const TInt aIndex, 
   243 		const TInt aIndex, 
   200 		const eap_type_value_e aTunnelingType);
   244 		const eap_type_value_e aTunnelingType);
   201 	
   245 	
   202 #endif // #ifdef USE_PAC_STORE	
   246 #endif // #ifdef USE_PAC_STORE	
   203 
   247 
       
   248 	void ConstructL();
       
   249 
   204 private:
   250 private:
   205 
   251 
   206 	// Bearer type
   252 	// Bearer type
   207 	TIndexType iIndexType;
   253 	TIndexType iIndexType;
   208 	
   254 	
   215 	// Tunneling type
   261 	// Tunneling type
   216 	eap_type_value_e iTunnelingType;
   262 	eap_type_value_e iTunnelingType;
   217 	
   263 	
   218 	// EAP array for deleting and changing index
   264 	// EAP array for deleting and changing index
   219 	RImplInfoPtrArray iEapArray;
   265 	RImplInfoPtrArray iEapArray;
   220 	
   266 
   221 #if defined(USE_FAST_EAP_TYPE)
   267 	/// This is pointer to the tools class.
   222 	tls_application_eap_fast_c* iApplication;
   268 	abs_eap_am_tools_c * m_am_tools;
   223 #endif	
   269 	
   224 		/// This is pointer to the tools class.
   270 #if defined(USE_FAST_EAP_TYPE)
   225 	abs_eap_am_tools_c * const m_am_tools;
   271 
   226 	
   272 	CPacStoreInitialization * iPacStoreInitialization;
   227 	eap_base_type_c* iType;
   273 
   228 
   274 	AbsPacStoreInitializer * iInitializer;
       
   275 
       
   276 #endif //#if defined(USE_FAST_EAP_TYPE)
   229 
   277 
   230 };
   278 };
   231 
   279 
   232 #endif // _EAPTLSPEAP_H_
   280 #endif // _EAPTLSPEAP_H_
   233 
   281