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(); |
64 iModel->SetConnecting( EFalse ); |
66 iModel->SetConnecting( EFalse ); |
65 } |
67 } |
66 |
68 |
67 // --------------------------------------------------------------------------- |
69 // --------------------------------------------------------------------------- |
68 // TWsfMainController::UpdateViewL |
70 // TWsfMainController::UpdateViewL |
599 // --------------------------------------------------------------------------- |
601 // --------------------------------------------------------------------------- |
600 // |
602 // |
601 void TWsfMainController::UpdateIapIdToInfoArrayL( TWsfWlanInfo& aInfo ) |
603 void TWsfMainController::UpdateIapIdToInfoArrayL( TWsfWlanInfo& aInfo ) |
602 { |
604 { |
603 LOG_ENTERFN( "TWsfMainController::UpdateIapIdToInfoArrayL" ); |
605 LOG_ENTERFN( "TWsfMainController::UpdateIapIdToInfoArrayL" ); |
604 TWsfWlanInfo* temp = iInfoArray->Match( aInfo.iSsid, iInfoArray->Count() ); |
606 |
605 if ( temp && !aInfo.Hidden() ) |
607 if ( iInfoArray ) |
606 { |
608 { |
607 LOG_WRITE( "Info found" ); |
609 TWsfWlanInfo* temp = iInfoArray->Match( aInfo.iSsid, iInfoArray->Count() ); |
608 |
610 if ( temp && !aInfo.Hidden() ) |
609 // Check that there aren't any IAPs with same id |
611 { |
610 TWsfWlanInfo* wlanInfoWithSameIapId = iInfoArray->Match( aInfo.iIapId, |
612 LOG_WRITE( "Info found" ); |
611 iInfoArray->Count() ); |
613 |
612 if ( wlanInfoWithSameIapId ) |
614 // Check that there aren't any IAPs with same id |
613 { |
615 TWsfWlanInfo* wlanInfoWithSameIapId = iInfoArray->Match( aInfo.iIapId, |
614 // info with same id found set its iap id to zero |
616 iInfoArray->Count() ); |
615 LOG_WRITE( "info with same id found" ); |
617 if ( wlanInfoWithSameIapId ) |
616 wlanInfoWithSameIapId->iIapId = 0; |
618 { |
617 } |
619 // info with same id found set its iap id to zero |
618 |
620 LOG_WRITE( "info with same id found" ); |
619 temp->iIapId = aInfo.iIapId; |
621 wlanInfoWithSameIapId->iIapId = 0; |
620 |
622 } |
621 if ( aInfo.iNetworkName.Length() ) |
623 |
622 { |
624 temp->iIapId = aInfo.iIapId; |
623 // Replace ssid as well since scanner does this same thing |
625 |
624 temp->iSsid.Copy( aInfo.iNetworkName ); |
626 if ( aInfo.iNetworkName.Length() ) |
625 } |
627 { |
626 } |
628 // Replace ssid as well since scanner does this same thing |
627 else |
629 temp->iSsid.Copy( aInfo.iNetworkName ); |
628 { |
630 } |
629 LOG_WRITE( "Info not found" ); |
631 } |
630 TWsfWlanInfo* createdInfo = new (ELeave) TWsfWlanInfo( aInfo ); |
632 else |
631 createdInfo->iVisibility = ETrue; |
633 { |
632 createdInfo->iStrengthLevel = EWlanSignalStrengthMax; |
634 LOG_WRITE( "Info not found" ); |
633 iInfoArray->AppendL( createdInfo ); |
635 TWsfWlanInfo* createdInfo = new (ELeave) TWsfWlanInfo( aInfo ); |
|
636 createdInfo->iVisibility = ETrue; |
|
637 createdInfo->iStrengthLevel = EWlanSignalStrengthMax; |
|
638 iInfoArray->AppendL( createdInfo ); |
|
639 } |
634 } |
640 } |
635 } |
641 } |
636 |
642 |
637 // --------------------------------------------------------------------------- |
643 // --------------------------------------------------------------------------- |
638 // TWsfMainController::DisconnectL |
644 // TWsfMainController::DisconnectL |