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

📄 filelistengine.h

📁 nokia S60_video_operation
💻 H
字号:
/*
* ============================================================================
*  Name     : CFileListEngine from FileListEngine.h
*  Part of  : Video Recording Example (VRex)
*  Created  : 16.03.2004 by Nokia Forum
*  Description: Declares file list engine
*
*  Version  :
*  Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef __FILELISTENGINE_H__
#define __FILELISTENGINE_H__

#include <coecntrl.h>
#include <f32file.h>        // for CDir
#include <documenthandler.h>// for launching
#include <badesca.h>        // for CDesCArray
#include <apmstd.h>         // for TDataType

/**
 *  CFileListEngine
 *  Used to list all the files in specific directories.
 */
class CFileListEngine : public CCoeControl
    {
    public: // Constructors and destructor
        /**
         * Symbian default constructor.
         */
        void ConstructL();

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

    public: // New functions
        /**
         * This method gets the video file name at the listbox position.
         * @param aPosition, file position in listbox
         * @param aName, file name
		 * @return void
         */
	    void GetVideoFilePathAndNameAtPositon(TInt aPosition, TDes &aName);

        /**
         * This method reads the appropriate directory list.
         * @return file server response code.
         */
        TInt StartFileList();

        /**
         * This method constructs the listbox items with directory
		 * information.
         * @param aItems, listbox items
         * @return void
         */
        void GetFileListItems(CDesCArray* iItems);

        /**
         * This method sets which directory to list.
		 * @param aDirectory, directory to set
		 * @return void
         */
        void SetDirectory(TInt aDirectory);

        /**
         * This method sets whether modification date or file size
		 * is shown. There is also an option for toggling the status.
		 * @param aSizeDate, set size or date
         * @return void
         */
        void SetSizeDate(TInt aSizeDate);

        /**
         * This method ends the file server session.
         */
        void EndFileList();

        /**
         * This method removes all listbox items when a new list
		 * needs to be shown.
         * @param aItems, listbox items		
         * @return true if removed, false if not removed
         */
        TBool RemoveItems(CDesCArray* aItems);

        /**
         * 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.
         * @param aPosition, file position in listbox
		 * @return void
         */
        void LaunchCurrent(TInt aPosition);

    private: //Data
        // Define local CDir variable
        CDir* iDirList;

        // File server session
        RFs iFsSession;

    private: // variables
        // Which directory to show
        TInt iDirectory;
        // Show date or size?
        TInt iSizeDate;
    };

#endif // __FILELISTENGINE_H__

⌨️ 快捷键说明

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