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

📄 gwcmdinfohash.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
////////////////////////////////////////////////////////////////////////////////
//  File : gwcmdinfohash.h
//
//  Copyright (C) 2002 PGP Corporation
//
//  ABSTRACT
//		
// 
//  Author: Satya S. Das
////////////////////////////////////////////////////////////////////////////////

#ifndef _GWCMDINFOHASH_H_
#define _GWCMDINFOHASH_H_

#include "linkedlist.h"

typedef struct _stTMPFILEINFO
{
//#ifdef __cplusplus
   struct _LIST_ENTRY *Flink;
   struct _LIST_ENTRY *Blink;
//#else
//	_LIST_ENTRY;
//#endif
	char *szFilePath;
	DWORD dwRequestTime;
} TMPFILEINFO, *PTMPFILEINFO;

typedef struct _stMSGINFO
{
//#ifdef __cplusplus
   struct _LIST_ENTRY *Flink;
   struct _LIST_ENTRY *Blink;
//#else
//	_LIST_ENTRY;
//#endif
	ULONG ulKey;//=message window handle
	DWORD dwState;//message state
	BSTR bstrId;//message id
	HWND hPlainTxtMsgWnd;//plain text message body window
	HWND hHtmlTxtMsgWnd;//html text message body window
	HWND hNewMsgTxtWnd;//modified message body window
	HWND hTrackedMsgWnd;//the message window we are currently tracking
	HMENU hMenuBar;
	LIST_ENTRY leFilesToDelete;
} MSGINFO, *PMSGINFO;



const short MSGINFO_HASHTABLE_SIZE=11;

//state/options flags used for MSGINFO.dwState member
const DWORD MIS_OPTION_UNKNOWN      =0x00000001;
const DWORD MIS_SKIP_OPERATION		=0x00000002;
const DWORD MIS_AUTO_ENCRYPT_ON_SEND=0x00000004;
const DWORD MIS_AUTO_SIGN_ON_SEND   =0x00000008;
const DWORD MIS_AUTO_DECRYPT_ON_OPEN=0x00000010;
const DWORD MIS_CONV_TO_PLAIN_TEXT  =0x00000020;
const DWORD MIS_DECRYPT_VERIFIED	=0x00000040;
			
UINT WINAPI TempFileCleanupThreadProc(LPVOID lpvParam);

class CCmdInfoHash
{
	public:
		CCmdInfoHash();
		~CCmdInfoHash();
		BOOL Init();
		BOOL Insert(PMSGINFO pmiMsgInfo);
		BOOL MarkFileForDeletion(const char *pszFileName);
		BOOL Remove(ULONG ulKey);
		PMSGINFO Get(ULONG ulKey);
		ToggleState(ULONG ulKey, DWORD dwState);
		void Lock();
		void UnLock();

	private:
		BOOL m_bInited;
		LIST_ENTRY m_leArray[MSGINFO_HASHTABLE_SIZE];
		ULONG m_ulCount;
		HANDLE m_hMutex;
		HANDLE m_hDelThread;
		HANDLE m_hQuitDelThread;
		LIST_ENTRY m_leFilesToDelete;
		
		void FreeMsgInfo(PMSGINFO lpMsgInfo);
		friend UINT WINAPI TempFileCleanupThreadProc(LPVOID lpvParam);
};


#endif //_GWCMDINFOHASH_H_

⌨️ 快捷键说明

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