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

📄 nsfdata.h

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


/*	Data Type Definitions. */


/*	Class definitions.  Classes are defined to be the
	"generic" classes of data type that the internal formula computation
	mechanism recognizes when doing recalcs. */

#define	CLASS_NOCOMPUTE				(0 << 8)
#define	CLASS_ERROR					(1 << 8)
#define	CLASS_UNAVAILABLE			(2 << 8)
#define CLASS_NUMBER				(3 << 8)
#define CLASS_TIME					(4 << 8)
#define CLASS_TEXT					(5 << 8)
#define	CLASS_FORMULA				(6 << 8)
#define	CLASS_USERID				(7 << 8)

#define CLASS_MASK					0xff00

/*  All datatypes below are passed to NSF in either host (machine-specific
	byte ordering and padding) or canonical form (Intel 86 packed form).
	The format of each datatype, as it is passed to and from NSF functions,
	is listed below in the comment field next to each of the data types.
	(This host/canonical issue is NOT applicable to Intel86 machines,
	because on that machine, they are the same and no conversion is required).
	On all other machines, use the ODS subroutine package to perform
	conversions of those datatypes in canonical format before they can
	be interpreted. */

/*	"Computable" Data Types */

#define	TYPE_ERROR					0 + CLASS_ERROR			/* Host form */
#define	TYPE_UNAVAILABLE			0 + CLASS_UNAVAILABLE	/* Host form */
#define TYPE_TEXT					0 + CLASS_TEXT			/* Host form */
#define TYPE_TEXT_LIST				1 + CLASS_TEXT			/* Host form */
#define TYPE_NUMBER					0 + CLASS_NUMBER		/* Host form */
#define TYPE_NUMBER_RANGE			1 + CLASS_NUMBER		/* Host form */
#define TYPE_TIME					0 + CLASS_TIME			/* Host form */
#define TYPE_TIME_RANGE				1 + CLASS_TIME			/* Host form */
#define TYPE_FORMULA				0 + CLASS_FORMULA		/* Canonical form */
#define	TYPE_USERID					0 + CLASS_USERID		/* Host form */

/*	"Non-Computable" Data Types */

#define	TYPE_INVALID_OR_UNKNOWN		0 + CLASS_NOCOMPUTE		/* Host form */
#define	TYPE_COMPOSITE				1 + CLASS_NOCOMPUTE		/* Canonical form, >64K handled by more than one item of same name concatenated */
#define TYPE_COLLATION				2 + CLASS_NOCOMPUTE		/* Canonical form */
#define TYPE_OBJECT					3 + CLASS_NOCOMPUTE		/* Canonical form */
#define TYPE_NOTEREF_LIST			4 + CLASS_NOCOMPUTE		/* Host form */
#define TYPE_VIEW_FORMAT			5 + CLASS_NOCOMPUTE		/* Canonical form */
#define TYPE_ICON					6 + CLASS_NOCOMPUTE		/* Canonical form */
#define TYPE_NOTELINK_LIST			7 + CLASS_NOCOMPUTE		/* Host form */
#define TYPE_SIGNATURE				8 + CLASS_NOCOMPUTE		/* Canonical form */
#define TYPE_SEAL					9 + CLASS_NOCOMPUTE		/* Canonical form */
#define TYPE_SEALDATA				10 + CLASS_NOCOMPUTE	/* Canonical form */
#define TYPE_SEAL_LIST				11 + CLASS_NOCOMPUTE	/* Canonical form */
#define TYPE_HIGHLIGHTS				12 + CLASS_NOCOMPUTE	/* Host form */
#define TYPE_WORKSHEET_DATA			13 + CLASS_NOCOMPUTE	/* Used ONLY by Chronicle product */
															/* Canonical form */
#define TYPE_USERDATA				14 + CLASS_NOCOMPUTE	/* Arbitrary format data - see format below */
															/* Canonical form */
#define TYPE_QUERY					15 + CLASS_NOCOMPUTE	/* Saved query CD records; Canonical form */
#define TYPE_ACTION					16 + CLASS_NOCOMPUTE	/* Saved action CD records; Canonical form */
#define TYPE_ASSISTANT_INFO			17 + CLASS_NOCOMPUTE	/* Saved assistant info */
#define TYPE_VIEWMAP_DATASET		18 + CLASS_NOCOMPUTE	/* Saved ViewMap dataset; Canonical form */
#define TYPE_VIEWMAP_LAYOUT			19 + CLASS_NOCOMPUTE	/* Saved ViewMap layout; Canonical form */
#define TYPE_LSOBJECT				20 + CLASS_NOCOMPUTE	/* Saved LS Object code for an agent.	*/
#define	TYPE_HTML					21 + CLASS_NOCOMPUTE	/* LMBCS-encoded HTML, >64K handled by more than one item of same name concatenated */
#define TYPE_SCHED_LIST				22 + CLASS_NOCOMPUTE	/* Busy time schedule entries list; Host form */
#define TYPE_CALENDAR_FORMAT		24 + CLASS_NOCOMPUTE	/* Canonical form */
#define TYPE_MIME_PART				25 + CLASS_NOCOMPUTE	/* MIME body part; Canonical form */
#define TYPE_RFC822_TEXT			 2 + CLASS_TEXT			/* RFC822( RFC2047) message header; Canonical form */

