connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifSrc/ActiveSelectWLanDlgPlugin.cpp Tue Aug 31 15:35:44 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
#include <AknWaitDialog.h>
-#include <ConnUiUtilsNotif.rsg>
+#include <connuiutilsnotif.rsg>
#include <AknGlobalNote.h>
#include <StringLoader.h>
#include <centralrepository.h>
@@ -84,7 +84,11 @@
CActiveSelectWLanDlgPlugin::CActiveSelectWLanDlgPlugin(
CSelectWLanDlgPlugin* aPlugin )
: CActive( EPriorityStandard ),
- iPlugin( aPlugin )
+ iPlugin( aPlugin ),
+ iWlanDataProv( NULL ),
+ iPeriodic( NULL),
+ iResultsListDialog( NULL),
+ iWaitDialog( NULL )
{
}
@@ -107,10 +111,7 @@
iResultsListDialog = NULL;
}
- DestroyAsyncWaitTrigger();
-
delete iWlanDataProv;
- iWlanDataProv = NULL;
CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::~CActiveSelectWLanDlgPlugin " );
}
@@ -137,8 +138,6 @@
delete iWlanDataProv;
iWlanDataProv = NULL;
- DestroyAsyncWaitTrigger();
-
CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DoCancel " );
}
@@ -233,8 +232,6 @@
{
CLOG_ENTERFN( "CActiveSelectWLanDlgPlugin::RunL " );
- DestroyAsyncWaitTrigger();
-
if ( iWaitDialog )
{
iWaitDialog->ProcessFinishedL();
@@ -268,9 +265,12 @@
iResultsListDialog->ExecuteLD( R_SELECT_WLAN_LIST_QUERY );
- if( iRefreshInterval )
+ TInt interval = GetRefreshInterval();
+ CLOG_WRITEF( _L( "interval : %d" ), interval );
+
+ if( interval )
{
- StartTimerL( iRefreshInterval );
+ StartTimerL( interval );
}
}
}
@@ -325,7 +325,13 @@
void CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL()
{
CLOG_ENTERFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " );
+
+ DestroyWaitDialog();
+ iWaitDialog = new( ELeave )CAknWaitDialog
+ ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ), ETrue );
+ iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE );
+
SetActive();
#ifdef __WINS__
@@ -334,24 +340,10 @@
#else
iWlanDataProv->RefreshScanInfo( iStatus );
#endif
-
- // Start wait dialog asynchronously with low priority.
- // The reason for this is that sometimes WLAN scan results
- // are already in the cache and returned fast.
- // When this happens there is no point in displaying wait note.
- iRefreshInterval = GetRefreshInterval();
- CLOG_WRITEF( _L( "interval : %d" ), iRefreshInterval );
-
- if ( !iAsyncWaitTrigger )
- {
- TCallBack cb( StartWaitNoteL, this );
- iAsyncWaitTrigger = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityLow );
- }
- iAsyncWaitTrigger->CallBack();
CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " );
}
-
+
// ---------------------------------------------------------
// CActiveSelectWLanDlgPlugin::GetRefreshInterval()
// ---------------------------------------------------------
@@ -428,37 +420,5 @@
CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DestroyResultsListDialog " );
}
-// ---------------------------------------------------------
-// CActiveSelectWLanDlgPlugin::DestroyAsyncWaitTrigger()
-// ---------------------------------------------------------
-//
-void CActiveSelectWLanDlgPlugin::DestroyAsyncWaitTrigger()
- {
- if ( iAsyncWaitTrigger )
- {
- iAsyncWaitTrigger->Cancel();
- delete iAsyncWaitTrigger;
- iAsyncWaitTrigger= NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CActiveSelectWLanDlgPlugin::StartWaitNoteL()
-// ---------------------------------------------------------
-//
-TInt CActiveSelectWLanDlgPlugin::StartWaitNoteL( TAny* aObject )
- {
- CActiveSelectWLanDlgPlugin* myself =
- static_cast<CActiveSelectWLanDlgPlugin*>( aObject );
-
- myself->DestroyWaitDialog();
-
- myself->iWaitDialog = new( ELeave )CAknWaitDialog
- ( REINTERPRET_CAST( CEikDialog**, &(myself->iWaitDialog) ), ETrue );
- myself->iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE );
-
- return 0;
- }
-
// End of File