Revision: 201013 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 17:07:39 +0300
branchRCL_3
changeset 20 858c6c491d0e
parent 18 981afc7d3841
child 21 d9aaeb96a256
Revision: 201013 Kit: 201015
wlanutilities/wlansniffer/aihelper/src/wsfaihelperappui.cpp
wlanutilities/wlansniffer/aiplugin/inc/wsfaiplugin.h
wlanutilities/wlansniffer/aiplugin/src/wsfaicontroller.cpp
wlanutilities/wlansniffer/aiplugin/src/wsfaiplugin.cpp
wlanutilities/wlansniffer/aiplugin/src/wsfaiview.cpp
wlanutilities/wlansniffer/engine/client/inc/wsfeventhandler.h
wlanutilities/wlansniffer/engine/client/src/wsfeventhandler.cpp
wlanutilities/wlansniffer/engine/client/src/wsfsession.cpp
wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontroller.h
wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontrollerif.h
wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewmodel.h
wlanutilities/wlansniffer/mainapplication/src/wsfmaincontroller.cpp
wlanutilities/wlansniffer/mainapplication/src/wsfmainviewcontroller.cpp
wlanutilities/wlansniffer/mainapplication/src/wsfmainviewmodel.cpp
--- a/wlanutilities/wlansniffer/aihelper/src/wsfaihelperappui.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/aihelper/src/wsfaihelperappui.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -54,7 +54,7 @@
 //
 void CWsfAiHelperAppUi::ConstructL()
     {
-    BaseConstructL( EAknEnableSkin | EAknEnableMSK );
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
 
     iIdle = CIdle::NewL( CActive::EPriorityIdle );
     
--- a/wlanutilities/wlansniffer/aiplugin/inc/wsfaiplugin.h	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/aiplugin/inc/wsfaiplugin.h	Wed Apr 14 17:07:39 2010 +0300
@@ -359,6 +359,11 @@
         */
         CWsfActiveWrappers* iActiveWrappers;
         
+        /**
+        * Flag to publish network status text
+        */
+        TBool iPublishNetworkStatusText;
+        
     };
 
 
--- a/wlanutilities/wlansniffer/aiplugin/src/wsfaicontroller.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/aiplugin/src/wsfaicontroller.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -709,9 +709,6 @@
                 }
             }
         }
-        
-    RefreshUiL();
-    
     return success;
     }
 
@@ -1054,6 +1051,12 @@
                 {
                 ConnectL( info, ETrue, EFalse );
                 }
+            else
+                {
+                // User canceled Search Wlans dialog and probably did not 
+                // find anything interesting from the list - request scan
+                iActiveWrappers->RefreshScan();
+                }
 
             break;
             }
--- a/wlanutilities/wlansniffer/aiplugin/src/wsfaiplugin.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/aiplugin/src/wsfaiplugin.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -552,6 +552,7 @@
                 delete iAnimationPeriodic;
                 iAnimationPeriodic = NULL;
                 }
+            iPublishNetworkStatusText = ETrue;
             iAiModel->InitializeRefreshAnimation();
             iAnimationPeriodic = CPeriodic::NewL(
                     CActive::EPriorityStandard );
@@ -593,6 +594,7 @@
         iAnimationPeriodic = NULL;
         }
 
+    iPublishNetworkStatusText = ETrue;
     iAiModel->InitializeConnectingAnimation();
     iAnimationPeriodic = CPeriodic::NewL(
                                     CActive::EPriorityStandard );
