eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetup.cpp
changeset 26 9abfd4f00d37
parent 2 1c7bc153c08e
child 46 c74b3d9f6b9e
child 49 43351a4f2da3
equal deleted inserted replaced
25:e03a3db4489e 26:9abfd4f00d37
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 11.1.2 %
    19 * %version: 19 %
    20 */
    20 */
    21 
    21 
    22 // This is enumeration of EAPOL source code.
    22 // This is enumeration of EAPOL source code.
    23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
    23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
    24 	#undef EAP_FILE_NUMBER_ENUM
    24 	#undef EAP_FILE_NUMBER_ENUM
    38 #include "abs_eap_configuration_if.h"
    38 #include "abs_eap_configuration_if.h"
    39 
    39 
    40 #include <EapTypeInfo.h>
    40 #include <EapTypeInfo.h>
    41 #include "eap_am_type_protected_setup_symbian.h"
    41 #include "eap_am_type_protected_setup_symbian.h"
    42 #include "EapProtectedSetupGlobal.h"
    42 #include "EapProtectedSetupGlobal.h"
    43 #include "eap_am_trace_symbian.h"
    43 #include "EapTraceSymbian.h"
    44 
    44 #include "EapConversion.h"
    45 //#include "EapAkaDbUtils.h"
       
    46 
    45 
    47 #include "eap_am_tools_symbian.h"
    46 #include "eap_am_tools_symbian.h"
    48 
    47 
    49 // LOCAL CONSTANTS
    48 // LOCAL CONSTANTS
    50 
    49 
    94 {
    93 {
    95 	EAP_TRACE_DEBUG_SYMBIAN(
    94 	EAP_TRACE_DEBUG_SYMBIAN(
    96 		(_L("CEapProtectedSetup::GetStackInterfaceL - Start")));
    95 		(_L("CEapProtectedSetup::GetStackInterfaceL - Start")));
    97 
    96 
    98 	// Create AM
    97 	// Create AM
    99 	eap_am_type_protected_setup_symbian_c* amEapType = eap_am_type_protected_setup_symbian_c::NewL(
    98 	CEapAmProtectedSetupSymbian* amEapType = CEapAmProtectedSetupSymbian::NewL(
   100 		aTools, 
    99 		aTools, 
   101 		aPartner, 
   100 		aPartner, 
   102 		iIndexType,
   101 		iIndexType,
   103 		iIndex,
   102 		iIndex,
   104 		iTunnelingType,
   103 		iTunnelingType,
   109 
   108 
   110 	if (amEapType == 0 || amEapType->get_is_valid() == false)
   109 	if (amEapType == 0 || amEapType->get_is_valid() == false)
   111 	{
   110 	{
   112 	
   111 	
   113 		EAP_TRACE_DEBUG_SYMBIAN(
   112 		EAP_TRACE_DEBUG_SYMBIAN(
   114 			(_L("ERROR: GetStackInterfaceL : eap_am_type_protected_setup_symbian_c(): failed.")));
   113 			(_L("ERROR: GetStackInterfaceL : CEapAmProtectedSetupSymbian(): failed.")));
   115 	
   114 	
   116 		delete amEapType;
   115 		delete amEapType;
   117 		User::Leave(KErrNoMemory);
   116 		User::Leave(KErrNoMemory);
   118 	}	
   117 	}	
   119 	
   118 	
   181 	
   180 	
   182 	return type;
   181 	return type;
   183 }
   182 }
   184 
   183 
   185 // ----------------------------------------------------------
   184 // ----------------------------------------------------------
   186 TInt CEapProtectedSetup::InvokeUiL()
   185 
   187 {
   186 
   188 	EAP_TRACE_DEBUG_SYMBIAN(
   187 
   189 		(_L("ERROR: CEapProtectedSetup::InvokeUiL - THIS IS NOT SUPPORTED")));
   188 // ----------------------------------------------------------
   190 
   189 
   191 	TInt buttonId(0);
   190 CEapTypeInfo* CEapProtectedSetup::GetInfoL()
   192  
       
   193 	// This is a dummy function.
       
   194 	
       
   195 	return buttonId;
       
   196 }
       
   197 
       
   198 // ----------------------------------------------------------
       
   199 CEapTypeInfo* CEapProtectedSetup::GetInfoLC()
       
   200 {
   191 {
   201 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
   192 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
   202 		(TDesC&)KReleaseDate, 
   193 		(TDesC&)KReleaseDate, 
   203 		(TDesC&)KEapTypeVersion,
   194 		(TDesC&)KEapTypeVersion,
   204 		(TDesC&)KManufacturer);
   195 		(TDesC&)KManufacturer);
   205 
   196 
   206 	CleanupStack::PushL(info);
       
   207 	return info;
   197 	return info;
   208 }
   198 }
   209 
   199 
   210 // ----------------------------------------------------------
   200 // ----------------------------------------------------------
   211 void CEapProtectedSetup::DeleteConfigurationL()
   201 void CEapProtectedSetup::DeleteConfigurationL()
   221 	return KInterfaceVersion;
   211 	return KInterfaceVersion;
   222 }
   212 }
   223 
   213 
   224 // ----------------------------------------------------------
   214 // ----------------------------------------------------------
   225 
   215 
   226 void CEapProtectedSetup::SetTunnelingType(const TInt aTunnelingType)
   216 void CEapProtectedSetup::SetTunnelingType(const TEapExpandedType aTunnelingType)
   227 {
   217 {
   228 	EAP_TRACE_DEBUG_SYMBIAN(
   218 	EAP_TRACE_DATA_DEBUG_SYMBIAN(
   229 		(_L("CEapProtectedSetup::SetTunnelingType - tunneling type=%d"),
   219 		(EAPL("CEapProtectedSetup::SetTunnelingType - tunneling type"),
   230 		aTunnelingType));
   220 		aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
   231 
   221 
   232 	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
   222 	eap_type_value_e aInternalType;
   233 	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
   223 
       
   224 	    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
       
   225 	            &aTunnelingType,
       
   226 	            &aInternalType);
       
   227 
       
   228 	    iTunnelingType = aInternalType;
       
   229 
   234 }
   230 }
   235 
   231 
   236 
   232 
   237 // ----------------------------------------------------------
   233 // ----------------------------------------------------------
   238 void CEapProtectedSetup::SetIndexL(
   234 void CEapProtectedSetup::SetIndexL(