352 } |
362 } |
353 } |
363 } |
354 |
364 |
355 // ---------------------------------------------------------------------- |
365 // ---------------------------------------------------------------------- |
356 |
366 |
|
367 #if defined(USE_FAST_EAP_TYPE) |
|
368 |
|
369 eap_status_e eap_am_plugin_symbian_c::initialize_pac_store( |
|
370 const eap_method_settings_c * const internal_settings, |
|
371 const eap_tlv_message_type_function_e completion_function) |
|
372 { |
|
373 EAP_TRACE_DEBUG( |
|
374 m_am_tools, |
|
375 TRACE_FLAGS_DEFAULT, |
|
376 (EAPL("eap_am_plugin_symbian_c::initialize_pac_store(): this=0x%08x, completion_function=%d=%s.\n"), |
|
377 this, |
|
378 completion_function, |
|
379 eap_process_tlv_message_data_c::get_function_string(completion_function))); |
|
380 |
|
381 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::initialize_pac_store()"); |
|
382 |
|
383 if (m_completion_function != eap_tlv_message_type_function_none) |
|
384 { |
|
385 EAP_TRACE_DEBUG( |
|
386 m_am_tools, |
|
387 TRACE_FLAGS_DEFAULT, |
|
388 (EAPL("ERROR: eap_am_plugin_symbian_c::initialize_pac_store(): this=0x%08x, m_completion_function=%d=%s\n"), |
|
389 this, |
|
390 m_completion_function, |
|
391 eap_process_tlv_message_data_c::get_function_string(m_completion_function))); |
|
392 EAP_ASSERT_ANYWAY_TOOLS(m_am_tools); |
|
393 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
394 } |
|
395 |
|
396 delete m_internal_settings; |
|
397 |
|
398 m_internal_settings = new eap_method_settings_c( |
|
399 m_am_tools, |
|
400 internal_settings); |
|
401 if (m_internal_settings == 0) |
|
402 { |
|
403 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
404 } |
|
405 |
|
406 CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index); |
|
407 if (eapType == 0) |
|
408 { |
|
409 return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error); |
|
410 } |
|
411 |
|
412 m_completion_function = completion_function; |
|
413 |
|
414 TInt error = eapType->InitialisePacStore(this); |
|
415 if (error == KErrCompletion) |
|
416 { |
|
417 // This is asynchronous call which will be completed by CompleteInitialisePacStore() function. |
|
418 return EAP_STATUS_RETURN(m_am_tools, eap_status_pending_request); |
|
419 } |
|
420 else if (error != KErrNone) |
|
421 { |
|
422 return EAP_STATUS_RETURN( |
|
423 m_am_tools, |
|
424 m_am_tools->convert_am_error_to_eapol_error(error)); |
|
425 } |
|
426 else |
|
427 { |
|
428 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
429 } |
|
430 } |
|
431 |
|
432 #endif //#if defined(USE_FAST_EAP_TYPE) |
|
433 |
|
434 // ---------------------------------------------------------------------- |
|
435 |
357 eap_status_e eap_am_plugin_symbian_c::get_configuration(const eap_method_settings_c * const internal_settings) |
436 eap_status_e eap_am_plugin_symbian_c::get_configuration(const eap_method_settings_c * const internal_settings) |
358 { |
437 { |
359 EAP_TRACE_DEBUG( |
438 EAP_TRACE_DEBUG( |
360 m_am_tools, |
439 m_am_tools, |
361 TRACE_FLAGS_DEFAULT, |
440 TRACE_FLAGS_DEFAULT, |
362 (EAPL("eap_am_plugin_symbian_c::get_configuration(): this=0x%08x.\n"), |
441 (EAPL("eap_am_plugin_symbian_c::get_configuration(): this=0x%08x.\n"), |
363 this)); |
442 this)); |
364 |
443 |
365 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::get_configuration()"); |
444 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::get_configuration()"); |
366 |
445 |
|
446 eap_status_e status(eap_status_ok); |
|
447 |
|
448 delete m_internal_settings; |
|
449 m_internal_settings = 0; |
|
450 |
|
451 #if defined(USE_FAST_EAP_TYPE) |
|
452 |
|
453 if (internal_settings->m_EAPType == eap_type_fast) |
|
454 { |
|
455 const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_get_configuration); |
|
456 |
|
457 status = initialize_pac_store( |
|
458 internal_settings, |
|
459 error_completion_function); |
|
460 if (status == eap_status_pending_request) |
|
461 { |
|
462 return EAP_STATUS_RETURN(m_am_tools, status); |
|
463 } |
|
464 else if (status != eap_status_ok) |
|
465 { |
|
466 return EAP_STATUS_RETURN( |
|
467 m_am_tools, |
|
468 error_complete( |
|
469 eap_status_illegal_parameter, |
|
470 internal_settings, |
|
471 error_completion_function)); |
|
472 } |
|
473 } |
|
474 |
|
475 #endif //#if defined(USE_FAST_EAP_TYPE) |
|
476 |
|
477 |
|
478 status = internal_complete_get_configuration(internal_settings); |
|
479 |
|
480 return EAP_STATUS_RETURN(m_am_tools, status); |
|
481 } |
|
482 |
|
483 // ---------------------------------------------------------------------- |
|
484 |
|
485 eap_status_e eap_am_plugin_symbian_c::internal_complete_get_configuration(const eap_method_settings_c * const internal_settings) |
|
486 { |
|
487 EAP_TRACE_DEBUG( |
|
488 m_am_tools, |
|
489 TRACE_FLAGS_DEFAULT, |
|
490 (EAPL("eap_am_plugin_symbian_c::internal_complete_get_configuration(): this=0x%08x.\n"), |
|
491 this)); |
|
492 |
|
493 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::internal_complete_get_configuration()"); |
|
494 |
367 const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_get_configuration); |
495 const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_get_configuration); |
|
496 |
|
497 eap_status_e status(eap_status_ok); |
|
498 TInt error(KErrNone); |
368 |
499 |
369 CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index); |
500 CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index); |
370 if (eapType == 0) |
501 if (eapType == 0) |
371 { |
502 { |
372 return EAP_STATUS_RETURN( |
503 return EAP_STATUS_RETURN( |
461 m_am_tools->convert_am_error_to_eapol_error(error), |
590 m_am_tools->convert_am_error_to_eapol_error(error), |
462 internal_settings, |
591 internal_settings, |
463 error_completion_function)); |
592 error_completion_function)); |
464 } |
593 } |
465 |
594 |
466 eap_status_e status = m_partner->complete_get_configuration(complete_settings); |
595 status = m_partner->complete_get_configuration(complete_settings); |
467 |
596 |
468 return EAP_STATUS_RETURN(m_am_tools, status); |
597 return EAP_STATUS_RETURN(m_am_tools, status); |
469 } |
598 } |
470 |
599 |
471 // ---------------------------------------------------------------------- |
600 // ---------------------------------------------------------------------- |
472 |
601 |
473 eap_status_e eap_am_plugin_symbian_c::set_configuration(const eap_method_settings_c * const internal_settings) |
602 eap_status_e eap_am_plugin_symbian_c::set_configuration(const eap_method_settings_c * const internal_settings) |
|
603 { |
|
604 EAP_TRACE_DEBUG( |
|
605 m_am_tools, |
|
606 TRACE_FLAGS_DEFAULT, |
|
607 (EAPL("eap_am_plugin_symbian_c::set_configuration(): this=0x%08x.\n"), |
|
608 this)); |
|
609 |
|
610 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::set_configuration()"); |
|
611 |
|
612 eap_status_e status(eap_status_ok); |
|
613 |
|
614 delete m_internal_settings; |
|
615 m_internal_settings = 0; |
|
616 |
|
617 #if defined(USE_FAST_EAP_TYPE) |
|
618 |
|
619 if (internal_settings->m_EAPType == eap_type_fast) |
|
620 { |
|
621 const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_set_configuration); |
|
622 |
|
623 status = initialize_pac_store( |
|
624 internal_settings, |
|
625 error_completion_function); |
|
626 if (status == eap_status_pending_request) |
|
627 { |
|
628 return EAP_STATUS_RETURN(m_am_tools, status); |
|
629 } |
|
630 else if (status != eap_status_ok) |
|
631 { |
|
632 return EAP_STATUS_RETURN( |
|
633 m_am_tools, |
|
634 error_complete( |
|
635 eap_status_illegal_parameter, |
|
636 internal_settings, |
|
637 error_completion_function)); |
|
638 } |
|
639 } |
|
640 |
|
641 #endif //#if defined(USE_FAST_EAP_TYPE) |
|
642 |
|
643 |
|
644 status = internal_complete_set_configuration(internal_settings); |
|
645 |
|
646 return EAP_STATUS_RETURN(m_am_tools, status); |
|
647 } |
|
648 |
|
649 // ---------------------------------------------------------------------- |
|
650 |
|
651 eap_status_e eap_am_plugin_symbian_c::internal_complete_set_configuration(const eap_method_settings_c * const internal_settings) |
474 { |
652 { |
475 EAP_TRACE_DEBUG( |
653 EAP_TRACE_DEBUG( |
476 m_am_tools, |
654 m_am_tools, |
477 TRACE_FLAGS_DEFAULT, |
655 TRACE_FLAGS_DEFAULT, |
478 (EAPL("eap_am_plugin_symbian_c::set_configuration(): this=0x%08x.\n"), |
656 (EAPL("eap_am_plugin_symbian_c::set_configuration(): this=0x%08x.\n"), |
1100 eap_status_e status = m_partner->complete_get_type_info(complete_settings); |
1278 eap_status_e status = m_partner->complete_get_type_info(complete_settings); |
1101 |
1279 |
1102 return EAP_STATUS_RETURN(m_am_tools, status); |
1280 return EAP_STATUS_RETURN(m_am_tools, status); |
1103 } |
1281 } |
1104 |
1282 |
1105 // ---------------------------------------------------------------------- |
1283 //-------------------------------------------------- |
1106 |
1284 |
1107 |
1285 #if defined(USE_FAST_EAP_TYPE) |
|
1286 |
|
1287 TInt eap_am_plugin_symbian_c::CompleteInitialisePacStore() |
|
1288 { |
|
1289 EAP_TRACE_DEBUG( |
|
1290 m_am_tools, |
|
1291 TRACE_FLAGS_DEFAULT, |
|
1292 (EAPL("this = 0x%08x, message_function: starts: eap_am_plugin_symbian_c::CompleteInitialisePacStore(), completion_function=%d=%s\n"), |
|
1293 this, |
|
1294 m_completion_function, |
|
1295 eap_process_tlv_message_data_c::get_function_string(m_completion_function))); |
|
1296 |
|
1297 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::CompleteInitialisePacStore()"); |
|
1298 |
|
1299 eap_status_e status(eap_status_process_general_error); |
|
1300 |
|
1301 const eap_tlv_message_type_function_e completion_function = m_completion_function; |
|
1302 m_completion_function = eap_tlv_message_type_function_none; |
|
1303 |
|
1304 switch (completion_function) |
|
1305 { |
|
1306 case eap_tlv_message_type_function_plugin_complete_get_configuration: |
|
1307 status = internal_complete_get_configuration(m_internal_settings); |
|
1308 break; |
|
1309 case eap_tlv_message_type_function_plugin_complete_set_configuration: |
|
1310 status = internal_complete_set_configuration(m_internal_settings); |
|
1311 break; |
|
1312 default: |
|
1313 EAP_TRACE_DEBUG( |
|
1314 m_am_tools, |
|
1315 TRACE_FLAGS_DEFAULT, |
|
1316 (EAPL("ERROR: this = 0x%08x, message_function: starts: eap_am_plugin_symbian_c::CompleteInitialisePacStore(), Illegal completion_function=%d=%s\n"), |
|
1317 this, |
|
1318 completion_function, |
|
1319 eap_process_tlv_message_data_c::get_function_string(completion_function))); |
|
1320 EAP_ASSERT_ANYWAY_TOOLS(m_am_tools); |
|
1321 break; |
|
1322 } |
|
1323 |
|
1324 delete m_internal_settings; |
|
1325 m_internal_settings = 0; |
|
1326 |
|
1327 return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)); |
|
1328 } |
|
1329 |
|
1330 #endif //#if defined(USE_FAST_EAP_TYPE) |
1108 |
1331 |
1109 // ---------------------------------------------------------------------- |
1332 // ---------------------------------------------------------------------- |
1110 // End |
1333 // End |