/*	This is the structure used for summary buffers */

typedef struct {
	USHORT Length;				/* total length of this buffer */
	USHORT Items;				/* number of items in the table */
								/* now come the ITEMs */
								/* now comes the packed text */
} ITEM_TABLE;

typedef struct {				/* used for item names and values */
	USHORT NameLength;			/* length of the item's name */
	USHORT ValueLength;			/* length of the value field */
} ITEM;

typedef struct {
	USHORT Length;				/* total length of this buffer */
	USHORT Items;				/* number of items in the table */
								/* now comes an array of WORDS representing
									the lengths of the item names. */
								/* now comes the item names as packed text */
} ITEM_NAME_TABLE;

typedef struct {
	USHORT Length;				/* total length of this buffer */
	USHORT Items;				/* number of items in the table */
								/* now comes an array of WORDS representing
									the lengths of the item values. */
								/* now comes the item values as packed bytes */
} ITEM_VALUE_TABLE;

/*	Here is the format of the various LIST data types:

	TYPE_TEXT_LIST:

		LIST				* list header *
		USHORT ...			* array of text string lengths following *
		text				* now comes the packed text for all strings *

	TYPE_NUMBER_RANGE:

		RANGE				* range header *
		NUMBER ...			* array of NUMBERs *
		NUMBER_PAIR ...		* array of NUMBER_PAIRs *

	TYPE_TIME_RANGE:

		RANGE				* range header *
		TIMEDATE ...		* array of time/date's *
		TIMEDATE_PAIR ...	* array of time/date pairs *

	TYPE_NOTEREF_LIST:

		LIST				* list header *
		UNIVERSALNOTEID		* array of UNIVERSALNOTEIDs *


	TYPE_NOTELINK_LIST:

		LIST				* list header *
		NOTELINK			* array of NOTELINKs *

	TYPE_USERDATA:

		BYTE Length			* length of LMBCS "format-name" string *
		char[Length];		* LMBCS "format-name" string used to distinguish *
							* various formats of user data that follows. *
							* ("format-name" string is NOT NULL-TERMINATED!) *
		data				* next is variable-length data that corresponds *
							* to the format specified by the string *

*/

/*	This is the data structure used for TYPE_OBJECT values */

typedef struct {
	WORD ObjectType;			/* Type of object (OBJECT_xxx) */
	DWORD RRV;					/* Object ID of the object in THIS FILE */
} OBJECT_DESCRIPTOR;

/*	These must be OR-ed into the ObjectType below in order to get the
	desired behavior.  Note that OBJECT_COLLECTION implicitly has
	both of these bits implied, because that was the desired behavior
	before these bits were invented. */

#define	OBJECT_NO_COPY	0x8000	/* do not copy object when updating to new note or database */
#define	OBJECT_PRESERVE	0x4000	/* keep object around even if hNote doesn't have it when NoteUpdating */
#define	OBJECT_PUBLIC	0x2000	/* Public access object being allocated. */

/*	Object Types, a sub-category of TYPE_OBJECT */

#define	OBJECT_FILE					0		/* File Attachment */
#define OBJECT_FILTER_LEFTTODO 		3		/* IDTable of "done" docs attached to filter */
#define OBJECT_ASSIST_RUNDATA		8		/* Assistant run data object */
#define OBJECT_UNKNOWN	0xffff		/* Used as input to NSFDbGetObjectSize */

/*	File Attachment definitions */

#define HOST_MASK		0x0f00	/* used for NSFNoteAttachFile Encoding arg */
#define	HOST_MSDOS		(0 << 8)/* CRNL at EOL, optional ^Z at EOF */
#define	HOST_OLE		(1 << 8)/* unknown internal representation, up to app */
#define	HOST_MAC		(2 << 8)/* potentially has resource forks, etc. */
#define	HOST_UNKNOWN	(3 << 8)/* came inbound thru a gateway */
#define HOST_HPFS		(4 << 8)/* HPFS. Contains EAs and long filenames */
#define	HOST_OLELIB		(5 << 8)/* OLE 1 Library encapsulation */
#define HOST_BYTEARRAY_EXT	(6 << 8)/* OLE 2 ILockBytes byte array extent table */
#define HOST_BYTEARRAY_PAGE	(7 << 8)/* OLE 2 ILockBytes byte array page */
#define HOST_CDSTORAGE	(8 << 8)/* externally stored CD records */
#define HOST_STREAM		(9 << 8)/* Binary private stream */
#define HOST_LINK		(10 << 8)/* contains a RESOURCELINK to a named element */

#define	HOST_LOCAL		0x0f00	/* ONLY used as argument to NSFNoteAttachFile */
								/* means "use MY os's HOST_ type */