@@ -839,7 +841,7 @@
 // ---------------------------------------------------------------------------
 //
 void CWsfAiPlugin::PublishStatusIconL( CArrayFix<TInt>* aPublishIconArray, 
-                                    CEikLabel* /*aText1*/ )
+                                       CEikLabel* aText1 )
     {
     LOG_ENTERFN( "CWsfAiPlugin::PublishStatusIconL" );
     TBool published( EFalse );
@@ -858,6 +860,17 @@
         published = PublishIconL( observer, 
                                   EAiWizardContentStatusIcon,
                                   iconId ) || published;
+        
+        if ( iPublishNetworkStatusText && aText1 )
+            {
+            iPublishNetworkStatusText = EFalse;
+            HBufC *statusText = aText1->Text()->AllocLC();
+            published = PublishText( observer, 
+                                     EAiWizardContentNetworkStatus,
+                                     *statusText ) || published;
+            CleanupStack::PopAndDestroy( statusText );
+            }
+        
         // If we published something then commit, 
         // otherwise cancel transaction
         if ( published )
--- a/wlanutilities/wlansniffer/aiplugin/src/wsfaiview.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/aiplugin/src/wsfaiview.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -466,6 +466,12 @@
     TLex( aString.Mid(
         thirdTabPos+1 , aString.Length() - ( thirdTabPos + 1 ) )
         ).Val( (TInt&) secureicon );
+    
+    // and the label text
+    TPtrC labelText = aString.Mid( firstTabPos+1, 
+                                   secondTabPos - ( firstTabPos + 1 ) );
+    
+    iTextLabel->SetTextL( labelText );
             
     iUpdateStatusIconDeferred = statusIcon;
     
--- a/wlanutilities/wlansniffer/engine/client/inc/wsfeventhandler.h	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/engine/client/inc/wsfeventhandler.h	Wed Apr 14 17:07:39 2010 +0300
@@ -105,6 +105,13 @@
         void BlockNextConnectedEvent();
 
         /**
+        * Resets the flag that prevents the ongoing connecting process 
+        * from notifying the observer
+        * @since S60 5.2
+        */
+        void UnBlockNextConnectedEvent();
+
+        /**
         * Sets the connecting flag. Used by RWsfSession to mark the interval
         * of the connection creation.
         * @since S60 5.0
--- a/wlanutilities/wlansniffer/engine/client/src/wsfeventhandler.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/engine/client/src/wsfeventhandler.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -296,8 +296,10 @@
 //
 void CWsfEventHandler::BlockNextConnectedEvent()
     {
+    LOG_ENTERFN( "CWsfEventHandler::BlockNextConnectedEvent" );
     if ( iConnecting )
         {
+        LOG_WRITE( "iBlockConnectedEvent to true" );
         // set the flag only if we are the ones who are connecting
         iBlockConnectedEvent = ETrue;
         }
@@ -305,11 +307,25 @@
 
 
 // ---------------------------------------------------------------------------
+// CWsfEventHandler::UnBlockNextConnectedEvent
+// ---------------------------------------------------------------------------
+//
+void CWsfEventHandler::UnBlockNextConnectedEvent()
+    {
+    LOG_ENTERFN( "CWsfEventHandler::UnBlockNextConnectedEvent" );
+    LOG_WRITE( "iBlockConnectedEvent to false" );
+    iBlockConnectedEvent = EFalse;
+    }
+
+
+// ---------------------------------------------------------------------------
 // CWsfEventHandler::SetConnecting
 // ---------------------------------------------------------------------------
 //
 void CWsfEventHandler::SetConnecting( TBool aConnecting )
     {
+    LOG_ENTERFN( "CWsfEventHandler::SetConnecting" );
+    LOG_WRITEF( "iConnecting=%d, aConnecting=%d", iConnecting, aConnecting );
     iConnecting = aConnecting;
     }
     
--- a/wlanutilities/wlansniffer/engine/client/src/wsfsession.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/engine/client/src/wsfsession.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -486,6 +486,7 @@
     LOG_WRITEF( "IAP id = %d", aIapId );
 
     // mark the beginning of the connection process
+    iEventHandler->UnBlockNextConnectedEvent();
     iEventHandler->SetConnecting( ETrue );
 
     TInt res( KErrNone );
@@ -540,6 +541,7 @@
     LOG_WRITEF( "IAP id = %d", aIapId );
 
     // mark the beginning of the connection process
+    iEventHandler->UnBlockNextConnectedEvent();
     iEventHandler->SetConnecting( ETrue );
 
     SendReceive( ESnifferCmdConnect, TIpcArgs( &aPckg, aIapId, aPersistence ), 
--- a/wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontroller.h	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontroller.h	Wed Apr 14 17:07:39 2010 +0300
@@ -84,6 +84,14 @@
         void UpdateWlanListL( CWsfWlanInfoArray* aWlanArray );
 
         /**
+         * Updates WLAN list with values passed as parameter
+         * when the main view is on the background
+         * @param aWlanArray list of WLAN
+         * @since S60 5.2
+         */
+        void UpdateWlanListInBackgroundL ( CWsfWlanInfoArray* aWlanArray );
+
+        /**
          * Request to refresh the mainview
          * @since S60 5.0
          */
--- a/wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontrollerif.h	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewcontrollerif.h	Wed Apr 14 17:07:39 2010 +0300
@@ -42,6 +42,15 @@
          * @since S60 5.0
          */
         virtual void UpdateWlanListL( CWsfWlanInfoArray* aWlanArray ) = 0;
+
+        /**
+         * Updates WLAN list with values passed as parameter
+         * when the main view is in the background
+         * @param aWlanArray list of WLAN
+         * @since S60 5.2
+         */
+        virtual void UpdateWlanListInBackgroundL(
+                CWsfWlanInfoArray* aWlanArray ) = 0;
     
         /**
          * Request to refresh the mainview
--- a/wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewmodel.h	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/mainapplication/inc/wsfmainviewmodel.h	Wed Apr 14 17:07:39 2010 +0300
@@ -80,10 +80,9 @@
 
         /**
         * Creates array for the listbox.
-        * @param Array of WLAN that will be formatted.
-        * @return Formatted WLAN list 
+        * @param Array of WLAN that will be formatted. 
         */
-        CDesCArrayFlat* FormatWlanListL( CWsfWlanInfoArray* aWlanList );
+        void FormatWlanListL( CWsfWlanInfoArray* aWlanList );
         
         /*
         * Returns WLAN list that has already formatted
--- a/wlanutilities/wlansniffer/mainapplication/src/wsfmaincontroller.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/mainapplication/src/wsfmaincontroller.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -87,6 +87,7 @@
         case EDetailsViewId:
             {
             _ASSERTD( iDetailsView );
+            iMainView->UpdateWlanListInBackgroundL( array );
             iDetailsView->WlanListChangedL( array );
             break;           
             }
--- a/wlanutilities/wlansniffer/mainapplication/src/wsfmainviewcontroller.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/mainapplication/src/wsfmainviewcontroller.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -64,7 +64,8 @@
     {
     LOG_ENTERFN( "TWsfMainViewController::UpdateHotSpotsL" );   
     // Format WLAN list which was passed as a parameter
-    CDesCArray* formattedList = iModel->FormatWlanListL( aWlanList );
+    iModel->FormatWlanListL( aWlanList );
+    CDesCArray* formattedList = iModel->GetWlanList();
 
     if ( iContainer )
         {        
@@ -106,6 +107,16 @@
     UpdateNaviPaneL();
     }
 
+// ---------------------------------------------------------------------------
+// TWsfMainViewController::UpdateWlanListInBackgroundL
+// ---------------------------------------------------------------------------
+//
+void TWsfMainViewController::UpdateWlanListInBackgroundL(
+        CWsfWlanInfoArray* aWlanArray )
+    {
+    LOG_ENTERFN( "TWsfMainViewController::UpdateWlanListInBackgroundL" );   
+    iModel->FormatWlanListL( aWlanArray );
+    }
 
 // ---------------------------------------------------------------------------
 // TWsfMainViewController::RefreshL
--- a/wlanutilities/wlansniffer/mainapplication/src/wsfmainviewmodel.cpp	Wed Mar 31 23:17:49 2010 +0300
+++ b/wlanutilities/wlansniffer/mainapplication/src/wsfmainviewmodel.cpp	Wed Apr 14 17:07:39 2010 +0300
@@ -205,8 +205,7 @@
 // CWsfMainViewModel::FormatWlanListL
 // ---------------------------------------------------------------------------
 //
-CDesCArrayFlat* CWsfMainViewModel::FormatWlanListL( 
-                                            CWsfWlanInfoArray* aWlanList )
+void CWsfMainViewModel::FormatWlanListL( CWsfWlanInfoArray* aWlanList )
     {
     LOG_ENTERFN( "CWsfMainViewModel::FormatWlanListL" );
     //Function expects that items in list are already in proper order
@@ -244,7 +243,6 @@
     iFormattedWlanList->AppendL( ptr );
 
     CleanupStack::PopAndDestroy ( item );
-    return iFormattedWlanList;
     }
 
 // ---------------------------------------------------------------------------