cdevicecache.h

来自「PGP8.0源码 请认真阅读您的文件包然后写出其具体功能」· C头文件 代码 · 共 66 行

H
66
字号
/*____________________________________________________________________________
		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 + =
减小字号Ctrl + -
显示快捷键?