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

📄 nsfdb.h

📁 IBM Lotus C++ API 7.0a for IBM Lotus Notes/Domino Directory Release --------- ------------------
💻 H
📖 第 1 页 / 共 4 页
字号:

#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
#pragma datamodel(P128)
#endif

/*********************************************************************/
/*                                                                   */
/* Licensed Materials - Property of IBM                              */
/*                                                                   */
/* L-GHUS-5RWNHM, L-GHUS-5RWNFH                                      */
/* (C) Copyright IBM Corp. 1989, 2005  All Rights Reserved           */
/*                                                                   */
/* US Government Users Restricted Rights - Use, duplication or       */
/* disclosure restricted by GSA ADP Schedule Contract with           */
/* IBM Corp.                                                         */
/*                                                                   */
/*********************************************************************/


#ifndef NSF_DB_DEFS
#define NSF_DB_DEFS

#ifndef NSF_DEFS
#include "nsfdata.h"
#endif

#ifndef EVENT_DEFS
#include "event.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif


/* Note Storage File Database Definitions */

/*	NSF File Information Buffer size.  This buffer is defined to contain
	Text (host format) that is NULL-TERMINATED.  This is the ONLY null-terminated
	field in all of NSF. */

#define	NSF_INFO_SIZE 128
#define NSF_INFO_WILD_CARD_SERVER_CHAR '*'

/*  Define NSFDbOpenExtended option bits.  These bits select individual
	open options. */

#define DBOPEN_WITH_SCAN_LOCK		0x0001	/* Open with scan lock to prevent
												other opens with scan lock
												(used by replicator) */
#define DBOPEN_PURGE				0x0002	/* DbPurge while opening */
#define DBOPEN_NO_USERINFO			0x0004	/* No user info may be available, so don't ask for it */
#define DBOPEN_FORCE_FIXUP			0x0008	/* Force a database fixup */
#define DBOPEN_FIXUP_FULL_NOTE_SCAN	0x0010	/* Scan all notes and all items (not incremental) */
#define DBOPEN_FIXUP_NO_NOTE_DELETE	0x0020	/* Do not delete bad notes during note scan */
#define DBOPEN_CLUSTER_FAILOVER		0x0080	/* If open fails try cluster failover */
#define DBOPEN_CLOSE_SESS_ON_ERROR	0x0100	/* Close session on error paths */
#define DBOPEN_NOLOG				0x0200	/* don't log errors - used when opening log database! */
/* Define NSFDB2GetInfo infotypes */
#define DB2NSF_INFO_IS_DB2_BACKED 			1	/* Is database DB2-backed: 1/0 */
#define DB2NSF_INFO_SCHEMA_NAME				2	/* Group schema containing NSFDB2 data */
#define DB2NSF_INFO_TABLESPACE_NAME			3	/* Tablespace name */
#define DB2NSF_INFO_TSID                    4   /* Tablespace ID */
#define DB2NSF_INFO_USERSCHEMA_NAME         5   /* Schema containing DAVs */
#define DB2NSF_INFO_CLASS_DESC              6   /* NSFDB2 grouping class description */

/* Define NSFDB2GetServerInfo infotypes */
#define DB2NSF_SERVINFO_SERVER_DEFAULT_TYPE	1	/* Server default type:  'DB2' or 'NSF' */
#define DB2NSF_SERVINFO_NSFDB2_CAPABLE      2   /* Can Domino serve NSFDB2 data?        */
#define DB2NSF_SERVINFO_DB2_DATABASE_NAME   3

#define DBCOMPACT_NO_INDEXES			0x00000001	/* Don't preserve view indexes */
#define DBCOMPACT_NO_LOCKOUT			0x00000002	/* Don't lock out database users */
#define DBCOMPACT_REVERT_ODS			0x00000004	/* Revert current ODS to the previous ODS version */
#define DBCOMPACT_MAX_4GB				0x00000020	/* Create new file with 4GB file size limit */
#define DBCOMPACT_MAILBOX				0x00000080	/* Compact XXXX.BOX for mail router and other MTAs */
#define DBCOMPACT_NO_INPLACE			0x00000100	/* Don't do in-place compaction */
#define DBCOMPACT_DISABLE_UNREAD		0x00002000	/* Disable unread marks in destination database */
#define DBCOMPACT_ENABLE_UNREAD			0x00004000	/* Reenable unread marks in destination database (default) */
#define DBCOMPACT_DISABLE_RESPONSE_INFO	0x00008000	/* Disable response info in resulting database */
#define DBCOMPACT_ENABLE_RESPONSE_INFO	0x00010000	/* Disable response info in resulting database (default) */
#define DBCOMPACT_ENABLE_FORM_BKT_OPT	0x00020000	/* Enable form/bucket bitmap optimization */
#define DBCOMPACT_DISABLE_FORM_BKT_OPT	0x00040000	/* Diable form/bucket bitmap optimization (default) */
#define	DBCOMPACT_IGNORE_ERRORS			0x00080000	/* Ignore errors encountered during compaction.  That is,
														make best effort to get something at the end */
