|
1 /* |
|
2 * Copyright (c) 2002 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 * Infrared Mtm Ui part. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CIRMTMUI_H |
|
22 #define CIRMTMUI_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <mtmuibas.h> |
|
26 #include <obexutilsuilayer.h> |
|
27 // CLASS DECLARATION |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CClientMtmRegistry; |
|
31 class CMtmUiLayer; |
|
32 |
|
33 |
|
34 |
|
35 /** |
|
36 * CCommonMtmUi |
|
37 */ |
|
38 class CIrMtmUi : public CBaseMtmUi |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CIrMtmUi* NewL( |
|
46 CBaseMtm& aBaseMtm, |
|
47 CRegisteredMtmDll& aRegisteredMtmDll ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CIrMtmUi(); |
|
53 |
|
54 public: // Functions from base classes |
|
55 |
|
56 /** |
|
57 * From CBaseMtmUi Entry Creation. |
|
58 * @param aEntry reference to entry |
|
59 * @param aParent parent entry |
|
60 * @return CMsvOperation pointer to Msg operation. |
|
61 */ |
|
62 virtual CMsvOperation* CreateL( |
|
63 const TMsvEntry& aEntry, |
|
64 CMsvEntry& aParent, |
|
65 TRequestStatus& aStatus ); |
|
66 |
|
67 /** |
|
68 * From CBaseMtmUi Open entry. |
|
69 * @param aStatus Status for operation. |
|
70 * @return CMsvOperation pointer to Msg operation. |
|
71 */ |
|
72 virtual CMsvOperation* OpenL( TRequestStatus& aStatus ); |
|
73 |
|
74 /** |
|
75 * From CBaseMtmUi Close entry. |
|
76 * @param aStatus Status for operation. |
|
77 * @return CMsvOperation pointer to Msg operation. |
|
78 */ |
|
79 virtual CMsvOperation* CloseL( TRequestStatus& aStatus ); |
|
80 |
|
81 /** |
|
82 * From CBaseMtmUi Launches editor/settings dialog as appropriate. |
|
83 * @param aStatus Status for operation. |
|
84 * @return CMsvOperation pointer to Msg operation. |
|
85 */ |
|
86 virtual CMsvOperation* EditL( TRequestStatus& aStatus ); |
|
87 |
|
88 /** |
|
89 * From CBaseMtmUi Launches viewer/settings dialog as appropriate |
|
90 * @param aStatus Status for operation. |
|
91 * @return CMsvOperation pointer to Msg operation. |
|
92 */ |
|
93 virtual CMsvOperation* ViewL( TRequestStatus& aStatus ); |
|
94 |
|
95 /** |
|
96 * From CBaseMtmUi Deletes selection from current context |
|
97 * Deletes entries from the current context, |
|
98 * which must be a folder or service of the relevant MTM |
|
99 * @param aSelection reference to entry. |
|
100 * @param aStatus Status for operation. |
|
101 * @return CMsvOperation pointer to Msg operation. |
|
102 */ |
|
103 virtual CMsvOperation* DeleteFromL( |
|
104 const CMsvEntrySelection& aSelection, |
|
105 TRequestStatus& aStatus ); |
|
106 |
|
107 /** |
|
108 * From CBaseMtmUi Deletes service, which need not |
|
109 * be the current context. |
|
110 * @param aService reference to entry. |
|
111 * @param aStatus Status for operation. |
|
112 * @return CMsvOperation pointer to Msg operation. |
|
113 */ |
|
114 virtual CMsvOperation* DeleteServiceL( |
|
115 const TMsvEntry& aService, |
|
116 TRequestStatus& aStatus ); |
|
117 |
|
118 /** |
|
119 * From CBaseMtmUi Remove remaining message of deleted service. |
|
120 * @param aChildren reference to entry selection. |
|
121 * @return None. |
|
122 */ |
|
123 void DeleteRecursivelyL( CMsvEntrySelection& aChildren ); |
|
124 |
|
125 |
|
126 /** |
|
127 * From CBaseMtmUi Reply entry |
|
128 * @param aDestination id for msv. |
|
129 * @param aPartlist partlist id. |
|
130 * @param aCompletionStatus status for operation. |
|
131 * @return CMsvOperation pointer to Msg operation. |
|
132 */ |
|
133 virtual CMsvOperation* ReplyL( |
|
134 TMsvId aDestination, |
|
135 TMsvPartList aPartlist, |
|
136 TRequestStatus& aCompletionStatus ); |
|
137 |
|
138 |
|
139 /** |
|
140 * From CBaseMtmUi forward entry |
|
141 * @param aDestination id for msv. |
|
142 * @param aPartlist partlist id. |
|
143 * @param aCompletionStatus status for operation. |
|
144 * @return CMsvOperation pointer to Msg operation. |
|
145 */ |
|
146 virtual CMsvOperation* ForwardL( |
|
147 TMsvId aDestination, |
|
148 TMsvPartList aPartList, |
|
149 TRequestStatus& aCompletionStatus ); |
|
150 |
|
151 |
|
152 /** |
|
153 * From CBaseMtmUi Open entry |
|
154 * @param aStatus status for operation. |
|
155 * @return CMsvOperation pointer to Msg operation. |
|
156 */ |
|
157 virtual CMsvOperation* OpenL( |
|
158 TRequestStatus& aStatus, |
|
159 const CMsvEntrySelection& aSelection ); |
|
160 |
|
161 /** |
|
162 * From CBaseMtmUi Close entry |
|
163 * @param aStatus status for operation. |
|
164 * @return CMsvOperation pointer to Msg operation. |
|
165 */ |
|
166 virtual CMsvOperation* CloseL( |
|
167 TRequestStatus& aStatus, |
|
168 const CMsvEntrySelection& aSelection ); |
|
169 |
|
170 /** |
|
171 * From CBaseMtmUi Handles sending. |
|
172 * @param aStatus status for operation. |
|
173 * @return CMsvOperation pointer to Msg operation. |
|
174 */ |
|
175 virtual CMsvOperation* EditL( |
|
176 TRequestStatus& aStatus, |
|
177 const CMsvEntrySelection& aSelection ); |
|
178 |
|
179 /** |
|
180 * From CBaseMtmUi Launches viewer/settings dialog as appropriate |
|
181 * @param aStatus status for operation. |
|
182 * @return CMsvOperation pointer to Msg operation. |
|
183 */ |
|
184 virtual CMsvOperation* ViewL( |
|
185 TRequestStatus& aStatus, |
|
186 const CMsvEntrySelection& aSelection ); |
|
187 |
|
188 |
|
189 /** |
|
190 * From CBaseMtmUi Context should be MTM folder/service to copy to |
|
191 * @param aStatus status for operation. |
|
192 * @return CMsvOperation pointer to Msg operation. |
|
193 */ |
|
194 virtual CMsvOperation* CopyToL( |
|
195 const CMsvEntrySelection& aSelection, |
|
196 TRequestStatus& aStatus ); |
|
197 |
|
198 /** |
|
199 * From CBaseMtmUi Context should be MTM folder/service to Move to |
|
200 * @param aStatus status for operation. |
|
201 * @return CMsvOperation pointer to Msg operation. |
|
202 */ |
|
203 virtual CMsvOperation* MoveToL( |
|
204 const CMsvEntrySelection& aSelection, |
|
205 TRequestStatus& aStatus ); |
|
206 |
|
207 /** |
|
208 * From CBaseMtmUi Context should be MTM folder/service to copy from |
|
209 * @param aStatus status for operation. |
|
210 * @return CMsvOperation pointer to Msg operation. |
|
211 */ |
|
212 virtual CMsvOperation* CopyFromL( |
|
213 const CMsvEntrySelection& aSelection, |
|
214 TMsvId aTargetId, |
|
215 TRequestStatus& aStatus ); |
|
216 |
|
217 /** |
|
218 * From CBaseMtmUi Context should be MTM folder/service to move from |
|
219 * @param aStatus status for operation. |
|
220 * @return CMsvOperation pointer to Msg operation. |
|
221 */ |
|
222 virtual CMsvOperation* MoveFromL( |
|
223 const CMsvEntrySelection& aSelection, |
|
224 TMsvId aTargetId, |
|
225 TRequestStatus& aStatus ); |
|
226 |
|
227 |
|
228 |
|
229 /** |
|
230 * From CBaseMtmUi Display progress summary. |
|
231 * @param aProgress reference to summary text. |
|
232 * @return TInt error code. |
|
233 */ |
|
234 TInt DisplayProgressSummary( const TDesC8& aProgress ) const; |
|
235 |
|
236 /** |
|
237 * From CBaseMtmUi return progress status. |
|
238 * @param aProgress reference to progress packet. |
|
239 * @param aReturnString returned progress text. |
|
240 * @param aTotalEntryCount entry count. |
|
241 * @param aEntriesDone completed entries. |
|
242 * @param aCurrentEntrySize size of the entry. |
|
243 * @param aCurrentBytesTrans transferred bytes. |
|
244 * @return TInt error code. |
|
245 */ |
|
246 virtual TInt GetProgress( |
|
247 const TDesC8& aProgress, |
|
248 TBuf<EProgressStringMaxLen>& aReturnString, |
|
249 TInt& aTotalEntryCount, |
|
250 TInt& aEntriesDone, |
|
251 TInt& aCurrentEntrySize, |
|
252 TInt& aCurrentBytesTrans ) const; |
|
253 |
|
254 |
|
255 /** |
|
256 * From CBaseMtmUi Return capability. |
|
257 * @param aCapability UID for capability. |
|
258 * @return TInt error code. |
|
259 */ |
|
260 virtual TInt QueryCapability( TUid aCapability, TInt& aResponse ); |
|
261 |
|
262 /** |
|
263 * From CBaseMtmUi Synchronous MTM function operation. |
|
264 * @param aFunctionId Function ID. |
|
265 * @param CMsvEntrySelection entry reference. |
|
266 * @param aParam parameter for function. |
|
267 * @return None. |
|
268 */ |
|
269 virtual void InvokeSyncFunctionL( |
|
270 TInt aFunctionId, |
|
271 const CMsvEntrySelection& aSelection, |
|
272 TDes8& aParameter ); |
|
273 |
|
274 /** |
|
275 * From CBaseMtmUi Cancel sending. |
|
276 * @param aStatus Async status for operation. |
|
277 * @param CMsvEntrySelection entry reference. |
|
278 * @return CMsvOperation pointer to Msg operation. |
|
279 */ |
|
280 virtual CMsvOperation* CancelL( |
|
281 TRequestStatus& aStatus, |
|
282 const CMsvEntrySelection& aSelection ); |
|
283 |
|
284 protected: |
|
285 |
|
286 /** |
|
287 * C++ default constructor. |
|
288 */ |
|
289 CIrMtmUi( CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll ); |
|
290 |
|
291 /** |
|
292 * By default Symbian OS constructor is private. |
|
293 */ |
|
294 virtual void ConstructL(); |
|
295 |
|
296 protected: // Functions from base classes |
|
297 |
|
298 /** |
|
299 * From CBaseMtmUi return resource filename. |
|
300 * @param aProgress reference to summary text. |
|
301 * @return TInt error code. |
|
302 */ |
|
303 virtual void GetResourceFileName( TFileName& aFileName ) const; |
|
304 |
|
305 /** |
|
306 * From CBaseMtmUi Launch viewer for received message. |
|
307 * @param aStatus Async status for operation. |
|
308 * @param aSession session reference. |
|
309 * @return CMsvOperation pointer to Msg operation. |
|
310 */ |
|
311 CMsvOperation* LaunchEditorApplicationL( |
|
312 TRequestStatus& aStatus, |
|
313 CMsvSession& aSession ); |
|
314 |
|
315 protected: // New functions |
|
316 |
|
317 /** |
|
318 * Register MTM. |
|
319 * @param aMtmType MTM UID. |
|
320 * @return CBaseMtm pointer. |
|
321 */ |
|
322 CBaseMtm* GetClientMtmLC( TUid aMtmType ); |
|
323 |
|
324 /** |
|
325 * Display progress summary. |
|
326 * @param aProgress reference to summary text. |
|
327 * @return TInt error code. |
|
328 */ |
|
329 TInt DisplayProgressSummaryL( const TDesC8& aProgress ) const; |
|
330 |
|
331 protected: // data |
|
332 TBuf<EProgressStringMaxLen> iConnectingText; |
|
333 TBuf<EProgressStringMaxLen> iSendingText; |
|
334 CClientMtmRegistry* iClientRegistry; // pointer to registration. |
|
335 TBool iCurrentlySending; // Sending state |
|
336 }; |
|
337 |
|
338 #endif // CIRMTMUI_H |
|
339 |
|
340 // End of File |