|
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 * Class declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __SMTPCOPYMOVEOP_H__ |
|
20 #define __SMTPCOPYMOVEOP_H__ |
|
21 |
|
22 #include <ImumInternalApi.h> // CImumInternalApi |
|
23 |
|
24 #include "ImumOnlineOperation.h" |
|
25 #include "SelectionOperationBase.h" |
|
26 #include <smtpset.h> |
|
27 class CMsvEmailConnectionProgressProvider; |
|
28 class CMtmStore; |
|
29 |
|
30 /** |
|
31 * SMTP Sending operation |
|
32 */ |
|
33 class CSmtpCopyMoveOp : |
|
34 public CImumOnlineOperation |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * |
|
39 */ |
|
40 static CSmtpCopyMoveOp* NewL( |
|
41 CImumInternalApi& aMailboxApi, |
|
42 TRequestStatus& aObserverRequestStatus, |
|
43 MMsvProgressReporter& aReporter, |
|
44 TMsvId aTarget, |
|
45 const CMsvEntrySelection& aSel, |
|
46 TBool aMoving=EFalse ); |
|
47 |
|
48 /** |
|
49 * |
|
50 */ |
|
51 virtual ~CSmtpCopyMoveOp(); |
|
52 |
|
53 /** |
|
54 * |
|
55 */ |
|
56 virtual const TDesC8& ProgressL(); |
|
57 |
|
58 /** |
|
59 * |
|
60 */ |
|
61 virtual const TDesC8& GetErrorProgressL( TInt aError ); |
|
62 |
|
63 protected: |
|
64 |
|
65 /** |
|
66 * From CActive |
|
67 */ |
|
68 virtual void DoRunL(); |
|
69 |
|
70 private: |
|
71 /** |
|
72 * |
|
73 */ |
|
74 CSmtpCopyMoveOp( |
|
75 CImumInternalApi& aMailboxApi, |
|
76 TRequestStatus& aObserverRequestStatus, |
|
77 MMsvProgressReporter& aReporter, |
|
78 TMsvId aTarget, |
|
79 TBool aMoving ); |
|
80 |
|
81 /** |
|
82 * |
|
83 */ |
|
84 void ConstructL( const CMsvEntrySelection& aSel ); |
|
85 |
|
86 /** |
|
87 * |
|
88 */ |
|
89 TBool ValidateL( CImumInSettingsData& aSettings ); |
|
90 |
|
91 /** |
|
92 * Prepares the operation to be ready for the sending |
|
93 * @since S60 3.0 |
|
94 */ |
|
95 void InitiateSendingOperationL(); |
|
96 |
|
97 /** |
|
98 * |
|
99 * @since S60 3.0 |
|
100 */ |
|
101 TInt GetProgressErrorL(); |
|
102 |
|
103 /** |
|
104 * |
|
105 * @since S60 3.0 |
|
106 */ |
|
107 TBool ContinueSendingL(); |
|
108 |
|
109 private: // Data |
|
110 CMsvEntry* iEntry; |
|
111 TMsvId iTarget; |
|
112 CMsvEntrySelection* iSelection; |
|
113 CMsvEmailConnectionProgressProvider* iProgProvider; |
|
114 TPckgBuf<TImSmtpProgress> iProgress; |
|
115 TBool iMoving; |
|
116 TBool iValidIap; |
|
117 TInt iLoginRetryCounter; |
|
118 }; |
|
119 |
|
120 |
|
121 #endif |