?? filelistengine.h
字號:
/*
* ============================================================================
* Name : CFileListEngine from FileListEngine.h
* Part of : FileList
* Created : 04.11.2006 by Forum Nokia
* Description:
* Engine for constructing filelist.
* Version : 2.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#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_30__
#include <aknserverapp.h>
#else
#include <apparc.h>
#endif
class CDocumentHandler;
class CEikProcess;
class CFileListEngine : public CCoeControl,
#ifdef __SERIES60_30__
public MAknServerAppExitObserver
#else
public MApaEmbeddedDocObserver
#endif
{
public: // // Constructors and destructor
/**
* Symbian default constructor.
*/
void ConstructL(CEikProcess* aProcess = NULL);
/**
* Destructor.
*/
~CFileListEngine();
public: // New functions
// ---------------------------------------------------------
// 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_30__
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
// 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 + -