1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #ifndef FILEBROWSER_FILEDLGS_H |
|
19 #define FILEBROWSER_FILEDLGS_H |
|
20 |
|
21 #include "FBFileUtils.h" |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 #include <f32file.h> |
|
26 #include <apgcli.h> |
|
27 |
|
28 /** |
|
29 * Interface to communicate UI with |
|
30 */ |
|
31 class MFolderSelectorUI |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Shows info message with text |
|
36 // * @param A aText text to be shown in message body. |
|
37 // * @param A aTitle text to be shown in message title. |
|
38 * @return None. |
|
39 */ |
|
40 virtual void InformFolderSelectionChanged() = 0; |
|
41 }; |
|
42 |
|
43 /** |
|
44 * Backend class for destination folder selection dialog |
|
45 */ |
|
46 class CFileBrowserFolderSelector |
|
47 { |
|
48 public: |
|
49 static CFileBrowserFolderSelector *NewL(TDes& aReturnPath, MFolderSelectorUI *); |
|
50 virtual ~CFileBrowserFolderSelector(); |
|
51 |
|
52 inline TFileName CurrentPath() const { return iCurrentPath; } |
|
53 inline TBool IsDriveListViewActive() const { return iCurrentPath==KNullDesC; } |
|
54 inline const CDriveEntryList *DriveEntryList() { return iDriveEntryList; } |
|
55 inline const CFileEntryList *FileEntryList() {return iFileEntryList; } |
|
56 |
|
57 void MoveDownToDirectoryL(TInt index); |
|
58 void MoveUpOneLevelL(); |
|
59 |
|
60 private: // Constructors |
|
61 CFileBrowserFolderSelector(TDes& aReturnPath, MFolderSelectorUI *); |
|
62 void ConstructL(); |
|
63 |
|
64 protected: // From CEikDialog |
|
65 TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType); |
|
66 void PreLayoutDynInitL(); |
|
67 void PostLayoutDynInitL(); |
|
68 TBool OkToExitL(TInt aButtonId); |
|
69 |
|
70 protected: // From CCoeControl |
|
71 //void HandlePointerEventL(const TPointerEvent &aPointerEvent); |
|
72 |
|
73 private: // New methods |
|
74 void RefreshViewL(); |
|
75 |
|
76 void GetDriveListL(); |
|
77 void GetFileListL(); |
|
78 |
|
79 private: // Data |
|
80 TInt iSelectedIndex; |
|
81 TBuf<16> iLSKActionText; |
|
82 TDes &iReturnPath; |
|
83 RFs iFs; |
|
84 CDriveEntryList *iDriveEntryList; |
|
85 CFileEntryList *iFileEntryList; |
|
86 TFileName iCurrentPath; |
|
87 MFolderSelectorUI *iFolderSelectorUI; |
|
88 }; |
|
89 |
|
90 #endif |
|
91 |
|
92 // End of File |
|
93 |
|