#define EFLAGS_MASK		0xf000	/* used for NSFNoteAttachFile encoding arg */
#define EFLAGS_INDOC	0x1000	/* used to pass FILEFLAG_INDOC flag to NSFNoteAttachFile */
#define EFLAGS_KEEPPATH 0x2000  /* don't strip off path in the filename */

/* changed below from 0x00ff to 0x000f to make room for flags defined below */
#define	COMPRESS_MASK	0x000f	/* used for NSFNoteAttachFile Encoding arg */
#define	COMPRESS_NONE	0		/* no compression */
#define	COMPRESS_HUFF	1		/* huffman encoding for compression */
#define	COMPRESS_LZ1	2		/* LZ1 compression */
#define	RECOMPRESS_HUFF	3		/* Huffman compression even if server supports LZ1 */

#define NTATT_FTYPE_MASK	0x0070	/*	File type mask */
#define NTATT_FTYPE_FLAT	0x0000	/*	Normal one fork file */
#define NTATT_FTYPE_MACBIN	0x0010	/*	MacBinaryII file */
#define NTATT_FTYPE_EBCDIC	0x0020	/*	EBCDIC flat file */
#define NTATT_NODEALLOC		0x0080	/*	Don't deallocate object when item is deleted */

#define	ATTRIB_READONLY	0x0001	/* file was read-only */
#define	ATTRIB_PRIVATE	0x0002	/* file was private or public */

#define	FILEFLAG_SIGN		0x0001	/* file object has object digest appended */
#define FILEFLAG_INDOC		0x0002	/* file is represented by an editor run in the document */
#define FILEFLAG_MIME		0x0004  /* file object has mime data appended */
									/* and NSFDbGetObjectInfo, NSFDbCopyObject. */
#define ENCODE_MASK			0x0038  /* file object has mime content transfer encoding */
#define ENCODE_NONE			(0 << 3)/* no encoding */
#define ENCODE_BASE64		(1 << 3)/* base64 encoding */
#define ENCODE_QP			(2 << 3)/* quoted-printable encoding */
#define ENCODE_UUENCODE		(3 << 3)/* x-uuencode encoding */
#define ENCODE_EXTENSION	(4 << 3)/* unknown extension encoding */

typedef struct {
	OBJECT_DESCRIPTOR Header;	/* object header */
	WORD FileNameLength;		/* length of file name */
	WORD HostType;		 		/* identifies type of text file delimeters (HOST_) */
	WORD CompressionType;		/* compression technique used (COMPRESS_) */
	WORD FileAttributes;		/* original file attributes (ATTRIB_) */
	WORD Flags;					/* miscellaneous flags (FILEFLAG_, ENCODE_) */
	DWORD FileSize;				/* original file size */
	TIMEDATE FileCreated;		/* original file date/time of creation, 0 if unknown */
	TIMEDATE FileModified;		/* original file date/time of modification */
								/* Now comes the file name... It is the original */
								/* RELATIVE file path with no device specifiers */
} FILEOBJECT;

typedef struct {
	char FileCreator[4];		/* application that created the file */
	char FileType[4];			/* type of file */
	DWORD ResourcesStart;		/* offset into the object at which resources begin */
	DWORD ResourcesLen;			/* length of the resources section in bytes */
	WORD CompressionType;		/* compression used for Mac resources */
	DWORD Spare;				/* 0 */
} FILEOBJECT_MACEXT;

typedef struct {
	DWORD EAStart;				/* offset into the object at which EAs begin */
	DWORD EALen;				/* length of EA section */
	DWORD Spare;				/* 0 */
} FILEOBJECT_HPFSEXT;


/* @SPECIAL Escape Codes */

#define	ESCBEGIN 0x7f
#define	ESCEND	 0xff

/*	Index information structure passed into NSFTranslateSpecial to provide
	index-related information for certain @INDEX functions, if specified. */


typedef struct
	{
	DWORD	IndexSiblings;		/* # siblings of entry */
	DWORD	IndexChildren;		/* # direct children of entry */
	DWORD	IndexDescendants;	/* # descendants of entry */
	WORD	IndexAnyUnread;		/* TRUE if entry "unread, or any descendants "unread" */
	} INDEXSPECIALINFO;

/*	Calendar busy time schedule list structure */

/* These are application ID's for the SCHED_LIST wApplicationID field.
** This is used to interpret the application specific UserAttr field.
** Notes ignores the UserAttr field, however application specific
** information can be returned by application specific gateways.
** If you need an ID, please register it with Lotus.
*/
#define SCHEDAPPLID_ORGANIZER2X	0x0001
#define SCHEDAPPLID_ORGANIZER4X	0x0002
#define SCHEDAPPLID_OV			0x0003


/* Define the maximum number of schedule entries allowed per note item.
** Calculated from maximum size of a note item (MAXONESEGSIZE) minus the size
** of a sched list,  divided by the size of a sched entry.  Subtract 100 of

⌨️ 快捷键说明

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