59 CWsfWlanInfoArrayVisitor &aWlanInfoBranding ) |
59 CWsfWlanInfoArrayVisitor &aWlanInfoBranding ) |
60 { |
60 { |
61 iAppUi = &aAppUi; |
61 iAppUi = &aAppUi; |
62 iModel = &aModel; |
62 iModel = &aModel; |
63 iWlanInfoBranding = &aWlanInfoBranding; |
63 iWlanInfoBranding = &aWlanInfoBranding; |
64 // Initialize our reference info array |
|
65 iInfoArray = iModel->WlanList(); |
|
66 iModel->SetConnecting( EFalse ); |
64 iModel->SetConnecting( EFalse ); |
67 } |
65 } |
68 |
66 |
69 // --------------------------------------------------------------------------- |
67 // --------------------------------------------------------------------------- |
70 // TWsfMainController::UpdateViewL |
68 // TWsfMainController::UpdateViewL |
356 iInfoArray->SortArrayL(); |
354 iInfoArray->SortArrayL(); |
357 UpdateViewL( iInfoArray ); |
355 UpdateViewL( iInfoArray ); |
358 } |
356 } |
359 } |
357 } |
360 } |
358 } |
361 |
|
362 //Update icon |
|
363 iModel->RefreshScanL(); |
|
364 } |
359 } |
365 |
360 |
366 // --------------------------------------------------------------------------- |
361 // --------------------------------------------------------------------------- |
367 // TWsfMainController::WlanConnectionClosedL |
362 // TWsfMainController::WlanConnectionClosedL |
368 // --------------------------------------------------------------------------- |
363 // --------------------------------------------------------------------------- |
601 // --------------------------------------------------------------------------- |
596 // --------------------------------------------------------------------------- |
602 // |
597 // |
603 void TWsfMainController::UpdateIapIdToInfoArrayL( TWsfWlanInfo& aInfo ) |
598 void TWsfMainController::UpdateIapIdToInfoArrayL( TWsfWlanInfo& aInfo ) |
604 { |
599 { |
605 LOG_ENTERFN( "TWsfMainController::UpdateIapIdToInfoArrayL" ); |
600 LOG_ENTERFN( "TWsfMainController::UpdateIapIdToInfoArrayL" ); |
606 |
601 TWsfWlanInfo* temp = iInfoArray->Match( aInfo.iSsid, iInfoArray->Count() ); |
607 if ( iInfoArray ) |
602 if ( temp && !aInfo.Hidden() ) |
608 { |
603 { |
609 TWsfWlanInfo* temp = iInfoArray->Match( aInfo.iSsid, iInfoArray->Count() ); |
604 LOG_WRITE( "Info found" ); |
610 if ( temp && !aInfo.Hidden() ) |
605 |
611 { |
606 // Check that there aren't any IAPs with same id |
612 LOG_WRITE( "Info found" ); |
607 TWsfWlanInfo* wlanInfoWithSameIapId = iInfoArray->Match( aInfo.iIapId, |
613 |
608 iInfoArray->Count() ); |
614 // Check that there aren't any IAPs with same id |
609 if ( wlanInfoWithSameIapId ) |
615 TWsfWlanInfo* wlanInfoWithSameIapId = iInfoArray->Match( aInfo.iIapId, |
610 { |
616 iInfoArray->Count() ); |
611 // info with same id found set its iap id to zero |
617 if ( wlanInfoWithSameIapId ) |
612 LOG_WRITE( "info with same id found" ); |
618 { |
613 wlanInfoWithSameIapId->iIapId = 0; |
619 // info with same id found set its iap id to zero |
614 } |
620 LOG_WRITE( "info with same id found" ); |
615 |
621 wlanInfoWithSameIapId->iIapId = 0; |
616 temp->iIapId = aInfo.iIapId; |
622 } |
617 |
623 |
618 if ( aInfo.iNetworkName.Length() ) |
624 temp->iIapId = aInfo.iIapId; |
619 { |
625 |
620 // Replace ssid as well since scanner does this same thing |
626 if ( aInfo.iNetworkName.Length() ) |
621 temp->iSsid.Copy( aInfo.iNetworkName ); |
627 { |
622 } |
628 // Replace ssid as well since scanner does this same thing |
623 } |
629 temp->iSsid.Copy( aInfo.iNetworkName ); |
624 else |
630 } |
625 { |
631 } |
626 LOG_WRITE( "Info not found" ); |
632 else |
627 TWsfWlanInfo* createdInfo = new (ELeave) TWsfWlanInfo( aInfo ); |
633 { |
628 createdInfo->iVisibility = ETrue; |
634 LOG_WRITE( "Info not found" ); |
629 createdInfo->iStrengthLevel = EWlanSignalStrengthMax; |
635 TWsfWlanInfo* createdInfo = new (ELeave) TWsfWlanInfo( aInfo ); |
630 iInfoArray->AppendL( createdInfo ); |
636 createdInfo->iVisibility = ETrue; |
|
637 createdInfo->iStrengthLevel = EWlanSignalStrengthMax; |
|
638 iInfoArray->AppendL( createdInfo ); |
|
639 } |
|
640 } |
631 } |
641 } |
632 } |
642 |
633 |
643 // --------------------------------------------------------------------------- |
634 // --------------------------------------------------------------------------- |
644 // TWsfMainController::DisconnectL |
635 // TWsfMainController::DisconnectL |