pgpklx.h

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

H
151
字号
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.
		
	PGPklx.h - internal header file for KeyList control

	$Id: PGPklx.h,v 1.18 2002/10/09 13:02:54 pbj Exp $
____________________________________________________________________________*/
#ifndef Included_PGPklx_h	/* [ */
#define Included_PGPklx_h

#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x0400

// Win32 header files
#include <windows.h>
#include <commctrl.h>
#include <ole2.h>
#include <shellapi.h>

// PGP header files
#include "TreeList.h"

// PGP build flags
#include "pgpBuild.h"

// local header files
#include "resource.h"

// macro definitions
#define CKERR		if (IsPGPError (err)) goto done

// constant definitions
#define NUMBERFIELDS	9
#define MAXSHEETS		16		// maximum number of simultaneous dialogs

#define DEFAULTWINDOWWIDTH	520
#define DEFAULTWINDOWHEIGHT 300
#define DEFAULTWINDOWX      85
#define DEFAULTWINDOWY		90

#define KLI_NAME			0
#define KLI_VALIDITY		1
#define KLI_SIZE			2
#define KLI_DESCRIPTION		3
#define KLI_KEYID			4
#define KLI_TRUST			5
#define KLI_CREATION		6
#define KLI_EXPIRATION		7
#define KLI_ADK				8
#define NUMBERFIELDS		9

#define KL_PROPACTION_UPDATEKEY		1
#define KL_PROPACTION_SPLITKEY		2

struct _KEYLIST;

// Manager global variables
typedef struct _KEYLIST {
	PGPContextRef		context;
	PGPtlsContextRef	tlscontext;

	HWND				hwndParent;
	HWND				hwndTree;
	INT					iID;
	HWND				hwndStatusBar;
	LPDROPTARGET		pDropTarget;		//pointer to DropTarget object

	PGPKeySetRef		keysetDisp;			//keyset to display
	PGPKeyDBRef			keydbBacking;		//keydb backing the display keyset
	PGPKeyDBRef			keydbMain;			//main keydb
	LONG				lKeyListSortField;	//keylist sort order
	PGPBoolean			bKeyListSortInvert;
	BOOL				bMainKeySet;
	ULONG				ulOptionFlags;
	ULONG				ulDisableActions;
	ULONG				ulShowColumns;		//currently unused
	ULONG				ulHideColumns;		//currently unused

	BOOL				bMultipleSelected;
	UINT				uSelectedFlags;
	INT					iFocusedItemType;
	INT					iFocusedObjectType;
	HTLITEM				hFocusedItem;
	VOID*				pFocusedObject;

	INT					iValidityThreshold;	//for setting icons to green

	INT					iNumberSheets;			//number of open prop sheets
	HWND				hWndTable[MAXSHEETS];
	PGPKeyDBObjRef		keyTable[MAXSHEETS];
	PGPKeyDBObjRef		sigTable[MAXSHEETS];

	WORD				wColumnField[NUMBERFIELDS];
	WORD				wFieldWidth[NUMBERFIELDS];

	PGPKeyServerEntry	keyserver;

} KEYLIST, *PKEYLIST;

// KLColumn.c
VOID KLGetColumnPreferences (PKEYLIST pKL);
VOID KLSetColumnPreferences (PKEYLIST pKL);
VOID KLGetSelectedColumns (PKEYLIST pKL, ULONG* pulColumnFlags);
VOID KLSelectColumns (PKEYLIST pKL, ULONG ulColumnFlags);

// KLFocus.c
VOID KLSetFocus (PKEYLIST pKL, HTLITEM hFocused, BOOL bMultiple);
INT KLFocusedItemType (PKEYLIST pKL);
INT KLFocusedObjectType (PKEYLIST pKL);
HTLITEM KLFocusedItem (PKEYLIST pKL);
VOID* KLFocusedObject (PKEYLIST pKL);
BOOL KLMultipleSelected (PKEYLIST pKL);
UINT KLSelectedFlags (PKEYLIST pKL);
PGPError KLGetSelectedKeys (PKEYLIST pKL, PGPKeySetRef* pKeySet, INT* piCount);
INT KLGetObjectType (INT iImage);


// KLMisc.c
VOID* KLAlloc (LONG size);
VOID KLFree (VOID* p);
BOOL KLIsThisThePrimaryUserID (PGPKeyDBObjRef userid);
BOOL KLGetKeyName (PGPKeyDBObjRef key, LPSTR sz, UINT uLen);
BOOL KLGetUserIDName (PGPKeyDBObjRef UserID, LPSTR sz, UINT uLen);
KLGetKeyIDFromKey (PGPKeyDBObjRef key, LPSTR sz, UINT u);
KLGetKeyIDFromCert (PGPKeyDBObjRef sig, BOOL bX509, LPSTR sz, UINT u);

// KLTree.c
BOOL KLAddColumns (PKEYLIST pKL);
BOOL KLLoadKeyRingIntoTree (PKEYLIST pKL, 
		BOOL bReInsert,BOOL bExpandNew, BOOL bForceRealloc);
BOOL KLUpdateKeyInTree (PKEYLIST pKL, 
		PGPKeyDBObjRef key, BOOL bForceNew, BOOL bSetFocus);
BOOL KLUpdateAllValidities (PKEYLIST pKL);
PGPError KLGetObjUserVal (PKEYLIST pKL, PGPKeyDBObjRef obj, LONG* lValue);
PGPError KLSetObjUserVal (PKEYLIST pKL, PGPKeyDBObjRef obj, LONG lValue);
BOOL KLDeleteAllUserValues (PKEYLIST pKL);


#endif /* ] Included_PGPklx_h */


/*__Editor_settings____

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

⌨️ 快捷键说明

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