www.pudn.com > FileList_v1_0.zip > Filelistengine.h


/* 
* ============================================================================ 
*  Name     : CFileListEngine from FileListEngine.h 
*  Part of  : FileList 
*  Created  : 18.12.2002 by Forum Nokia 
*  Description: 
*     Engine for constructing filelist. 
*  Version  : 1.0 
*  Copyright: Nokia Corporation 
* ============================================================================ 
*/ 
 
#ifndef FILELISTENGINE_H 
#define FILELISTENGINE_H 
 
#include  
#include         // for CDir 
#include // for launching 
#include         // for CDesCArray 
#include          // for TDataType 
 
class CFileListEngine : public CCoeControl 
    { 
    public: // // Constructors and destructor 
 
        /** 
        * Symbian default constructor. 
        */       
        void ConstructL(); 
 
        /** 
        * Destructor. 
        */       
        ~CFileListEngine(); 
 
    public: // New functions 
 
// --------------------------------------------------------- 
// CFileListEngine::StartFileList() 
// This Method reads the appropriate directory list. 
// --------------------------------------------------------- 
// 
        TInt StartFileList(); 
 
// --------------------------------------------------------- 
// CFileListEngine::GetFileListItems(CDesCArray* aItems) 
// This Method constructs the listbox items with directory  
// information 
// --------------------------------------------------------- 
// 
        void GetFileListItems(CDesCArray* iItems); 
 
// --------------------------------------------------------- 
// CFileListEngine::SetDirectory(TInt aDirectory) 
// This Method sets which directory to list. 
// --------------------------------------------------------- 
// 
        void SetDirectory(TInt aDirectory); 
 
// --------------------------------------------------------- 
// CFileListEngine::SetSizeDate(TInt aSizeDate) 
// This Method sets whether modification date or file size  
// is shown. There is also option for toggling the status. 
// --------------------------------------------------------- 
// 
        void SetSizeDate(TInt aSizeDate); 
 
// --------------------------------------------------------- 
// CFileListEngine::EndFileList() 
// This Method ends the FileList session 
// --------------------------------------------------------- 
// 
        void EndFileList(); 
 
// --------------------------------------------------------- 
// CFileListEngine::RemoveItems(CDesCArray* aItems) 
// This Method removes all listbox items when a new list  
// needs to be shown. 
// --------------------------------------------------------- 
// 
        TBool RemoveItems(CDesCArray* aItems); 
 
// --------------------------------------------------------- 
// CFileListEngine::LaunchCurrent(TInt aPosition) 
// This Method launches selected item with DocumentHandler. 
// DocumentHandler will launch correct application depending  
// on the file type. 
// Note that all the extensions do not work on emulator. 
// --------------------------------------------------------- 
// 
        void LaunchCurrent(TInt aPosition); 
 
 
    private: //Data 
        // Define local CDir variable 
        CDir* iDirList; 
 
        // Fileserver session 
        RFs iFsSession; 
   
    private: // variables 
        // Which directory to show 
        TInt iDirectory;     
        // Show date or size? 
        TInt iSizeDate;      
 
 
    }; 
#endif 
 
// End of File