22 #include <e32base.h> |
22 #include <e32base.h> |
23 #include <f32file.h> |
23 #include <f32file.h> |
24 #include <w32std.h> |
24 #include <w32std.h> |
25 #include <badesca.h> |
25 #include <badesca.h> |
26 #include <coedef.h> |
26 #include <coedef.h> |
27 #include <AknServerApp.h> |
|
28 #include <msvapi.h> |
27 #include <msvapi.h> |
29 #include <AknProgressDialog.h> |
|
30 #include <tz.h> |
28 #include <tz.h> |
|
29 #include "FB.hrh" |
31 |
30 |
32 _LIT(KIRAppPath, "z:\\sys\\bin\\irapp.exe"); |
31 _LIT(KIRAppPath, "z:\\sys\\bin\\irapp.exe"); |
33 _LIT(KBTAppPath, "z:\\sys\\bin\\btui.exe"); |
32 _LIT(KBTAppPath, "z:\\sys\\bin\\btui.exe"); |
34 _LIT(KUSBAppPath, "z:\\sys\\bin\\usbclasschangeui.exe"); |
33 _LIT(KUSBAppPath, "z:\\sys\\bin\\usbclasschangeui.exe"); |
35 _LIT(KErrRdPath, "c:\\resource\\ErrRd"); |
34 _LIT(KErrRdPath, "c:\\resource\\ErrRd"); |
37 |
36 |
38 |
37 |
39 // FORWARD DECLARATIONS |
38 // FORWARD DECLARATIONS |
40 class CEngine; |
39 class CEngine; |
41 class CFileBrowserFileOps; |
40 class CFileBrowserFileOps; |
42 class CAknIconArray; |
|
43 class TAknsItemID; |
|
44 class CDocumentHandler; |
41 class CDocumentHandler; |
45 //class CAknWaitDialog; |
|
46 //class CAknProgressDialog; |
|
47 class CEikProgressInfo; |
42 class CEikProgressInfo; |
48 class CFBFileOpClient; |
43 class CFBFileOpClient; |
49 //class CAknProgressDialog; |
|
50 class CEikProgressInfo; |
44 class CEikProgressInfo; |
51 class CAknOpenFileService; |
|
52 class CMessageDigest; |
45 class CMessageDigest; |
53 |
46 |
54 // CLASS DECLARATIONS |
47 // CLASS DECLARATIONS |
55 |
48 |
56 class TSearchAttributes |
49 class TSearchAttributes |
193 { |
186 { |
194 EClipBoardModeCut = 0, |
187 EClipBoardModeCut = 0, |
195 EClipBoardModeCopy |
188 EClipBoardModeCopy |
196 }; |
189 }; |
197 |
190 |
198 enum TListingMode |
|
199 { |
|
200 ENormalEntries = 0, |
|
201 ESearchResults, |
|
202 EOpenFiles, |
|
203 EMsgAttachmentsInbox, |
|
204 EMsgAttachmentsDrafts, |
|
205 EMsgAttachmentsSentItems, |
|
206 EMsgAttachmentsOutbox |
|
207 }; |
|
208 |
|
209 public: |
191 public: |
210 static CFileBrowserFileUtils* NewL(CEngine* aEngine); |
192 static CFileBrowserFileUtils* NewL(CEngine* aEngine); |
211 ~CFileBrowserFileUtils(); |
193 ~CFileBrowserFileUtils(); |
212 |
194 |
213 private: |
195 private: |
214 CFileBrowserFileUtils(CEngine* aEngine); |
196 CFileBrowserFileUtils(CEngine* aEngine); |
215 void ConstructL(); |
197 void ConstructL(); |
216 |
198 |
217 private: // from CActive |
199 private: // from CActive |
218 void RunL(); |
200 void RunL(); |
219 TInt RunError(TInt aError); |
201 TInt RunError(TInt aError); |
220 void DoCancel(); |
202 void DoCancel(); |
221 |
|
222 private: // from MAknServerAppExitObserver |
|
223 void HandleServerAppExit(TInt aReason); |
|
224 |
203 |
225 private: // from MMsvSessionObserver |
204 private: // from MMsvSessionObserver |
226 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); |
205 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); |
227 |
206 |
228 private: //from MProgressDialogCallback |
207 public: //from MProgressDialogCallback |
229 void DialogDismissedL(TInt aButtonId); |
208 void DialogDismissedL(/*TInt aButtonId*/); |
230 |
209 |
231 public: // command handling |
210 public: // command handling |
232 void StartExecutingCommandsL(const TDesC& aLabel); |
211 void StartExecutingCommandsL(const TDesC& aLabel); |
233 private: // command handling |
212 private: // command handling |
234 void ExecuteCommand(); |
213 void ExecuteCommand(); |
332 TBool TargetExists(const TInt aIndex, const TFileName &newName); |
311 TBool TargetExists(const TInt aIndex, const TFileName &newName); |
333 void GetDriveName(TInt aIndex, TFileName &aDriveName); |
312 void GetDriveName(TInt aIndex, TFileName &aDriveName); |
334 void GetDriveVolumeLabel(TInt aIndex, TFileName &aVolumeLabel); |
313 void GetDriveVolumeLabel(TInt aIndex, TFileName &aVolumeLabel); |
335 |
314 |
336 CFileEntryList* FileEntries() const; |
315 CFileEntryList* FileEntries() const; |
337 CDriveEntryList* DriveEntries() const; |
316 CDriveEntryList* DriveEntries() const; |
338 |
317 |
339 public: |
318 public: |
340 inline TInt SortMode() { return iSortMode; } |
319 inline TInt SortMode() { return iSortMode; } |
341 inline TInt OrderMode() { return iOrderMode; } |
320 inline TInt OrderMode() { return iOrderMode; } |
342 inline CFileEntryList* ClipBoardList() { return iClipBoardList; } |
321 inline CFileEntryList* ClipBoardList() { return iClipBoardList; } |
343 inline CFileEntryList* CurrentSelectionList() { return iCurrentSelectionList; } |
322 inline CFileEntryList* CurrentSelectionList() { return iCurrentSelectionList; } |
344 inline TBool IsDriveListViewActive() { return iCurrentPath==KNullDesC && iListingMode==ENormalEntries; } |
323 inline TBool IsDriveListViewActive() { return iCurrentPath==KNullDesC && iListingMode==ENormalEntries; } |
345 inline TBool IsNormalModeActive() { return iListingMode==ENormalEntries; } |
324 inline TBool IsNormalModeActive() { return iListingMode==ENormalEntries; } |
|
325 inline TListingMode ListingMode() { return iListingMode; } |
346 inline TFileName CurrentPath() { return iCurrentPath; } |
326 inline TFileName CurrentPath() { return iCurrentPath; } |
347 |
327 |
348 inline TSearchAttributes GetSearchAttributes(){ return iSearchAttributes; }; |
328 inline TSearchAttributes GetSearchAttributes(){ return iSearchAttributes; }; |
349 inline void ChangeAttributes(TSearchAttributes attributes) { iSearchAttributes = attributes; }; |
329 inline void ChangeAttributes(TSearchAttributes attributes) { iSearchAttributes = attributes; }; |
350 inline TSearchResults SearchResults(){ return iFileSearchResults; }; |
330 inline TSearchResults SearchResults(){ return iFileSearchResults; }; |
351 inline CFileEntryList* FoundFiles() { return iFileEntryList; }; |
331 inline CFileEntryList* FoundFiles() { return iFileEntryList; }; |
|
332 inline void SetAllowProcessing(TBool aAllowProcessing) { iAllowProcessing = aAllowProcessing; } |
352 |
333 |
353 private: |
334 private: |
354 TState iState; |
335 TState iState; |
355 CEngine* iEngine; |
336 CEngine* iEngine; |
356 CFileBrowserFileOps* iFileOps; |
337 CFileBrowserFileOps* iFileOps; |
357 // CAknWaitDialog* iWaitDialog; |
338 |
358 // CAknProgressDialog* iProgressDialog; |
339 TBool isWaitDialog; |
|
340 TBool isProgressDialog; |
|
341 |
359 CEikProgressInfo* iProgressInfo; |
342 CEikProgressInfo* iProgressInfo; |
360 CCommandArray* iCommandArray; |
343 CCommandArray* iCommandArray; |
361 TInt iCurrentEntry; |
344 TInt iCurrentEntry; |
362 TInt iSucceededOperations; |
345 TInt iSucceededOperations; |
363 TInt iFailedOperations; |
346 TInt iFailedOperations; |
379 TClipBoardMode iClipBoardMode; |
362 TClipBoardMode iClipBoardMode; |
380 CFileEntryList* iClipBoardList; |
363 CFileEntryList* iClipBoardList; |
381 CFileEntryList* iCurrentSelectionList; |
364 CFileEntryList* iCurrentSelectionList; |
382 TSearchAttributes iSearchAttributes; |
365 TSearchAttributes iSearchAttributes; |
383 CDocumentHandler* iDocHandler; |
366 CDocumentHandler* iDocHandler; |
384 CAknOpenFileService* iOpenFileService; |
367 |
385 RFile iMsgStoreWalkFile; |
368 RFile iMsgStoreWalkFile; |
386 TInt iPrevFolderIndex; |
369 TInt iPrevFolderIndex; |
387 TFileName iPrevFolderName; |
370 TFileName iPrevFolderName; |
388 RTz iTz; |
371 RTz iTz; |
389 TSearchResults iFileSearchResults; |
372 TSearchResults iFileSearchResults; |
390 CDesCArray* iTextArray; |
373 CDesCArray* iTextArray; |
|
374 TBool iAllowProcessing; |
391 }; |
375 }; |
392 |
376 |
393 |
377 |
394 // utility class for waiting for asychronous requests |
378 // utility class for waiting for asychronous requests |
395 class CAsyncWaiter : public CActive |
379 class CAsyncWaiter : public CActive |