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

📄 cpgpdiskformatter.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: CPGPdiskFormatter.h,v 1.5 2002/08/06 20:09:24 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_CPGPdiskFormatter_h	// [
#define Included_CPGPdiskFormatter_h

#include "UDynLink.h"
#include "UFileSys.h"

#include "CPGPdiskEngine.h"

_PGP_BEGIN

// Types

template <typename T> class CArray;
class CMutex;


// Class CPGPdiskFormatter

class CPGPdiskFormatter
{
	NOT_COPYABLE(CPGPdiskFormatter)

public:
	struct FileSysInfo
	{
		FileSys::Type	fsType;
		const char		*fsString;
	};

	typedef PGPBoolean (_cdecl *FormatDiskStatusFuncType)(PGPUInt32 percent, 
		void *userVal);

public:
	CPGPdiskFormatter() { }
	~CPGPdiskFormatter() { }

	void	Format(const CPGPdiskContext& context, const char *root, 
		const char *volName, FileSys::Type fsType, 
		NewDiskStatusFuncType userCallback, void *userValue = NULL);

	static void	GetValidFilesystems(PGPUInt64 blocksDisk, 
		CArray<FileSysInfo>& fsInfos, PGPUInt32& numFsInfos);

private:
	static NewDiskStatusFuncType	mUserCallback;
	static void						*mUserValue;
	static CComboError				mError;

	static const char *	GetFSStringForFormat(FileSys::Type fsType);

	void	CanonicalizeVolumeName(CString& volName) const;

	void	ClearBlocks(CPGPdiskDisk& disk, PGPUInt64 startBlock, 
		PGPUInt32 numBlocks, NewDiskStatusFuncType userCallback, 
		void *userValue) const;

	void	InitBootSectorFat12(PGPUInt32 blocksDisk, 
		const UFileSys::FatData& fatData, 
		FileSys::BootSectorFat12& bs12) const;

	void	InitBootSectorFat16(PGPUInt32 blocksDisk, 
		const UFileSys::FatData& fatData, 
		FileSys::BootSectorFat16& bs16) const;

	void	InitBootSectorFat32(PGPUInt32 blocksDisk, 
		const UFileSys::FatData& fatData, 
		FileSys::BootSectorFat32& bs32, 
		FileSys::BigFatBootFSInfo& bfInfo) const;

	void	FormatCustomFat(CPGPdiskDisk& disk, const char *root, 
		const char *volName, FileSys::Type fsType, 
		NewDiskStatusFuncType userCallback, void *userValue);

	static BOOLEAN _stdcall	FormatExCallback(
		UDynLink::FormatExCallbackCommand command, DWORD subAction, 
		PVOID actionInfo);

	void	FormatWinNT(CPGPdiskDisk& disk, const char *root, 
		const char *volName, FileSys::Type fsType, 
		NewDiskStatusFuncType userCallback, void *userValue);
};

_PGP_END

#endif	// ] Included_CPGPdiskFormatter_h

⌨️ 快捷键说明

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