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

📄 cpgpmsgbackup.h

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

	$Id: CPGPMsgBackup.h,v 1.5 2002/11/14 02:58:42 sdas Exp $
____________________________________________________________________________*/
#ifndef Included_CPGPMsgBackup_h	/* [ */
#define Included_CPGPMsgBackup_h

#include <windows.h>
#include <mapix.h>
#include "pgpMemoryMgr.h"

typedef struct _PGPOLEBackupList PGPOLEBackupList;
struct _PGPOLEBackupList
{
	WCHAR *pwcsName;
	char *szData;
	DWORD dwSize;

	PGPOLEBackupList *pNext;
};

typedef struct _PGPMsgBackupList PGPMsgBackupList;
struct _PGPMsgBackupList
{
	ULONG ulIndex;
	char *szName;
	char *szLongName;
	char *szDisplayName;
	char *szData;
	DWORD dwSize;
	PGPOLEBackupList *poleHead;
	PGPOLEBackupList *poleCurrent;

	PGPMsgBackupList *pNext;
};

class CPGPMsgBackup : public IMAPIAdviseSink
{
public:
	CPGPMsgBackup(void *pCPGPexch, PGPMemoryMgrRef memMgr, 
		IMsgStore *pMsgStore, IMessage *pmsg);
	~CPGPMsgBackup();

	// The methods of IUnknown 

    STDMETHODIMP QueryInterface(REFIID riid, void** ppvObj);
    inline STDMETHODIMP_(ULONG) AddRef()
    	{ ++_cRef; return _cRef; }
    inline STDMETHODIMP_(ULONG) Release()
        { ULONG ulCount = --_cRef;
          if (!ulCount) { delete this; }
          return ulCount;
        } 

	// The methods of IMAPIAdviseSink

	STDMETHODIMP_(ULONG) OnNotify(ULONG cNotif, LPNOTIFICATION lpNotifications);

	HRESULT AddMessage(char *szMsg, DWORD dwSize);

	ULONG BackupAddRef();
	ULONG BackupRelease();

	LPVOID GetCreator();
	STDMETHODIMP SetMessageEntryID(LPVOID lpEntryID, ULONG ulSize);
	STDMETHODIMP WatchMsgForDelOrMove(BOOL bStart);
	HRESULT IsBackupOfMsg(IMessage *pMsg, BOOL &bResult);
	static HRESULT IsAlreadyBackedUp(LPMDB lpMsgStore, LPMESSAGE lpMsg, 
			CPGPMsgBackup *&ppmbMsgBackup);
	HRESULT GetFormatInfoIfAny(void *&pFormatInfo, 
			DWORD &dwFormatInfoSize, DWORD &dwFormatInfoType);
	HRESULT GetMsgBody(void *&pBuf, DWORD &dwSize);


	void SetFormat(BOOL bHTML, BOOL bRTF);
	void AddAttachment(ULONG ulIndex, BOOL bIsFormat, char *szName, 
		char *szLongName, char *szDisplayName, char *szData, DWORD dwSize);
	void AddOLE(ULONG ulIndex, WCHAR *pwcsName, char *szData, DWORD dwSize);
	
	void RestoreBackup();
	PGPMsgBackupList *FindAttachment(ULONG ulIndex);
	PGPOLEBackupList *FindOLEAttachment(ULONG ulIndex, WCHAR *pwcsName);

private:
    ULONG	_cRef;
	ULONG	m_ulBkRef;

	LPENTRYID m_pEntryID;
	ULONG m_ulEntryIDSize;

	IMsgStore *m_pMsgStore;
	IMessage *m_pMsg;

	PGPMemoryMgrRef m_memMgr;
	void *m_pCPGPexch;

	ULONG m_ulAdvise;
	
	char *m_szMsg;
	DWORD m_dwMsgSize;

	ULONG m_ulFormatIndex;
	BOOL m_bHTML;
	BOOL m_bRTF;
	PGPMsgBackupList *m_pFormat;
	PGPMsgBackupList *m_pHead;
	PGPMsgBackupList *m_pCurrent;
	

	void AddToAttachList(ULONG ulIndex, PGPMsgBackupList **ppHead, 
		PGPMsgBackupList **ppCurrent);
	void FreeAttachList(PGPMsgBackupList *pHead);

	BOOL InsertThisToBackupHash();
};

#endif /* ] Included_CPGPMsgBackup_h */


/*__Editor_settings____

	Local Variables:
	tab-width: 4
	End:
	vi: ts=4 sw=4
	vim: si
_____________________*/

⌨️ 快捷键说明

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