1 /* |
|
2 * Copyright (c) 2002-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: Document class of the file manager |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CFILEMANAGERDOCUMENT_H |
|
21 #define CFILEMANAGERDOCUMENT_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <GenericParamConsumer.h> |
|
25 #include <ConeResLoader.h> // RConeResourceLoader |
|
26 #include <badesca.h> |
|
27 |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CFileManagerIconArray; |
|
31 class CFileManagerEngine; |
|
32 class CFileManagerStringCache; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * FileManager application document class. |
|
38 * An object of this class is created by the Symbian OS framework by a call to |
|
39 * CFileManagerApplication::CreateDocumentL(). |
|
40 * The application framework creates the FileManager application UI object |
|
41 * (CFileManagerAppUi) by a call to the virtual function CreateAppUiL(). |
|
42 */ |
|
43 class CFileManagerDocument : public CAiwGenericParamConsumer |
|
44 { |
|
45 |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CFileManagerDocument* NewL( CEikApplication& aApp ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CFileManagerDocument(); |
|
57 |
|
58 public: // From CAiwGenericParamConsumer |
|
59 CEikAppUi* CreateAppUiL(); |
|
60 |
|
61 void UpdateTaskNameL( CApaWindowGroupName* aWgName ); |
|
62 |
|
63 CFileStore* OpenFileL( TBool aDoOpen, const TDesC& aFilename, RFs& aFs ); |
|
64 |
|
65 public: // New methods |
|
66 /** |
|
67 * Returns the icon array of this application. |
|
68 * |
|
69 * @return The icon array of this application. |
|
70 */ |
|
71 CFileManagerIconArray* IconArray() const; |
|
72 |
|
73 /** |
|
74 * Returns reference to engine of this application |
|
75 * |
|
76 * @return Reference to engine of this application |
|
77 */ |
|
78 CFileManagerEngine& Engine() const; |
|
79 |
|
80 /** |
|
81 * Returns the model for listbox |
|
82 * @return Return MDesCArray to current filelist |
|
83 */ |
|
84 MDesCArray* FileList() const; |
|
85 |
|
86 /** |
|
87 * Clears the string cache |
|
88 */ |
|
89 void ClearStringCache(); |
|
90 |
|
91 /** |
|
92 * Gets last error |
|
93 */ |
|
94 TInt LastError() const; |
|
95 |
|
96 /** |
|
97 * Checks is app was launched for scheduled backup |
|
98 */ |
|
99 TBool IsScheduledBackup(); |
|
100 |
|
101 /** |
|
102 * Stores ECOM plugins to be deleted with document |
|
103 */ |
|
104 void StorePluginL( const TUid& aUid ); |
|
105 |
|
106 private: |
|
107 |
|
108 /** |
|
109 * Standard C++ constructor. |
|
110 * |
|
111 * @param aApp Application which this document belongs to. |
|
112 */ |
|
113 CFileManagerDocument( CEikApplication& aApp ); |
|
114 |
|
115 /** |
|
116 * By default Symbian 2nd phase constructor is private. |
|
117 */ |
|
118 void ConstructL(); |
|
119 |
|
120 /** |
|
121 * Deletes stored ECOM plugins |
|
122 */ |
|
123 void DeletePlugins(); |
|
124 |
|
125 private: // Data |
|
126 /// Own: Engine of the application |
|
127 CFileManagerEngine* iEngine; |
|
128 /// Own: Icon array that contains all the icons used in listboxes. |
|
129 CFileManagerIconArray* iIconArray; |
|
130 /// Resource loader for view resources |
|
131 RConeResourceLoader iViewResourceLoader; |
|
132 /// Resource loader for engine resources |
|
133 RConeResourceLoader iEngineResourceLoader; |
|
134 // Own: For caching listbox strings |
|
135 CFileManagerStringCache* iStringCache; |
|
136 // Own: Stores loaded ECom plugin ids |
|
137 RArray< TUid > iPluginArray; |
|
138 |
|
139 }; |
|
140 |
|
141 #endif // CFILEMANAGERDOCUMENT_H |
|
142 |
|
143 // End of File |
|