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

📄 filefetcherappui.h

📁 nokia symbian File_Fetching
💻 H
字号:
/*
 * ============================================================================
 *  Name     : FileFetcherAppUI.h
 *  Part of  : File fetching Example
 *  Created  : 12/9/2003 by Forum Nokia
 *  Implementation notes:
 *
 *     
 *  Version  : 1.0
 *  Copyright: Nokia Corporation
 * ============================================================================
 */

#ifndef __FILEFETCHER_APPUI_H__
#define __FILEFETCHER_APPUI_H__

#include <aknappui.h>
#include <maknfileselectionobserver.h> 
#include <mmgfetchverifier.h> 
#include <mediafiletypes.hrh>


/*
* Forward declarations
*/
class CFileFetcherAppView;

class CFileFetcherAppUi :	public CAknAppUi,
							// for CAknFileSelectionDialog
							public MAknFileSelectionObserver, 
							// for MGFetch
							public MMGFetchVerifier	
	{
public:
	/*
	* ConstructL()
	*  
	* Perform the second phase construction of a CFileFetcherAppUi object.
	*
	* Params: 
	*		-
	* 
	* Returns:
	* 		-
	*
	*/
	void ConstructL();

	/*
	* CFileFetcherAppUi()
	*
	* First phase construction of CFileFetcherAppUi.
	*
	* Params: 
	*		-
	* 
	* Returns:
	* 		-
	*
	*/
	CFileFetcherAppUi();

	/*
	* ~CFileFetcherAppUi()
	*  
	* Destructor for CFileFetcherAppUi.
	*
	* Params: 
	*		-
	* 
	* Returns:
	* 		-
	*
	*/
	~CFileFetcherAppUi();

/*
* from CAknAppUi
*/
public:
	/*
	* HandleCommandL()
	*  
	* Handles user commands.
	*
	* Params: 
	*		aCommand: Command ID.
	* 
	* Returns:
	* 		-
	*
	*/
	void HandleCommandL(TInt aCommand);

private:
	/*
	* ViewFileL()
	*  
	* Opens given aFileName file into it's default handler application. i.e. 
	* into the application that has been registered to handle the MIME type 
	* of given file. (e.g. video file into RealPlayer)
	*
	* Params: 
	*		aFileName: file to open.
	* 
	* Returns:
	* 		-
	*
	*/
	void ViewFileL(const TDesC& aFileName) const;

	/*
	* BrowseUsingMGFetchL()
	*  
	* Opens a new MGFetch dialog for browsing media files. Selected file
	* is opened into its default (handler) application.
	*
	* Params: 
	*		aMediaType: Media type to browse for. See mediafiletypes.hrh file
	*					for the TMediaFileType enumeration.
	* 
	* Returns:
	* 		-
	*
	*/
	void BrowseUsingMGFetchL(TMediaFileType aMediaType);

	/*
	* BrowseUsingAknSelectionDlg()
	*  
	* Opens a new CAknFileSelectionDialog for browsing files. Selected file
	* is opened into its default (handler) application.
	*
	* Params: 
	*		aPath:  Path from where to browse files. Also the root path for 
	*				browsing, meaning that user cannot go any path higher
	*				than the given path.
	* Returns:
	* 		-
	*
	*/
	void BrowseUsingAknSelectionDlg(const TFileName& aPath);

// From MMGFetchVerifier
private:
	/*
	* VerifySelectionL()
	*  
	* When user has selected file(s) from MGFetch dialog, this method is 
	* called to verify the selected files.
	*
	* Params: 
	*		aSelectedFiles: array of selected files.
	* 
	* Returns:
	* 		ETrue if aSelectedFiles are verified. EFalse if if not (dialog
	*		remains open).
	*
	*/
	TBool VerifySelectionL (const MDesCArray *aSelectedFiles); 

// From MAknFileSelectionObserver
private:
	/*
	* OkToExitL()
	*  
	* Called when user has selected a file from CAknFileSelectionDialog.
	* Verify the validity of selected file here, and by returning ETrue 
	* the dialog is closed (file accepted).
	*
	* Params: 
	*		aDriveAndPath:	full path and name of the selected file.
	*		aEntry:			TEntry containing infomation about the selection;
	*						like file size and is it read only. (see TEntry).
	* 
	* Returns:
	* 		ETrue to close the dialog. EFalse if the dialog should still
	*		be open.
	*
	*/
	TBool OkToExitL (const TDesC &aDriveAndPath, const TEntry &aEntry);

private:
	CFileFetcherAppView*	iAppView;
	};

#endif // __FILEFETCHER_APPUI_H__

⌨️ 快捷键说明

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