140 // |
140 // |
141 void CIpsPlgImap4Plugin::RefreshNowL( |
141 void CIpsPlgImap4Plugin::RefreshNowL( |
142 const TFSMailMsgId& aMailBoxId, |
142 const TFSMailMsgId& aMailBoxId, |
143 MFSMailRequestObserver& aOperationObserver, |
143 MFSMailRequestObserver& aOperationObserver, |
144 TInt aRequestId, |
144 TInt aRequestId, |
145 const TBool /*aSilentConnection*/ ) |
145 const TBool aSilentConnection ) |
146 { |
146 { |
147 FUNC_LOG; |
147 FUNC_LOG; |
148 |
148 |
149 TMsvId service = aMailBoxId.Id(); |
149 TMsvId service = aMailBoxId.Id(); |
150 |
150 |
151 CIpsPlgSingleOpWatcher* watcher = CIpsPlgSingleOpWatcher::NewL( *this ); |
151 CIpsPlgSingleOpWatcher* watcher = CIpsPlgSingleOpWatcher::NewL( *this ); |
152 CleanupStack::PushL( watcher ); |
152 CleanupStack::PushL( watcher ); |
153 |
153 |
154 // <qmail> priority parameter has been removed |
154 // <qmail> priority parameter has been removed |
|
155 // <qmail> silent connection parameter added |
155 CIpsPlgBaseOperation* op = CIpsPlgImap4ConnectOp::NewL( |
156 CIpsPlgBaseOperation* op = CIpsPlgImap4ConnectOp::NewL( |
156 *iSession, |
157 *iSession, |
157 watcher->iStatus, |
158 watcher->iStatus, |
158 service, |
159 service, |
159 ActivityTimerL( aMailBoxId ), |
160 ActivityTimerL( aMailBoxId ), |
160 aMailBoxId, |
161 aMailBoxId, |
161 &aOperationObserver, |
162 &aOperationObserver, |
162 aRequestId, |
163 aRequestId, |
163 iEventHandler ); |
164 iEventHandler, |
164 |
165 EFalse, |
165 watcher->SetOperation( op ); |
166 aSilentConnection ); |
|
167 |
|
168 watcher->SetOperation( op ); // watcher takes ownership, |
|
169 // no PushL needed before AppendL |
166 iOperations.AppendL( watcher ); |
170 iOperations.AppendL( watcher ); |
167 CleanupStack::Pop( watcher ); |
171 CleanupStack::Pop( watcher ); |
168 |
172 |
169 // send part of refresh |
173 // send part of refresh |
170 EmptyOutboxL( aMailBoxId ); |
174 EmptyOutboxL( aMailBoxId ); |
307 &aObserver, |
311 &aObserver, |
308 aRequestId, |
312 aRequestId, |
309 iEventHandler, |
313 iEventHandler, |
310 EFalse ); // do not filter mail selection |
314 EFalse ); // do not filter mail selection |
311 |
315 |
312 watcher->SetOperation( op ); |
316 watcher->SetOperation( op ); // watcher takes ownership, |
|
317 // no PushL needed before AppendL |
313 CleanupStack::PopAndDestroy( sel ); |
318 CleanupStack::PopAndDestroy( sel ); |
314 iOperations.AppendL( watcher ); |
319 iOperations.AppendL( watcher ); |
315 CleanupStack::Pop( watcher ); |
320 CleanupStack::Pop( watcher ); |
316 |
321 |
317 } |
322 } |
370 *sel, |
375 *sel, |
371 aMailBoxId, |
376 aMailBoxId, |
372 NULL, // no observer, async not supported |
377 NULL, // no observer, async not supported |
373 0 ); // async not supported |
378 0 ); // async not supported |
374 |
379 |
375 watcher->SetOperation( op ); |
380 watcher->SetOperation( op ); // watcher takes ownership, |
|
381 // no PushL needed before AppendL |
376 CleanupStack::PopAndDestroy( sel ); |
382 CleanupStack::PopAndDestroy( sel ); |
377 iOperations.AppendL( watcher ); |
383 iOperations.AppendL( watcher ); |
378 CleanupStack::Pop( watcher ); |
384 CleanupStack::Pop( watcher ); |
379 } |
385 } |
380 else |
386 else |
443 *sel, |
449 *sel, |
444 aMailBoxId, |
450 aMailBoxId, |
445 &aOperationObserver, // async not supported |
451 &aOperationObserver, // async not supported |
446 0 ); // async not supported |
452 0 ); // async not supported |
447 |
453 |
448 watcher->SetOperation( op ); |
454 watcher->SetOperation( op ); // watcher takes ownership, |
|
455 // no PushL needed before AppendL |
449 CleanupStack::PopAndDestroy( sel ); |
456 CleanupStack::PopAndDestroy( sel ); |
450 iOperations.AppendL( watcher ); |
457 iOperations.AppendL( watcher ); |
451 CleanupStack::Pop( watcher ); |
458 CleanupStack::Pop( watcher ); |
452 } |
459 } |
453 else |
460 else |
534 sel, // ownership is transferred |
541 sel, // ownership is transferred |
535 aMailBoxId, |
542 aMailBoxId, |
536 &aOperationObserver, |
543 &aOperationObserver, |
537 aRequestId ); |
544 aRequestId ); |
538 |
545 |
539 watcher->SetOperation( op ); |
546 watcher->SetOperation( op ); // watcher takes ownership, |
|
547 // no PushL needed before next line |
540 iOperations.AppendL( watcher ); |
548 iOperations.AppendL( watcher ); |
541 // <qmail> |
549 // <qmail> |
542 CleanupStack::Pop( sel ); |
550 CleanupStack::Pop( sel ); |
543 // </qmail> |
551 // </qmail> |
544 CleanupStack::Pop( watcher ); |
552 CleanupStack::Pop( watcher ); |
610 NULL, // no operation observer |
618 NULL, // no operation observer |
611 0, // no use for requestId |
619 0, // no use for requestId |
612 iEventHandler, |
620 iEventHandler, |
613 EFalse ); // do not block entry changed and created events |
621 EFalse ); // do not block entry changed and created events |
614 |
622 |
615 watcher->SetOperation( op ); |
623 watcher->SetOperation( op ); // watcher takes ownership, |
|
624 // no PushL needed before AppendL |
616 CleanupStack::PopAndDestroy( sel ); |
625 CleanupStack::PopAndDestroy( sel ); |
617 iOperations.AppendL( watcher ); |
626 iOperations.AppendL( watcher ); |
618 CleanupStack::Pop( watcher ); |
627 CleanupStack::Pop( watcher ); |
619 |
628 |
620 iEventHandler->SetNewPropertyEvent( |
629 iEventHandler->SetNewPropertyEvent( |