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

📄 npgpnts.h

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


	$Id: nPGPNts.h,v 1.11 2002/10/31 01:04:52 sdas Exp $
______________________________________________________________________________*/

#ifndef Included_nPGPNts_h	/* [ */
#define Included_nPGPNts_h


//system includes
#define WIN32_LEAN_AND_MEAN
#include <windows.h>	//for MessageBox(), string.h, etc.
#include <commdlg.h>	//for GetSaveFileName(), etc.
#include <shellapi.h>	//for ShellExecute()
#undef WIN32_LEAN_AND_MEAN
#include <stdlib.h>		//for malloc(), free(), etc.
#include <stdio.h>		//for sprintf()
#include <crtdbg.h>		//for debug macros like _ASSERTE()

#include "NotesApiGlobals.h"
//Notes API includes
#include <nsfdb.h>		//for NSFDbGetUnreadTable(), etc.
#include <nsfnote.h>
#include <textlist.h>	//for ListGetNumEntries()
#include <osmem.h>		//for OSLockObject(), etc.
#include <lookup.h>		//for NAMELookup(), etc.
#include <osmisc.h>		//for OSLoadString()
#include <osfile.h>		//for OSGetDataDirectory()
#include <names.h>		//for MAXPATH
#include <nsfsearc.h>	//for NSFComputeEvaluate(), etc.
#include <kfm.h>		//for SECKFMGetUserName()
#include <idtable.h>	//for IDTableCopy(), etc.
#include <stdnames.h>	//for MAIL_MAILER_ITEM 
#include <nsferr.h>		//for ERR_NOTE_BADATTSIGN, etc.
#include <oserr.h>		//for ERR_MEMORY

#include "LibRichText.h"
#include "LibItem.h"
#include "LibObject.h"
#include "LibNab.h"
#include "LibFileSystem.h"
#include "VbCallable.h"
#include "resource.h"

#define i_LEN_OPAQUE_PGP_ENCODE_CONTEXT  52 + 4
typedef struct	{
	BOOL  f_Sign;
	BOOL  f_Encrypt;
	BYTE  opaque[ i_LEN_OPAQUE_PGP_ENCODE_CONTEXT];
}  PgpEncodeContext;

typedef struct	{
	NameFoundInfo  t;
	char * pc_parent;
}  NameFoundInfoEx;

typedef struct	{
	HANDLE  h_content;					//handle to memory buffer holding the 
						//	rich-text field content
	DWORD  ul_len;						//length of content in buffer
	NOTEHANDLE  h_note;					//handle to the Notes document upon 
						//	which any reset will occur
}	ResettableRtfInfo;

typedef struct	{
	HWND  h;							//handle to window
	WNDPROC  prc;						
}	WndProcInfo;

typedef struct _WndProcNode	{
	WndProcInfo * pt;
	struct _WndProcNode * pt_nxt;
}	WndProcNode;

typedef struct	{
	char * pc_fileNm;
	char * pc_extFileNm;
	int * pi_choice;
}	DlgIoExtract;

typedef struct	{
	HFONT  h_fntFileCaption;
	int  i_choice;
	BOOL  f_dcryptdChecked;
	HWND  h_rdLaunch;
	HWND  h_rdExtract;
	HWND  h_ebxExtFileNm;
}	DlgStateExtract;


extern const int  ei_USER_ABORT;
extern const BLOCKID  ebid_NULLBLOCKID;
extern char  epc_APPNM[], epc_ITEMNM_STANDARD_ATTACH[];

extern HWND  eh_mainWnd;
extern BOOL  ef_LoadedSessionLong;


void e_ReleasePgpContext( void);
int ei_TestForPgpAscii( const char *const, BOOL *const);
int ei_PgpDecodeBuffer( char *const, const DWORD, const BOOL, char * *const, 
																DWORD *const);
void e_FreePgpMem( BYTE *const);
int ei_PgpEncodeBuffer( char *const, const DWORD, PgpEncodeContext *const, 
									const BOOL, long *const, char * *const);
