27 // CIpsPlgImap4ConnectOp::NewL() |
27 // CIpsPlgImap4ConnectOp::NewL() |
28 // ---------------------------------------------------------------------------- |
28 // ---------------------------------------------------------------------------- |
29 // <qmail> priority parameter has been removed |
29 // <qmail> priority parameter has been removed |
30 // <qmail> MFSMailRequestObserver& changed it to pointer |
30 // <qmail> MFSMailRequestObserver& changed it to pointer |
31 // <qmail> aSignallingAllowed parameter has been removed |
31 // <qmail> aSignallingAllowed parameter has been removed |
|
32 // <qmail> silent connection parameter added |
32 CIpsPlgImap4ConnectOp* CIpsPlgImap4ConnectOp::NewL( |
33 CIpsPlgImap4ConnectOp* CIpsPlgImap4ConnectOp::NewL( |
33 CMsvSession& aMsvSession, |
34 CMsvSession& aMsvSession, |
34 TRequestStatus& aObserverRequestStatus, |
35 TRequestStatus& aObserverRequestStatus, |
35 TMsvId aService, |
36 TMsvId aService, |
36 CIpsPlgTimerOperation& aActivityTimer, |
37 CIpsPlgTimerOperation& aActivityTimer, |
37 TFSMailMsgId aFSMailBoxId, |
38 TFSMailMsgId aFSMailBoxId, |
38 MFSMailRequestObserver* aFSOperationObserver, |
39 MFSMailRequestObserver* aFSOperationObserver, |
39 TInt aFSRequestId, |
40 TInt aFSRequestId, |
40 CIpsPlgEventHandler* aEventHandler, |
41 CIpsPlgEventHandler* aEventHandler, |
41 TBool aDoPlainConnect ) |
42 TBool aDoPlainConnect, |
|
43 TBool aSilentConnection) |
42 { |
44 { |
43 FUNC_LOG; |
45 FUNC_LOG; |
44 CIpsPlgImap4ConnectOp* self = new (ELeave) CIpsPlgImap4ConnectOp( |
46 CIpsPlgImap4ConnectOp* self = new (ELeave) CIpsPlgImap4ConnectOp( |
45 aMsvSession, |
47 aMsvSession, |
46 aObserverRequestStatus, |
48 aObserverRequestStatus, |
62 // CIpsPlgImap4ConnectOp::CIpsPlgImap4ConnectOp() |
65 // CIpsPlgImap4ConnectOp::CIpsPlgImap4ConnectOp() |
63 // ---------------------------------------------------------------------------- |
66 // ---------------------------------------------------------------------------- |
64 // <qmail> priority parameter has been removed |
67 // <qmail> priority parameter has been removed |
65 // <qmail> MFSMailRequestObserver& changed it to pointer |
68 // <qmail> MFSMailRequestObserver& changed it to pointer |
66 // <qmail> aSignallingAllowed parameter has been removed |
69 // <qmail> aSignallingAllowed parameter has been removed |
|
70 // <qmail> silent connection parameter added |
67 CIpsPlgImap4ConnectOp::CIpsPlgImap4ConnectOp( |
71 CIpsPlgImap4ConnectOp::CIpsPlgImap4ConnectOp( |
68 CMsvSession& aMsvSession, |
72 CMsvSession& aMsvSession, |
69 TRequestStatus& aObserverRequestStatus, |
73 TRequestStatus& aObserverRequestStatus, |
70 TMsvId aService, |
74 TMsvId aService, |
71 CIpsPlgTimerOperation& aActivityTimer, |
75 CIpsPlgTimerOperation& aActivityTimer, |
72 TFSMailMsgId aFSMailBoxId, |
76 TFSMailMsgId aFSMailBoxId, |
73 MFSMailRequestObserver* aFSOperationObserver, |
77 MFSMailRequestObserver* aFSOperationObserver, |
74 TInt aFSRequestId, |
78 TInt aFSRequestId, |
75 TBool aDoPlainConnect, |
79 TBool aDoPlainConnect, |
76 CIpsPlgEventHandler* aEventHandler) |
80 CIpsPlgEventHandler* aEventHandler, |
|
81 TBool aSilentConnection) |
77 : |
82 : |
78 CIpsPlgOnlineOperation( |
83 CIpsPlgOnlineOperation( |
79 aMsvSession, |
84 aMsvSession, |
80 aObserverRequestStatus, |
85 aObserverRequestStatus, |
81 aActivityTimer, |
86 aActivityTimer, |
339 if ( iDoPlainConnect && !Connected() ) |
345 if ( iDoPlainConnect && !Connected() ) |
340 { |
346 { |
341 TBuf8<1> parameter; |
347 TBuf8<1> parameter; |
342 NM_COMMENT("CIpsPlgImap4ConnectOp: do plain connect"); |
348 NM_COMMENT("CIpsPlgImap4ConnectOp: do plain connect"); |
343 // connect and synchronise starts background sync or idle |
349 // connect and synchronise starts background sync or idle |
|
350 // select connection type based on iSilentConnection |
|
351 // NOTE: Cannot be implemented yet, because MTM support is not released yet |
344 iSubOperation = iBaseMtm->InvokeAsyncFunctionL( |
352 iSubOperation = iBaseMtm->InvokeAsyncFunctionL( |
345 KIMAP4MTMConnect, *iSelection, parameter, iStatus); |
353 KIMAP4MTMConnect, *iSelection, parameter, iStatus); |
346 } |
354 } |
347 else if ( Connected() ) |
355 else if ( Connected() ) |
348 { |
356 { |
356 else |
364 else |
357 { |
365 { |
358 // the used command requires an observer to be given even though we're not using it |
366 // the used command requires an observer to be given even though we're not using it |
359 NM_COMMENT("CIpsPlgImap4ConnectOp: connect and sync"); |
367 NM_COMMENT("CIpsPlgImap4ConnectOp: connect and sync"); |
360 TPckg<MMsvImapConnectionObserver*> parameter( NULL ); |
368 TPckg<MMsvImapConnectionObserver*> parameter( NULL ); |
|
369 // select connection type based on iSilentConnection |
|
370 // NOTE: Cannot be implemented yet, because MTM support is not released yet |
361 iSubOperation = iBaseMtm->InvokeAsyncFunctionL( |
371 iSubOperation = iBaseMtm->InvokeAsyncFunctionL( |
362 KIMAP4MTMConnectAndSyncCompleteAfterFullSync, |
372 KIMAP4MTMConnectAndSyncCompleteAfterFullSync, |
363 *iSelection, parameter, iStatus ); |
373 *iSelection, parameter, iStatus ); |
364 } |
374 } |
365 SignalSyncStarted(); |
375 SignalSyncStarted(); |