#define DBCOMPACT_RECOVER_SPACE_ONLY	0x00400000	/* If set, do only bitmap correction if in-place can be done */
#define DBCOMPACT_ARCHIVE				0x00800000  /* Archive/delete, then compact the database */
#define DBCOMPACT_ARCHIVE_ONLY        	0x01000000  /* Just archive/delete, no need to compact */
#define DBCOMPACT_RECOVER_ALL_SPACE		0x04000000	/* If set, always do full space recovery compaction */

/*	Define NSF DB Classes - These all begin with 0xf000 for no good
	reason other than to ENSURE that callers of NSFDbCreate call the
	routine with valid parameters, since in earlier versions of NSF
	the argument to the call was typically 0. */

#define	DBCLASS_BY_EXTENSION	0	/* automatically figure it out */

#define	DBCLASS_NSFTESTFILE			0xff00
#define	DBCLASS_NOTEFILE			0xff01
#define	DBCLASS_DESKTOP				0xff02
#define	DBCLASS_NOTECLIPBOARD		0xff03
#define	DBCLASS_TEMPLATEFILE		0xff04
#define	DBCLASS_GIANTNOTEFILE		0xff05
#define	DBCLASS_HUGENOTEFILE		0xff06
#define	DBCLASS_ONEDOCFILE			0xff07	/* Not a mail message */
#define	DBCLASS_V2NOTEFILE			0xff08
#define	DBCLASS_ENCAPSMAILFILE		0xff09	/* Specifically used by alt mail */
#define	DBCLASS_LRGENCAPSMAILFILE	0xff0a	/* Specifically used by alt mail */
#define	DBCLASS_V3NOTEFILE			0xff0b
#define	DBCLASS_OBJSTORE			0xff0c	/* Object store */
#define DBCLASS_V3ONEDOCFILE		0xff0d
#define	DBCLASS_V4NOTEFILE			0xff0e
#define	DBCLASS_V5NOTEFILE			0xff0f
#define	DBCLASS_V6NOTEFILE			0xff10

#define	DBCLASS_MASK			0x00ff
#define	DBCLASS_VALID_MASK		0xff00

/*	Define NSF Special Note ID Indices.  The first 16 of these are reserved
	for "default notes" in each of the 16 note classes.  In order to access
	these, use SPECIAL_ID_NOTE+NOTE_CLASS_XXX.  This is generally used
	when calling NSFDbGetSpecialNoteID. NOTE: NSFNoteOpen, NSFDbReadObject
	and NSFDbWriteObject support reading special notes or objects directly
	(without calling NSFDbGetSpecialNoteID).  They use a DIFFERENT flag
	with a similar name: NOTE_ID_SPECIAL (see nsfnote.h).  Remember this
	rule:

	SPECIAL_ID_NOTE is a 16 bit mask and is used as a NoteClass argument.
	NOTE_ID_SPECIAL is a 32 bit mask and is used as a NoteID or RRV argument.
*/

#define	SPECIAL_ID_NOTE			0x8000	/* use in combination w/NOTE_CLASS 
											when calling NSFDbGetSpecialNoteID */
/*	Get/Set DbOption routines */
STATUS LNPUBLIC NSFDbGetOptions (DBHANDLE hDB, DWORD far *retDbOptions);
STATUS LNPUBLIC NSFDbSetOptions (DBHANDLE hDB, DWORD DbOptions, DWORD Mask);
#define	DBOPTION_FT_INDEX			0x00000001	/* Enable full text indexing */
#define DBOPTION_IS_OBJSTORE		0x00000002	/* TRUE if database is being used
												   as an object store - for garbage collection */
#define DBOPTION_USES_OBJSTORE		0x00000004	/* TRUE if database has notes which refer to an
												   object store - for garbage collection*/
#define DBOPTION_OBJSTORE_NEVER		0x00000008	/* TRUE if NoteUpdate of notes in this db should
												   never use an object store. */
#define DBOPTION_IS_LIBRARY			0x00000010  /* TRUE if database is a library */
#define DBOPTION_UNIFORM_ACCESS		0x00000020	/* TRUE if uniform access control
												   across all replicas */
#define DBOPTION_OBJSTORE_ALWAYS	0x00000040	/* TRUE if NoteUpdate of notes in this db should
												   always try to use an object store. */
