|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Operation to copy or move messages |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __MSVPOP3COPYMOVEOPERATION_H__ |
|
20 #define __MSVPOP3COPYMOVEOPERATION_H__ |
|
21 |
|
22 #include <pop3set.h> |
|
23 #include <MsvPrgReporter.h> |
|
24 #include "ImumDiskSpaceObserverOperation.h" |
|
25 |
|
26 #include "ImumMtmLogging.h" |
|
27 |
|
28 class CMsvEmailConnectionProgressProvider; |
|
29 |
|
30 /** |
|
31 * CMsvPop3CopyMoveOperation |
|
32 * Operation to copy or move messages, supporting complete and incomplete messages. |
|
33 */ |
|
34 class CMsvPop3CopyMoveOperation : |
|
35 public CImumDiskSpaceObserverOperation |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * |
|
41 */ |
|
42 static CMsvPop3CopyMoveOperation* NewL( |
|
43 CImumInternalApi& aMailboxApi, |
|
44 TRequestStatus& aObserverRequestStatus, |
|
45 MMsvProgressReporter& aReporter, |
|
46 TMsvId aService, TMsvId aTarget, |
|
47 const CMsvEntrySelection& aSel, |
|
48 TBool aMoveMsgs=EFalse ); |
|
49 |
|
50 /** |
|
51 * |
|
52 */ |
|
53 virtual ~CMsvPop3CopyMoveOperation(); |
|
54 |
|
55 /** |
|
56 * |
|
57 */ |
|
58 virtual const TDesC8& GetErrorProgressL( TInt aError ); |
|
59 |
|
60 protected: |
|
61 |
|
62 /** |
|
63 * From CActive |
|
64 */ |
|
65 virtual void DoRunL(); |
|
66 |
|
67 /** |
|
68 * |
|
69 */ |
|
70 void SortMessageSelectionL( const CMsvEntrySelection& aSel ); |
|
71 |
|
72 /** |
|
73 * |
|
74 */ |
|
75 void DoLocalCopyMoveL(); |
|
76 |
|
77 /** |
|
78 * |
|
79 */ |
|
80 void DoRemoteFetchL(); |
|
81 private: |
|
82 |
|
83 /** |
|
84 * |
|
85 */ |
|
86 CMsvPop3CopyMoveOperation( |
|
87 CImumInternalApi& aMailboxApi, |
|
88 TRequestStatus& aObserverRequestStatus, |
|
89 MMsvProgressReporter& aReporter, |
|
90 TMsvId aService, |
|
91 TMsvId aTarget, |
|
92 TBool aMoveMsgs ); |
|
93 |
|
94 /** |
|
95 * |
|
96 */ |
|
97 void ConstructL( const CMsvEntrySelection& aSel ); |
|
98 |
|
99 private: // Data |
|
100 enum TState { EIdle, ELocalMsgs, ERemoteMsgs }; |
|
101 TState iState; |
|
102 TBool iMoving; |
|
103 TMsvId iTarget; |
|
104 CMsvEntrySelection* iLocalSel; // Complete messages |
|
105 CMsvEntrySelection* iRemoteSel; // Incomplete messages to be fetched. |
|
106 TPckgBuf<TPop3Progress> iErrorProgress; |
|
107 }; |
|
108 |
|
109 #endif |
|
110 |
|
111 // End of File |