int ef_FreePgpEncodeContext( PgpEncodeContext *const);
int ei_SetUpPgpEncodeContext( const BOOL, const BOOL, PgpEncodeContext *const, 
																BOOL *const);
int ei_ResolveEncryptionKeys( char * *const, const UINT, const BOOL, 
										const BOOL, PgpEncodeContext *const);
int ei_FindAndDecodePgpBlock( char * *const, const DWORD, char * *const, 
									DWORD *const, char * *const, int *const);
int ei_PgpEncodeFile( PgpEncodeContext *const, char[], char[]);
int ei_PgpLookupEmailLocal( PgpEncodeContext *const, NameFoundNode *);
int ei_PgpLookupEmailViaServers( PgpEncodeContext *const, NameFoundNode *);
STATUS xs_PgpSecureMessage( NOTEHANDLE, BOOL, BOOL, char[], const BOOL, 
													char[], const int, char[], 
													ResettableRtfInfo *const);
int ei_PgpDecodeFile( char[], char * *const);
int ei_PgpWipeFile( char[]);

static STATUS us_ReplaceRichAsciiLines( const char *const, const char *const, 
										const DWORD, const char *const, 
										RtfCursor *const, RtfContext *const);
static __inline int i_MatchPgpKeys( const BOOL, const UINT, char *const *const, 
													PgpEncodeContext *const);
static int i_PgpMatchNotesNames( const BOOL, const UINT, char *const *const, 
													PgpEncodeContext *const);
static int i_PgpMatchSmtpAddresses( const UINT, char *const *const, 
													PgpEncodeContext *const);
static int i_PgpDecodeUsingAsciiText( NOTEHANDLE, char[], RtfCursor, 
												RtfContext *const, BOOL *const);
static int i_PgpDecodeUsingRichTextObj( const DWORD, const DWORD, 
											const BLOCKID, NOTEHANDLE, char[], 
											RtfContext *const, int *const);
static STATUS us_ActionWrapPgpAttachments( NOTEHANDLE, RtfCursor, 
															RtfContext *const);
static int i_PgpEncodeAttachments( PgpEncodeContext *const, NOTEHANDLE, 
												RtfCursor, RtfContext *const);
static STATUS us_ActionWrapAttachment( const RtfSpan *const, const char[], 
												const char[], NOTEHANDLE, 
												const BOOL, RtfContext *const);
static int i_PgpEncodeRtfText( PgpEncodeContext *const, RtfContext *const, 
																char * *const);
static STATUS us_CreateRecipientsArray( char[], const BOOL, char[], 
													char * * *const, 
													UINT *const, BOOL *const);
static __inline void FreeAllocatedStringArray( char * * *const, const DWORD);
static int i_PgpEncodeRtfAsAttachment( PgpEncodeContext *const, NOTEHANDLE, 
										const RtfContext *const, 
										RtfContext *const, BLOCKID *const);
static BOOL f_TestForPgpRtfAttachment( RtfCursor, const RtfContext, 
																BOOL *const);
static STATUS us_LocatePgpRtfAttachment( RtfCursor, const RtfContext *const, 
												NOTEHANDLE, DWORD *const, 
												DWORD *const, BLOCKID *const);
static STATUS us_SetupRtfAttachParagraph( NOTEHANDLE, RtfContext *const, 
																char *const);
static LRESULT CALLBACK ActionBarWndProc( const HWND, const UINT, 
												const WPARAM, const LPARAM);
static DWORD ul_ExtractDlgInit( const HWND, const DlgIoExtract *const, 
										const HWND, DlgStateExtract *const);
static BOOL CALLBACK f_DlgProcExtract( HWND, UINT, WPARAM, LPARAM);
static LRESULT CALLBACK WndProcExtractRdo( const HWND, const UINT, 
												const WPARAM, const LPARAM);
static __inline void ClearRdOverride( const HWND);


#endif /* ] Included_nPGPNts_h */

⌨️ 快捷键说明

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