#define DBOPTION_NO_BGAGENT			0x00000200	/* TRUE if db has no background agent */
#define DBOPTION_OUT_OF_SERVICE		0x00000400	/* TRUE is db is out-of-service, no new opens allowed. */
#define DBOPTION_IS_PERSONALJOURNAL	0x00000800	/* TRUE if db is personal journal */
#define DBOPTION_MARKED_FOR_DELETE	0x00001000	/* TRUE if db is marked for delete.  no new opens allowed,
													cldbdir will delete the database when ref count = 0 */
#define DBOPTION_HAS_CALENDAR		0x00002000	/* TRUE if db stores calendar events */
#define DBOPTION_IS_CATALOG_INDEX	0x00004000	/* TRUE if db is a catalog index */
#define DBOPTION_IS_ADDRESS_BOOK	0x00008000	/* TRUE if db is an address book */
#define DBOPTION_IS_SEARCH_SCOPE	0x00010000	/* TRUE if db is a "multi-db-search" repository */
#define DBOPTION_IS_UA_CONFIDENTIAL	0x00020000	/* TRUE if db's user activity log is confidential, only
												*  		viewable by designer and manager */
#define DBOPTION_RARELY_USED_NAMES	0x00040000	/* TRUE if item names are to be treated as
												*  if the ITEM_RARELY_USED_NAME flag is set. */
#define DBOPTION_IS_SITEDB			0x00080000	/* TRUE if db is a "multi-db-site" repository */
/*	This is the structure used for the Item Definition Table */

typedef struct {
	WORD Length;				/* total length of this buffer */
	WORD Items;					/* number of items in the table */
								/* now come the ITEM_DEFINITION structures */
								/* now comes the packed text */
} ITEM_DEFINITION_TABLE;

typedef struct {
	WORD Spare;					/* Spare */
	WORD ItemType;				/* default data type of the item */
	WORD NameLength;			/* length of the item's name */
} ITEM_DEFINITION;

/*	Database Activity Structure */

typedef struct {
	TIMEDATE First;				/* Beginning of reporting period */
	TIMEDATE Last;				/* End of reporting period */
	DWORD Uses;					/* # of uses in reporting period */
	DWORD Reads;				/* # of reads in reporting period */
	DWORD Writes;				/* # of writes in reporting period */
	DWORD PrevDayUses;			/* # of uses in previous 24 hours */
	DWORD PrevDayReads;			/* # of reads in previous 24 hours */
	DWORD PrevDayWrites;		/* # of writes in previous 24 hours */
	DWORD PrevWeekUses;			/* # of uses in previous week */
	DWORD PrevWeekReads;		/* # of reads in previous week */
	DWORD PrevWeekWrites;		/* # of writes in previous week */
	DWORD PrevMonthUses;		/* # of uses in previous month */
	DWORD PrevMonthReads;		/* # of reads in previous month */
	DWORD PrevMonthWrites;		/* # of writes in previous month */
} DBACTIVITY;

typedef struct {
	TIMEDATE Time;				/* Time of record */
	WORD Reads;					/* # of data notes read */
 	WORD Writes;				/* # of data notes written */
	DWORD UserNameOffset;		/* Offset of the user name from the beginning
								   of this memory block */
								/* User names follow -- '\0' terminated */	
} DBACTIVITY_ENTRY;

#define NSFDbGetActivityUserNamePtr(DbActivity, Index) 	\
				(((char FAR *) DbActivity) + DbActivity[Index].UserNameOffset)

/*	Define NSF DB open modes */

#define DB_LOADED 1					/* hDB refers to a normal database file */
#define DB_DIRECTORY 2				/* hDB refers to a "directory" and not a file */

/*	Define argument to NSFDbInfoParse/Modify to manipulate components from DbInfo */

#define INFOPARSE_TITLE			0
#define INFOPARSE_CATEGORIES	1
#define INFOPARSE_CLASS			2
#define INFOPARSE_DESIGN_CLASS	3


/* 	Array entry returned from NSFDbGetReplHistorySummary */

typedef struct {
	TIMEDATE		ReplicationTime;	/*	Time returned from last replciation */
	WORD			AccessLevel;		/*	Access level at time of replication */
	WORD			AccessFlags;		/*	Access flags at time of replication */
	WORD			Direction;			/*	NEVER, SEND, RECEIVE */
	DWORD			ServerNameOffset;	/*	Server name offset in packed data */
	WORD			ServerNameLength;	/*	Server name length in packed data */
	WORD			FileNameLength;		/*	File name length in packed data */

⌨️ 快捷键说明

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