author | Simon Howkins <simonh@symbian.org> |
Thu, 25 Nov 2010 12:13:04 +0000 | |
branch | RCL_3 |
changeset 83 | 31a5fbf5db1d |
parent 64 | 3533d4323edc |
permissions | -rw-r--r-- |
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: IMAP4 populate messages operation |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
64 | 18 |
#ifndef __IPSPLGIMAP4POPULATEOP_H__ |
19 |
#define __IPSPLGIMAP4POPULATEOP_H__ |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include "ipsplgonlineoperation.h" |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
|
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
class CIpsPlgEventHandler; |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
|
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
/** |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
* class CIpsPlgImap4PopulateOp |
64 | 27 |
* |
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
*/ |
64 | 29 |
|
30 |
class CIpsPlgImap4PopulateOp : |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
public CIpsPlgOnlineOperation |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
{ |
64 | 33 |
public: |
34 |
||
35 |
/** |
|
36 |
* NewL() |
|
37 |
* Basic factory function - creates dialog with standard title resource |
|
38 |
* @param CMsvSession& |
|
39 |
* |
|
40 |
* |
|
41 |
* |
|
42 |
* |
|
43 |
* |
|
44 |
* |
|
45 |
* @return CIpsPlgImap4PopulateOperation* self pointer |
|
46 |
*/ |
|
47 |
||
48 |
IMPORT_C static CIpsPlgImap4PopulateOp* NewL( |
|
49 |
CMsvSession& aMsvSession, |
|
50 |
TRequestStatus& aObserverRequestStatus, |
|
51 |
TInt aPriority, |
|
52 |
TMsvId aService, |
|
53 |
CIpsPlgTimerOperation& aActivityTimer, |
|
54 |
const TImImap4GetPartialMailInfo& aPartialMailInfo, |
|
55 |
const CMsvEntrySelection& aSel, |
|
56 |
TFSMailMsgId aFSMailBoxId, |
|
57 |
MFSMailRequestObserver& aFSOperationObserver, |
|
58 |
TInt aFSRequestId, |
|
59 |
CIpsPlgEventHandler* aEventHandler, |
|
60 |
TBool aDoFilterSelection = ETrue ); |
|
61 |
||
62 |
/** |
|
63 |
* ~CIpsPlgImap4PopulateOp() |
|
64 |
* destructor |
|
65 |
*/ |
|
66 |
||
67 |
virtual ~CIpsPlgImap4PopulateOp(); |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
|
64 | 69 |
/** |
70 |
* |
|
71 |
*/ |
|
72 |
const TDesC8& ProgressL(); |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
|
64 | 74 |
|
75 |
/** |
|
76 |
* |
|
77 |
*/ |
|
78 |
const TDesC8& GetErrorProgressL( TInt aError ); |
|
79 |
||
80 |
/** |
|
81 |
* |
|
82 |
*/ |
|
83 |
TFSProgress GetFSProgressL() const; |
|
84 |
||
85 |
/** |
|
86 |
* |
|
87 |
*/ |
|
88 |
virtual TInt IpsOpType() const; |
|
89 |
||
90 |
private: |
|
91 |
||
92 |
||
93 |
/** |
|
94 |
* CIpsPlgImap4PopulateOp() |
|
95 |
* @param |
|
96 |
* |
|
97 |
* |
|
98 |
* |
|
99 |
* |
|
100 |
* |
|
101 |
* |
|
102 |
||
103 |
*/ |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
|
64 | 105 |
CIpsPlgImap4PopulateOp( |
106 |
CMsvSession& aMsvSession, |
|
107 |
TRequestStatus& aObserverRequestStatus, |
|
108 |
TInt aPriority, |
|
109 |
TMsvId aService, |
|
110 |
CIpsPlgTimerOperation& aActivityTimer, |
|
111 |
const TImImap4GetPartialMailInfo& aGetMailInfo, |
|
112 |
TFSMailMsgId aFSMailBoxId, |
|
113 |
MFSMailRequestObserver& aFSOperationObserver, |
|
114 |
TInt aFSRequestId, |
|
115 |
CIpsPlgEventHandler* aEventHandler ); |
|
116 |
||
117 |
/** |
|
118 |
* |
|
119 |
*/ |
|
120 |
||
121 |
void ConstructL( |
|
122 |
const CMsvEntrySelection& aSel, |
|
123 |
TBool aDoFilterSelection ); |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
|
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
|
64 | 126 |
/** |
127 |
* |
|
128 |
*/ |
|
129 |
||
130 |
void RunL(); |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
|
64 | 132 |
/** |
133 |
* |
|
134 |
*/ |
|
135 |
void DoRunL(); |
|
136 |
||
137 |
/** |
|
138 |
* |
|
139 |
*/ |
|
140 |
void DoCancel(); |
|
141 |
||
142 |
/** |
|
143 |
* |
|
144 |
*/ |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
|
64 | 146 |
void Complete(); |
147 |
||
148 |
/** |
|
149 |
* |
|
150 |
*/ |
|
151 |
void DoConnectL(); |
|
152 |
||
153 |
/** |
|
154 |
* |
|
155 |
*/ |
|
156 |
void FilterSelectionL( const CMsvEntrySelection& aSelection ); |
|
157 |
||
158 |
/** |
|
159 |
* |
|
160 |
*/ |
|
161 |
TBool IsPartialPopulate( ); |
|
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
|
64 | 163 |
protected: |
164 |
||
165 |
/** |
|
166 |
* |
|
167 |
*/ |
|
168 |
void DoPopulateL(); |
|
169 |
||
170 |
/** |
|
171 |
* From CIpsPlgOnlineoperation |
|
172 |
*/ |
|
173 |
TInt GetEngineProgress( const TDesC8& aProgress ); |
|
174 |
||
175 |
protected: |
|
176 |
||
177 |
enum TFetchState |
|
178 |
{ |
|
179 |
EStateIdle, |
|
180 |
EStateConnecting, |
|
181 |
EStateFetching, |
|
182 |
EStateInfoEntryChange |
|
183 |
}; |
|
184 |
||
185 |
||
186 |
private: //Data |
|
187 |
||
188 |
TImImap4GetPartialMailInfo iPartialMailInfo; |
|
189 |
RArray<TMsvId> iSelection; |
|
190 |
// not owned |
|
191 |
CIpsPlgEventHandler* iEventHandler; |
|
192 |
CMsvEntrySelection* iTempSelection; |
|
193 |
TDesC8* iFetchErrorProgress; |
|
194 |
TPckgBuf<TImap4SyncProgress> iSyncProgress; |
|
195 |
TMsvId iParent; |
|
196 |
TFetchState iState; |
|
197 |
||
0
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
}; |
8466d47a6819
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
|
64 | 200 |
#endif //__IPSPLGIMAP4POPULATEOP_H__ |