eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetup.cpp
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 %
    19 * %version: 11.1.2 %
    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 "EapTraceSymbian.h"
    43 #include "eap_am_trace_symbian.h"
    44 #include "EapConversion.h"
    44 
       
    45 //#include "EapAkaDbUtils.h"
    45 
    46 
    46 #include "eap_am_tools_symbian.h"
    47 #include "eap_am_tools_symbian.h"
    47 
    48 
    48 // LOCAL CONSTANTS
    49 // LOCAL CONSTANTS
    49 
    50 
    93 {
    94 {
    94 	EAP_TRACE_DEBUG_SYMBIAN(
    95 	EAP_TRACE_DEBUG_SYMBIAN(
    95 		(_L("CEapProtectedSetup::GetStackInterfaceL - Start")));
    96 		(_L("CEapProtectedSetup::GetStackInterfaceL - Start")));
    96 
    97 
    97 	// Create AM
    98 	// Create AM
    98 	CEapAmProtectedSetupSymbian* amEapType = CEapAmProtectedSetupSymbian::NewL(
    99 	eap_am_type_protected_setup_symbian_c* amEapType = eap_am_type_protected_setup_symbian_c::NewL(
    99 		aTools, 
   100 		aTools, 
   100 		aPartner, 
   101 		aPartner, 
   101 		iIndexType,
   102 		iIndexType,
   102 		iIndex,
   103 		iIndex,
   103 		iTunnelingType,
   104 		iTunnelingType,
   108 
   109 
   109 	if (amEapType == 0 || amEapType->get_is_valid() == false)
   110 	if (amEapType == 0 || amEapType->get_is_valid() == false)
   110 	{
   111 	{
   111 	
   112 	
   112 		EAP_TRACE_DEBUG_SYMBIAN(
   113 		EAP_TRACE_DEBUG_SYMBIAN(
   113 			(_L("ERROR: GetStackInterfaceL : CEapAmProtectedSetupSymbian(): failed.")));
   114 			(_L("ERROR: GetStackInterfaceL : eap_am_type_protected_setup_symbian_c(): failed.")));
   114 	
   115 	
   115 		delete amEapType;
   116 		delete amEapType;
   116 		User::Leave(KErrNoMemory);
   117 		User::Leave(KErrNoMemory);
   117 	}	
   118 	}	
   118 	
   119 	
   180 	
   181 	
   181 	return type;
   182 	return type;
   182 }
   183 }
   183 
   184 
   184 // ----------------------------------------------------------
   185 // ----------------------------------------------------------
   185 
   186 TInt CEapProtectedSetup::InvokeUiL()
   186 
   187 {
   187 
   188 	EAP_TRACE_DEBUG_SYMBIAN(
   188 // ----------------------------------------------------------
   189 		(_L("ERROR: CEapProtectedSetup::InvokeUiL - THIS IS NOT SUPPORTED")));
   189 
   190 
   190 CEapTypeInfo* CEapProtectedSetup::GetInfoL()
   191 	TInt buttonId(0);
       
   192  
       
   193 	// This is a dummy function.
       
   194 	
       
   195 	return buttonId;
       
   196 }
       
   197 
       
   198 // ----------------------------------------------------------
       
   199 CEapTypeInfo* CEapProtectedSetup::GetInfoLC()
   191 {
   200 {
   192 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
   201 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
   193 		(TDesC&)KReleaseDate, 
   202 		(TDesC&)KReleaseDate, 
   194 		(TDesC&)KEapTypeVersion,
   203 		(TDesC&)KEapTypeVersion,
   195 		(TDesC&)KManufacturer);
   204 		(TDesC&)KManufacturer);
   196 
   205 
       
   206 	CleanupStack::PushL(info);
   197 	return info;
   207 	return info;
   198 }
   208 }
   199 
   209 
   200 // ----------------------------------------------------------
   210 // ----------------------------------------------------------
   201 void CEapProtectedSetup::DeleteConfigurationL()
   211 void CEapProtectedSetup::DeleteConfigurationL()
   211 	return KInterfaceVersion;
   221 	return KInterfaceVersion;
   212 }
   222 }
   213 
   223 
   214 // ----------------------------------------------------------
   224 // ----------------------------------------------------------
   215 
   225 
   216 void CEapProtectedSetup::SetTunnelingType(const TEapExpandedType aTunnelingType)
   226 void CEapProtectedSetup::SetTunnelingType(const TInt aTunnelingType)
   217 {
   227 {
   218 	EAP_TRACE_DATA_DEBUG_SYMBIAN(
   228 	EAP_TRACE_DEBUG_SYMBIAN(
   219 		(EAPL("CEapProtectedSetup::SetTunnelingType - tunneling type"),
   229 		(_L("CEapProtectedSetup::SetTunnelingType - tunneling type=%d"),
   220 		aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
   230 		aTunnelingType));
   221 
   231 
   222 	eap_type_value_e aInternalType;
   232 	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
   223 
   233 	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
   224 	    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
       
   225 	            &aTunnelingType,
       
   226 	            &aInternalType);
       
   227 
       
   228 	    iTunnelingType = aInternalType;
       
   229 
       
   230 }
   234 }
   231 
   235 
   232 
   236 
   233 // ----------------------------------------------------------
   237 // ----------------------------------------------------------
   234 void CEapProtectedSetup::SetIndexL(
   238 void CEapProtectedSetup::SetIndexL(