105 CLOG_WRITEF( _L( "OkToExit %b" ), iResultsListDialog->GetOkToExit() ); |
105 CLOG_WRITEF( _L( "OkToExit %b" ), iResultsListDialog->GetOkToExit() ); |
106 delete iResultsListDialog; |
106 delete iResultsListDialog; |
107 iResultsListDialog = NULL; |
107 iResultsListDialog = NULL; |
108 } |
108 } |
109 |
109 |
|
110 DestroyAsyncWaitTrigger(); |
|
111 |
110 delete iWlanDataProv; |
112 delete iWlanDataProv; |
|
113 iWlanDataProv = NULL; |
111 |
114 |
112 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::~CActiveSelectWLanDlgPlugin " ); |
115 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::~CActiveSelectWLanDlgPlugin " ); |
113 } |
116 } |
114 |
117 |
115 |
118 |
131 DestroyWaitDialog(); |
134 DestroyWaitDialog(); |
132 |
135 |
133 CLOG_WRITE( "deleting wlan data provider" ); |
136 CLOG_WRITE( "deleting wlan data provider" ); |
134 delete iWlanDataProv; |
137 delete iWlanDataProv; |
135 iWlanDataProv = NULL; |
138 iWlanDataProv = NULL; |
|
139 |
|
140 DestroyAsyncWaitTrigger(); |
136 |
141 |
137 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DoCancel " ); |
142 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DoCancel " ); |
138 } |
143 } |
139 |
144 |
140 // --------------------------------------------------------- |
145 // --------------------------------------------------------- |
259 iResultsListDialog = CSelectWLANDlg::NewL( iPlugin, |
266 iResultsListDialog = CSelectWLANDlg::NewL( iPlugin, |
260 networkArray ); |
267 networkArray ); |
261 |
268 |
262 iResultsListDialog->ExecuteLD( R_SELECT_WLAN_LIST_QUERY ); |
269 iResultsListDialog->ExecuteLD( R_SELECT_WLAN_LIST_QUERY ); |
263 |
270 |
264 TInt interval = GetRefreshInterval(); |
271 if( iRefreshInterval ) |
265 CLOG_WRITEF( _L( "interval : %d" ), interval ); |
|
266 |
|
267 if( interval ) |
|
268 { |
272 { |
269 StartTimerL( interval ); |
273 StartTimerL( iRefreshInterval ); |
270 } |
274 } |
271 } |
275 } |
272 } |
276 } |
273 else |
277 else |
274 { |
278 { |
319 // --------------------------------------------------------- |
323 // --------------------------------------------------------- |
320 // |
324 // |
321 void CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL() |
325 void CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL() |
322 { |
326 { |
323 CLOG_ENTERFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " ); |
327 CLOG_ENTERFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " ); |
324 |
328 |
325 DestroyWaitDialog(); |
|
326 |
|
327 iWaitDialog = new( ELeave )CAknWaitDialog |
|
328 ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ), ETrue ); |
|
329 iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE ); |
|
330 |
|
331 SetActive(); |
329 SetActive(); |
332 |
330 |
333 #ifdef __WINS__ |
331 #ifdef __WINS__ |
334 TRequestStatus* clientStatus = &iStatus; |
332 TRequestStatus* clientStatus = &iStatus; |
335 User::RequestComplete( clientStatus, KErrNone ); |
333 User::RequestComplete( clientStatus, KErrNone ); |
336 #else |
334 #else |
337 iWlanDataProv->RefreshScanInfo( iStatus ); |
335 iWlanDataProv->RefreshScanInfo( iStatus ); |
338 #endif |
336 #endif |
|
337 |
|
338 // Start wait dialog asynchronously with low priority. |
|
339 // The reason for this is that sometimes WLAN scan results |
|
340 // are already in the cache and returned fast. |
|
341 // When this happens there is no point in displaying wait note. |
|
342 iRefreshInterval = GetRefreshInterval(); |
|
343 CLOG_WRITEF( _L( "interval : %d" ), iRefreshInterval ); |
|
344 |
|
345 if ( !iAsyncWaitTrigger ) |
|
346 { |
|
347 TCallBack cb( StartWaitNoteL, this ); |
|
348 iAsyncWaitTrigger = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityLow ); |
|
349 } |
|
350 iAsyncWaitTrigger->CallBack(); |
339 |
351 |
340 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " ); |
352 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::StartSearchWlanNetworkL " ); |
341 } |
353 } |
342 |
354 |
343 // --------------------------------------------------------- |
355 // --------------------------------------------------------- |
344 // CActiveSelectWLanDlgPlugin::GetRefreshInterval() |
356 // CActiveSelectWLanDlgPlugin::GetRefreshInterval() |
345 // --------------------------------------------------------- |
357 // --------------------------------------------------------- |
346 // |
358 // |
347 TInt CActiveSelectWLanDlgPlugin::GetRefreshInterval() |
359 TInt CActiveSelectWLanDlgPlugin::GetRefreshInterval() |
414 } |
426 } |
415 |
427 |
416 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DestroyResultsListDialog " ); |
428 CLOG_LEAVEFN( "CActiveSelectWLanDlgPlugin::DestroyResultsListDialog " ); |
417 } |
429 } |
418 |
430 |
|
431 // --------------------------------------------------------- |
|
432 // CActiveSelectWLanDlgPlugin::DestroyAsyncWaitTrigger() |
|
433 // --------------------------------------------------------- |
|
434 // |
|
435 void CActiveSelectWLanDlgPlugin::DestroyAsyncWaitTrigger() |
|
436 { |
|
437 if ( iAsyncWaitTrigger ) |
|
438 { |
|
439 iAsyncWaitTrigger->Cancel(); |
|
440 delete iAsyncWaitTrigger; |
|
441 iAsyncWaitTrigger= NULL; |
|
442 } |
|
443 } |
|
444 |
|
445 // --------------------------------------------------------- |
|
446 // CActiveSelectWLanDlgPlugin::StartWaitNoteL() |
|
447 // --------------------------------------------------------- |
|
448 // |
|
449 TInt CActiveSelectWLanDlgPlugin::StartWaitNoteL( TAny* aObject ) |
|
450 { |
|
451 CActiveSelectWLanDlgPlugin* myself = |
|
452 static_cast<CActiveSelectWLanDlgPlugin*>( aObject ); |
|
453 |
|
454 myself->DestroyWaitDialog(); |
|
455 |
|
456 myself->iWaitDialog = new( ELeave )CAknWaitDialog |
|
457 ( REINTERPRET_CAST( CEikDialog**, &(myself->iWaitDialog) ), ETrue ); |
|
458 myself->iWaitDialog->ExecuteLD( R_SEARCHING_WLAN_WAIT_NOTE ); |
|
459 |
|
460 return 0; |
|
461 } |
|
462 |
419 // End of File |
463 // End of File |
420 |
464 |