27 #include "CAknFileSelectionDialog.h" |
27 #include "CAknFileSelectionDialog.h" |
28 |
28 |
29 class MAknFileFilter; |
29 class MAknFileFilter; |
30 class MAknFileSelectionObserver; |
30 class MAknFileSelectionObserver; |
31 class CDirectoryLocalizer; |
31 class CDirectoryLocalizer; |
32 |
32 class TResourceReader; |
|
33 class TCFDFileTypes; |
33 |
34 |
34 /** |
35 /** |
35 * A model class for file selection dialog. It is derived from |
36 * A model class for file selection dialog. It is derived from |
36 * MDesCArray which provides an interface for listboxes to get items. |
37 * MDesCArray which provides an interface for listboxes to get items. |
37 * Model maintains a list of directory entries. |
38 * Model maintains a list of directory entries. |
183 * @return Returns pointer to created CDir object. |
157 * @return Returns pointer to created CDir object. |
184 */ |
158 */ |
185 CDir* ReadDirectory( const TDesC& aDirectory ); |
159 CDir* ReadDirectory( const TDesC& aDirectory ); |
186 |
160 |
187 /** |
161 /** |
188 * Returns ETrue if a folder contains subfolders. |
162 * Test if a folder contains subfolders. |
189 * @param aFolder Relative folder to current path. |
163 * @param aFolder Relative folder to current path. |
190 * @return Returns ETrue if a folder contains subfolders. |
164 * @return Returns ETrue if a folder contains subfolders. |
191 */ |
165 */ |
192 TBool ContainsSubfolders( const TDesC& aFolder ); |
166 TBool ContainsSubfolders( const TDesC& aFolder ); |
193 |
167 |
194 void AppendIconForFileL(const TDesC& aFileName); |
168 /** |
195 |
169 * Test if a folder contains files. |
196 TPtrC GetLocalizedName(const TDesC& aFileName); |
|
197 |
|
198 /** |
|
199 * Returns ETrue if a folder contains files. |
|
200 * @param aFolder Relative folder to current path. |
170 * @param aFolder Relative folder to current path. |
201 * @return Returns ETrue if a folder contains files. |
171 * @return Returns ETrue if a folder contains files. |
202 */ |
172 */ |
203 TBool ContainsFiles( const TDesC& aFolder ); |
173 TBool ContainsFiles( const TDesC& aFolder ); |
204 |
174 /** |
|
175 * Test if a folder contains contents. |
|
176 * @param aFolder Relative folder to current path. |
|
177 * @return Returns ETrue if a folder contains contents. |
|
178 */ |
|
179 TBool ContainsContents( const TDesC& aFolder, TUint aAttMask ); |
|
180 /** |
|
181 * Get the file type icon. |
|
182 * @param aFileName File name to get right icon. |
|
183 * return Return incon index base on the extname of file. |
|
184 */ |
|
185 TInt GetIconForFileL( const TDesC& aFileName ) const; |
|
186 /** |
|
187 * Get the file local name. |
|
188 * @param aFileName File name to get its locallize name. |
|
189 * @return Returns file's local name. |
|
190 */ |
|
191 TPtrC GetLocalizedName(const TDesC& aFileName); |
|
192 /** |
|
193 * Test if a entry can be added in listbox. |
|
194 * @param aEntry The entry which be added or not. |
|
195 * @return Returns ETrue if a entry can be added. |
|
196 */ |
|
197 TBool EntryIsAccepted( const TEntry& aEntry ) const; |
|
198 /** |
|
199 * Read file type and icon index from reader |
|
200 * @param aReader Reader object |
|
201 */ |
|
202 void ReadFileExtNameAndIconIndexL( TResourceReader& aReader ); |
205 // Constructors and destructor |
203 // Constructors and destructor |
206 |
204 |
207 void ConstructL(); |
205 void ConstructL(); |
208 |
206 |
209 CAknFileSelectionModel( |
207 CAknFileSelectionModel( |
214 // Own: Current path being browsed. |
212 // Own: Current path being browsed. |
215 TParse iCurrentPath; |
213 TParse iCurrentPath; |
216 |
214 |
217 // Own: An array of filtered directory entries. |
215 // Own: An array of filtered directory entries. |
218 CArrayPakFlat<TEntry>* iEntryArray; |
216 CArrayPakFlat<TEntry>* iEntryArray; |
219 |
217 |
220 // Own: An array for image indices |
218 /* Own: An array which item has local name of file entry |
221 RArray<TInt> iImageIndexArray; |
219 * with icon index and entry index in iEntryArray |
|
220 * */ |
|
221 CDesC16ArraySeg * iLocalFileNameArray; |
|
222 |
|
223 /* Own: An array which item has local name of directory entry |
|
224 * with icon index and entry index in iEntryArray |
|
225 * */ |
|
226 CDesC16ArraySeg * iLocalDirNameArray; |
|
227 |
|
228 /* Own: An array which item has extent name of file entry |
|
229 * with icon index for the file type |
|
230 * */ |
|
231 CArrayFixFlat<TCFDFileTypes>* iFileTypeArray; |
222 |
232 |
223 // Own: // An array of filters. |
233 // Own: // An array of filters. |
224 CArrayPtrSeg<MAknFileFilter>* iFilterArray; |
234 CArrayPtrSeg<MAknFileFilter>* iFilterArray; |
225 |
235 |
226 // Own: File server session. |
236 // Own: File server session. |