|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CIMAPCOMPOUNDDISCONNECT_H__ |
|
17 #define __CIMAPCOMPOUNDDISCONNECT_H__ |
|
18 |
|
19 #include "cimapcompoundbase.h" |
|
20 |
|
21 // forward declaration |
|
22 class CImapSessionManager; |
|
23 class CImapCompoundSyncService; |
|
24 class CImapMailStore; |
|
25 class CImapOfflineControl; |
|
26 |
|
27 /** |
|
28 Compound operation object for disconnecting all currently connected |
|
29 sessions. |
|
30 |
|
31 @internalTechnology |
|
32 @prototype |
|
33 */ |
|
34 class CImapCompoundDisconnect : public CImapCompoundBase |
|
35 { |
|
36 |
|
37 public: |
|
38 ~CImapCompoundDisconnect(); |
|
39 |
|
40 static CImapCompoundDisconnect* NewL( CImapSyncManager& aSyncManager, |
|
41 CMsvServerEntry& aServerEntry, |
|
42 CImapSettings& aImapSettings, |
|
43 CImapSessionManager& aSessionManager, |
|
44 CImapMailStore& aImapMailStore, |
|
45 const RPointerArray<CImapSession>& aSessionList, |
|
46 CImapOfflineControl& aImapOfflineControl, |
|
47 TBool aDoDeletes ); |
|
48 |
|
49 virtual void StartOperation(TRequestStatus& aStatus, CImapSession& aSession); |
|
50 virtual void Progress( TImap4CompoundProgress& aCompoundProgress ); |
|
51 |
|
52 // Support for Bearer Mobility |
|
53 virtual void ResumeOperationL(TRequestStatus& aStatus, CImapSession& aSession); |
|
54 |
|
55 private: |
|
56 CImapCompoundDisconnect( CImapSyncManager& aSyncManager, |
|
57 CMsvServerEntry& aServerEntry, |
|
58 CImapSettings& aImapSettings, |
|
59 CImapSessionManager& aSessionManager, |
|
60 CImapMailStore& aImapMailStore, |
|
61 const RPointerArray<CImapSession>& aSessionList, |
|
62 CImapOfflineControl& aImapOfflineControl, |
|
63 TBool aDoDeletes ); |
|
64 |
|
65 void ConstructL(); |
|
66 |
|
67 TBool DoRunLoopL(); |
|
68 void DoCancel(); |
|
69 |
|
70 virtual TInt ProcessNegativeServerResponse(); |
|
71 |
|
72 private: |
|
73 CImapSessionManager& iSessionManager; |
|
74 const RPointerArray<CImapSession>& iSessionList; |
|
75 CImapCompoundSyncService* iCompoundSync; |
|
76 CImapMailStore& iImapMailStore; |
|
77 CImapOfflineControl& iImapOfflineControl; |
|
78 TBool iDoDeletes; |
|
79 }; |
|
80 |
|
81 #endif // __CIMAPCOMPOUNDDISCONNECT_H__ |