commonuis/CommonDialogs/src/CAknFileSelectionModel.h
branchRCL_3
changeset 55 aecbbf00d063
parent 38 c52421ed5f07
child 56 d48ab3b357f1
--- a/commonuis/CommonDialogs/src/CAknFileSelectionModel.h	Thu Aug 19 10:11:06 2010 +0300
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionModel.h	Tue Aug 31 15:28:30 2010 +0300
@@ -29,8 +29,7 @@
 class MAknFileFilter;
 class MAknFileSelectionObserver;
 class CDirectoryLocalizer;
-class TResourceReader;
-class TCFDFileTypes;
+
 
 /**
  *  A model class for file selection dialog. It is derived from
@@ -44,7 +43,35 @@
     {
 
 public:
-    
+
+// Enumerations
+
+    /**
+     * Enumerations for images.
+     */
+    enum TFileTypeIcon
+        {
+        EFolderIcon,
+        EFileIcon,
+        ESubFolderIcon,
+        EThisFolderIcon,
+        EImageFileIcon,
+        EGmsFileIcon,
+        ELinkFileIcon,
+        EVoiceRecFileIcon,
+        ESoundFileIcon,
+        EPlaylistFileIcon,
+        ECompoFileIcon,
+        ENoteFileIcon,
+        ESisFileIcon,
+        EVideoFileIcon,
+        EGameFileIcon,
+        EJavaFileIcon,
+        EUnknowTypeIcon,
+        EFolderEmptyIcon,
+        EFlashFileIcon
+        };
+
 // Constructors and destructor
 
     /**
@@ -159,47 +186,23 @@
     CDir* ReadDirectory( const TDesC& aDirectory );
 
     /**
-     * Test if a folder contains subfolders.
+     * Returns ETrue if a folder contains subfolders.
      * @param aFolder Relative folder to current path.
      * @return Returns ETrue if a folder contains subfolders.
      */
     TBool ContainsSubfolders( const TDesC& aFolder );
+
+    void AppendIconForFileL(const TDesC& aFileName);
+
+    TPtrC GetLocalizedName(const TDesC& aFileName);
     
     /**
-     * Test if a folder contains files.
+     * Returns ETrue if a folder contains files.
      * @param aFolder Relative folder to current path.
      * @return Returns ETrue if a folder contains files.
      */
     TBool ContainsFiles( const TDesC& aFolder );
-    /**
-     * Test if a folder contains contents.
-     * @param aFolder Relative folder to current path.
-     * @return Returns ETrue if a folder contains contents.
-     */
-    TBool ContainsContents( const TDesC& aFolder, TUint aAttMask );
-    /**
-     * Get the file type icon.
-     * @param aFileName File name to get right icon.
-     * return Return incon index base on the extname of file.
-     */
-    TInt GetIconForFileL( const TDesC& aFileName ) const;
-    /**
-     * Get the file local name.
-     * @param aFileName File name to get its locallize name.
-     * @return Returns file's local name.
-     */
-    TPtrC GetLocalizedName(const TDesC& aFileName);
-    /**
-     * Test if a entry can be added in listbox.
-     * @param aEntry The entry which be added or not.
-     * @return Returns ETrue if a entry can be added.
-     */
-    TBool EntryIsAccepted( const TEntry& aEntry ) const;
-    /**
-     * Read file type and icon index from reader
-     * @param aReader Reader object
-     */
-    void ReadFileExtNameAndIconIndexL( TResourceReader& aReader );
+
 // Constructors and destructor
 
     void ConstructL();
@@ -214,21 +217,9 @@
 
     // Own: An array of filtered directory entries.
     CArrayPakFlat<TEntry>* iEntryArray;
-    
-    /* Own: An array which item has local name of file entry 
-     * with icon index and entry index in iEntryArray
-     * */
-    CDesC16ArraySeg * iLocalFileNameArray;
-    
-    /* Own: An array which item has local name of directory entry 
-     * with icon index and entry index in iEntryArray
-     * */
-    CDesC16ArraySeg * iLocalDirNameArray;
-    
-    /* Own: An array which item has extent name of file entry 
-     * with icon index for the file type
-     * */
-    CArrayFixFlat<TCFDFileTypes>* iFileTypeArray;
+
+    // Own: An array for image indices
+    RArray<TInt> iImageIndexArray;
 
     // Own: // An array of filters.
     CArrayPtrSeg<MAknFileFilter>* iFilterArray;
@@ -251,9 +242,14 @@
     // Own: Root folder text
     HBufC* iRootFolderText;
 
+    // Own: RApaLsSession for getting mime-types for files:
+    RApaLsSession iApaSession;
+
+    TEntry iFolderEntry;
+
     TParse iParse;
-    // Own: A buffer for using
-    HBufC * iStringBuf;
+
+    HBufC * iItemWithImageIndex;
 
     };