⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filelistengine.h

📁 symbian os xml parse
💻 H
字号:
/*
 * ============================================================================
 *  Name       : CFileListEngine from FileListEngine.h
 *  Part of    : FileList
 *  Created    : 04/11/2006 by Forum Nokia
 *  Description:
 *    Declares the engine for constructing the FileList.
 *  Version    : 2.1.0
 * ============================================================================
 */

#ifndef FILELISTENGINE_H
#define FILELISTENGINE_H

#include <coecntrl.h>
#include <f32file.h>        // for CDir
#include <badesca.h>        // for CDesCArray
#include <apmstd.h>         // for TDataType
#ifdef __SERIES60_3X__
#include <aknserverapp.h>
#else
#include <apparc.h>
#endif

class CDocumentHandler;
class CEikProcess;

class CFileListEngine : public CCoeControl,
#ifdef __SERIES60_3X__
  public MAknServerAppExitObserver
#else
  public MApaEmbeddedDocObserver//////继承于一个文件操作的接口类
#endif
    {
    public: // // Constructors and destructor

        /**
        * Symbian default constructor.
        */
        void ConstructL(CEikProcess* aProcess = NULL);

        /**
        * Destructor.
        */
        ~CFileListEngine();

    public: // New functions
	    /*TFileName GetFileName(TInt i);*/
	    TFileName GetNowPath();
	    void CreateFile(TFileName aFileName);

// ---------------------------------------------------------
// CFileListEngine::StartFileList()
// This Method gets the specific directory.
// In the 1st edition use harcoded paths and the S60 2nd and 3rd edition
// get the specific path using PathInfo.
// ---------------------------------------------------------
//
        TInt StartFileList();

// ---------------------------------------------------------
// CFileListEngine::GetFileListItems(CDesCArray* aItems)
// This Method constructs the listbox items with directory
// information
// ---------------------------------------------------------
//
        void GetFileListItemsL(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 LaunchCurrentL(TInt aPosition);

// ---------------------------------------------------------
// CFileListEngine::IsDirListEmpty()
// ---------------------------------------------------------
        TBool IsDirListEmpty();

// ---------------------------------------------------------
// CFileListEngine::GetResourceFilesL ( TFileName &aBasePath )
// The method get all files including files into subfolders.
// ---------------------------------------------------------
//
        void GetResourceFilesL ( TFileName &aBasePath );

// ---------------------------------------------------------

#ifdef __SERIES60_3X__
  void HandleServerAppExit(TInt aReason);
#else
  void NotifyExit(TExitMode aMode);
#endif

    private: //Data
        // Define local CDir variable
        RArray<TEntry> iFileList;
        RArray<TFileName> iDirList;

        // Fileserver session
        RFs iFsSession;

    private: // variables
	    TFileName iNowPath;
        // Which directory to show
        TInt iDirectory;
        // Show date or size?
       /* TInt iSizeDate;*/
    TBool iDocEmbedded;
    CDocumentHandler *iDocHandler;
    };
#endif

// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -