|
1 /* |
|
2 * Copyright (c) 2007-2008 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: POP3 fetch message(s) operation |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef IPSPLGPOP3FETCHOPERATION_H |
|
19 #define IPSPLGPOP3FETCHOPERATION_H |
|
20 |
|
21 #include "ipsplgonlineoperation.h" |
|
22 |
|
23 //class CMsvEmailConnectionProgressProvider; |
|
24 |
|
25 /** |
|
26 * CIpsPlgPop3FetchOperation |
|
27 * Fetch message(s) operation, using client MTM Get Mail API. |
|
28 */ |
|
29 class CIpsPlgPop3FetchOperation : |
|
30 public CIpsPlgOnlineOperation |
|
31 { |
|
32 public: |
|
33 |
|
34 /** |
|
35 * |
|
36 */ |
|
37 static CIpsPlgPop3FetchOperation* NewL( |
|
38 CMsvSession& aMsvSession, |
|
39 TRequestStatus& aObserverRequestStatus, |
|
40 TInt aFunctionId, |
|
41 TMsvId aService, |
|
42 CIpsPlgTimerOperation& aActivityTimer, |
|
43 const TImPop3GetMailInfo& aGetMailInfo, |
|
44 const CMsvEntrySelection& aSel, |
|
45 TFSMailMsgId aFSMailBoxId, |
|
46 MFSMailRequestObserver& aFSOperationObserver, |
|
47 TInt aFSRequestId, |
|
48 CIpsPlgEventHandler* aEventHandler ); |
|
49 |
|
50 |
|
51 /** |
|
52 * |
|
53 */ |
|
54 virtual ~CIpsPlgPop3FetchOperation(); |
|
55 |
|
56 /** |
|
57 * |
|
58 */ |
|
59 virtual const TDesC8& ProgressL(); |
|
60 |
|
61 /** |
|
62 * |
|
63 */ |
|
64 virtual const TDesC8& GetErrorProgressL( TInt aError ); |
|
65 |
|
66 /** |
|
67 * |
|
68 */ |
|
69 virtual TFSProgress GetFSProgressL() const; |
|
70 |
|
71 protected: |
|
72 |
|
73 /** |
|
74 * |
|
75 */ |
|
76 CIpsPlgPop3FetchOperation( |
|
77 CMsvSession& aMsvSession, |
|
78 TRequestStatus& aObserverRequestStatus, |
|
79 TInt aFunctionId, |
|
80 TMsvId aService, |
|
81 CIpsPlgTimerOperation& aActivityTimer, |
|
82 const TImPop3GetMailInfo& aGetMailInfo, |
|
83 TFSMailMsgId aFSMailBoxId, |
|
84 MFSMailRequestObserver& aFSOperationObserver, |
|
85 TInt aFSRequestId, |
|
86 CIpsPlgEventHandler* aEventHandler); |
|
87 |
|
88 |
|
89 /** |
|
90 * |
|
91 */ |
|
92 void ConstructL( const CMsvEntrySelection& aSel ); |
|
93 |
|
94 /** |
|
95 * From CActive |
|
96 */ |
|
97 virtual void RunL(); |
|
98 |
|
99 /** |
|
100 * From CActive |
|
101 */ |
|
102 virtual void DoCancel(); |
|
103 |
|
104 /** |
|
105 * From CActive |
|
106 */ |
|
107 virtual void DoRunL(); |
|
108 |
|
109 /** |
|
110 * |
|
111 */ |
|
112 void DoConnectL(); |
|
113 |
|
114 /** |
|
115 * |
|
116 */ |
|
117 void DoFetchL(); |
|
118 |
|
119 /** |
|
120 * |
|
121 */ |
|
122 void DoDisconnectL(); |
|
123 |
|
124 protected: |
|
125 |
|
126 enum TFetchState { |
|
127 EStateIdle, |
|
128 EStateConnecting, |
|
129 EStateClearCompleteFlag, |
|
130 EStateFetching, |
|
131 EStateDisconnecting }; |
|
132 TFetchState iState; |
|
133 |
|
134 protected: |
|
135 |
|
136 TDesC8* iFetchErrorProgress; |
|
137 TInt iFunctionId; |
|
138 TImPop3GetMailInfo iGetMailInfo; |
|
139 TPckgBuf<TPop3Progress> iProgressBuf; |
|
140 CMsvEntrySelection* iSelection; |
|
141 CIpsPlgEventHandler* iEventHandler; |
|
142 // For clear complete flag operation |
|
143 CMsvEntry* iEntry; |
|
144 TInt iEntryIndex; |
|
145 }; |
|
146 |
|
147 |
|
148 #endif //IPSPLGPOP3FETCHOPERATION_H |
|
149 |
|
150 // End of File |