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

📄 cdevicecache.h

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

        $Id: CDeviceCache.h,v 1.3 2002/08/06 20:09:31 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_CDeviceCache_h	// [
#define Included_CDeviceCache_h

#include "CList.h"
#include "CLookasideList.h"
#include "CRMWOLock.h"
#include "CSubsystem.h"

_PGP_BEGIN

// Types

class CDevice;
class CUnicodeString;

// Class CDeviceCache

class CDeviceCache : public CSubsystem
{
	friend class CDriverSubsystemsDrvNT;

private:
	struct CachedCDeviceInfo;

private:
	CDeviceCache();

public:
	PGPBoolean	DoesEntryExist(const char *name) const;

	CComboError	CreateEntry(const char *name);
	void		DeleteEntry(const char *name);

	CComboError	SetEntryDevice(const char *name, CDevice *pDevice);
	CComboError	GetEntryDevice(const char *name, CDevice *&pDevice) const;

	CComboError	SetEntryVolId(const char *name, const CUnicodeString& volId);
	CComboError	GetEntryVolId(const char *name, CUnicodeString& volId) const;

	CComboError	SetEntryCurLink(const char *name, 
		const UNICODE_STRING& curLink);
	CComboError	GetEntryCurLink(const char *name, 
		CUnicodeString& curLink) const;

private:
	CLookasideList<CachedCDeviceInfo>	mCDIAllocator;
	CList<CachedCDeviceInfo>			mCDIList;
	mutable CRMWOLock					mCDILock;

	CComboError	Startup() {return CComboError();}
	void		Shutdown();

	CachedCDeviceInfo *	FindEntry(const char *name) const;
};

_PGP_END

#endif	// Included_CDeviceCache_h

⌨️ 快捷键说明

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