📄 nif.h
字号:
is defined, the values follow each other, in the order in which
the bits are listed here. This portion repeats for as many
index entries as are requested.
*/
/* Fixed length stuff */
#define READ_MASK_NOTEID 0x00000001L /* NOTEID of entry */
#define READ_MASK_NOTEUNID 0x00000002L /* UNID of entry */
#define READ_MASK_NOTECLASS 0x00000004L /* WORD of "note class" */
#define READ_MASK_INDEXSIBLINGS 0x00000008L /* DWORD/WORD of # siblings of entry */
#define READ_MASK_INDEXCHILDREN 0x00000010L /* DWORD/WORD of # direct children of entry */
#define READ_MASK_INDEXDESCENDANTS 0x00000020L /* DWORD/WORD of # descendants below entry */
#define READ_MASK_INDEXANYUNREAD 0x00000040L /* WORD of TRUE if "unread" or */
/* "unread" descendants; else FALSE */
#define READ_MASK_INDENTLEVELS 0x00000080L /* WORD of # levels that this */
/* entry should be indented in */
/* a formatted view. */
/* For category entries: */
/* # sub-levels that this */
/* category entry is within its */
/* Collation Descriptor. Used */
/* for multiple-level category */
/* columns (backslash-delimited). */
/* "0" for 1st level in this column, etc. */
/* For response entries: */
/* # levels that this response */
/* is below the "main note" level. */
/* For normal entries: 0 */
#define READ_MASK_SCORE 0x00000200L /* Relavence "score" of entry */
/* (only used with FTSearch). */
#define READ_MASK_INDEXUNREAD 0x00000400L /* WORD of TRUE if this entry (only) "unread" */
/* Stuff returned only once at beginning of return buffer */
#define READ_MASK_COLLECTIONSTATS 0x00000100L /* Collection statistics (COLLECTIONSTATS/COLLECTIONSTATS16) */
/* Variable length stuff */
#define READ_MASK_INDEXPOSITION 0x00004000L /* Truncated COLLECTIONPOSITION/COLLECTIONPOSITION16 */
#define READ_MASK_SUMMARYVALUES 0x00002000L /* Summary buffer w/o item names */
#define READ_MASK_SUMMARY 0x00008000L /* Summary buffer with item names */
/* Structures which are used by NIFGetCollectionData to return data
about the collection. NOTE: If the COLLECTIONDATA structure changes,
nifods.c must change as well. */
/* Definitions which are used by NIFGetCollectionData to return data about the collection. */
#define PERCENTILE_COUNT 11
#define PERCENTILE_0 0
#define PERCENTILE_10 1
#define PERCENTILE_20 2
#define PERCENTILE_30 3
#define PERCENTILE_40 4
#define PERCENTILE_50 5
#define PERCENTILE_60 6
#define PERCENTILE_70 7
#define PERCENTILE_80 8
#define PERCENTILE_90 9
#define PERCENTILE_100 10
typedef struct
{
DWORD DocCount; /* Total number of documents in the collection */
DWORD DocTotalSize; /* Total number of bytes occupied by the documents in the collection */
DWORD BTreeLeafNodes; /* Number of B-Tree leaf nodes for this index. */
WORD BTreeDepth; /* Number of B-tree levels for this index. */
WORD Spare; /* Unused */
DWORD KeyOffset[PERCENTILE_COUNT]; /* Offset of ITEM_VALUE_TABLE for each 10th-percentile key value */
/* A series of ITEM_VALUE_TABLEs follows this structure. */
} COLLECTIONDATA;
/* Flag in index entry's NOTEID to indicate (ghost) "category entry" */
/* Note: this relies upon the fact that NOTEID_RESERVED is high bit! */
#define NOTEID_CATEGORY 0x80000000L /* Bit 31 -> (ghost) "category entry" */
#define NOTEID_CATEGORY_TOTAL 0xC0000000L /* Bit 31+30 -> (ghost) "grand total entry" */
#define NOTEID_CATEGORY_INDENT 0x3F000000L /* Bits 24-29 -> category indent level within this column */
#define NOTEID_CATEGORY_ID 0x00FFFFFFL /* Low 24 bits are unique category # */
/* SignalFlags word returned by NIFReadEntries and V4+ NIFFindByKey */
#define SIGNAL_DEFN_ITEM_MODIFIED 0x0001
/* At least one of the "definition" */
/* view items ($FORMULA, $COLLATION, */
/* or $FORMULACLASS) has been modified */
/* by another user since last ReadEntries. */
/* Upon receipt, you may wish to */
/* re-read the view note if up-to-date */
/* copies of these items are needed. */
/* Upon receipt, you may also wish to */
/* re-synchronize your index position */
/* and re-read the rebuilt index. */
/* Signal returned only ONCE per detection */
#define SIGNAL_VIEW_ITEM_MODIFIED 0x0002
/* At least one of the non-"definition" */
/* view items ($TITLE,etc) has been */
/* modified since last ReadEntries. */
/* Upon receipt, you may wish to */
/* re-read the view note if up-to-date */
/* copies of these items are needed. */
/* Signal returned only ONCE per detection */
#define SIGNAL_INDEX_MODIFIED 0x0004
/* Collection index has been modified */
/* by another user since last ReadEntries. */
/* Upon receipt, you may wish to */
/* re-synchronize your index position */
/* and re-read the modified index. */
/* Signal returned only ONCE per detection */
#define SIGNAL_UNREADLIST_MODIFIED 0x0008
/* Unread list has been modified */
/* by another window using the same */
/* hCollection context */
/* Upon receipt, you may wish to */
/* repaint the window if the window */
/* contains the state of unread flags */
/* (This signal is never generated */
/* by NIF - only unread list users) */
#define SIGNAL_DATABASE_MODIFIED 0x0010
/* Collection is not up to date */
#define SIGNAL_MORE_TO_DO 0x0020
/* End of collection has not been reached */
/* due to buffer being too full. */
/* The ReadEntries should be repeated */
/* to continue reading the desired entries. */
#define SIGNAL_VIEW_TIME_RELATIVE 0x0040
/* The view contains a time-relative formula */
/* (e.g., @Now). Use this flag to tell if the */
/* collection will EVER be up-to-date since */
/* time-relative views, by definition, are NEVER */
/* up-to-date. */
#define SIGNAL_NOT_SUPPORTED 0x0080
/* Returned if signal flags are not supported */
/* This is used by NIFFindByKeyExtended when it */
/* is talking to a pre-V4 server that does not */
/* support signal flags for FindByKey */
/* Mask that defines all "sharing conflicts", which are cases when
the database or collection has changed out from under the user. */
#define SIGNAL_ANY_CONFLICT (SIGNAL_DEFN_ITEM_MODIFIED | \
SIGNAL_VIEW_ITEM_MODIFIED | \
SIGNAL_INDEX_MODIFIED | \
SIGNAL_UNREADLIST_MODIFIED | \
SIGNAL_DATABASE_MODIFIED)
/* Mask that defines all "sharing conflicts" except for SIGNAL_DATABASE_MODIFIED.
This can be used in combination with SIGNAL_VIEW_TIME_RELATIVE to tell if
the database or collection has truly changed out from under the user or if the
view is a time-relative view which will NEVER be up-to-date. SIGNAL_DATABASE_MODIFIED
is always returned for a time-relative view to indicate that it is never up-to-date. */
#define SIGNAL_ANY_NONDATA_CONFLICT (SIGNAL_DEFN_ITEM_MODIFIED | \
SIGNAL_VIEW_ITEM_MODIFIED | \
SIGNAL_INDEX_MODIFIED | \
SIGNAL_UNREADLIST_MODIFIED)
/* NIFFindByKey "find" flags */
#define FIND_PARTIAL 0x0001 /* Match only initial characters */
/* ("T" matches "Tim") */
#define FIND_CASE_INSENSITIVE 0x0002 /* Case insensitive */
/* ("tim" matches "Tim") */
#define FIND_RETURN_DWORD 0x0004 /* Input/Output is DWORD COLLECTIONPOSITION */
#define FIND_ACCENT_INSENSITIVE 0x0008 /* Accent insensitive (ignore diacritical marks */
#define FIND_UPDATE_IF_NOT_FOUND 0x0020 /* If key is not found, update collection */
/* and search again */
/* At most one of the following four flags should be specified */
#define FIND_LESS_THAN 0x0040 /* Find last entry less than the key value */
#define FIND_FIRST_EQUAL 0x0000 /* Find first entry equal to the key value (if more than one) */
#define FIND_LAST_EQUAL 0x0080 /* Find last entry equal to the key value (if more than one) */
#define FIND_GREATER_THAN 0x00C0 /* Find first entry greater than the key value */
#define FIND_EQUAL 0x0800 /* Qualifies LESS_THAN and GREATER_THAN to mean */
/* LESS_THAN_OR_EQUAL and GREATER_THAN_OR_EQUAL */
#define FIND_COMPARE_MASK 0x08C0 /* Bitmask of the comparison flags defined above */
#define FIND_RANGE_OVERLAP 0x0100 /* Overlapping ranges match, and values within a range match */
#define FIND_RETURN_ANY_NON_CATEGORY_MATCH 0x0200
/* Return First Match at bottom level of
Categorized view (Doesn't have
to be first of duplicates */
#define FIND_NONCATEGORY_ONLY 0x0400 /* Only match non-category entries */
/* NIF public entry points */
STATUS LNPUBLIC NIFOpenCollection (DBHANDLE hViewDB, DBHANDLE hDataDB,
NOTEID ViewNoteID, WORD OpenFlags,
HANDLE hUnreadList,
HCOLLECTION far *rethCollection,
NOTEHANDLE far *rethViewNote, UNID far *retViewUNID,
HANDLE far *rethCollapsedList,
HANDLE far *rethSelectedList);
STATUS LNPUBLIC NIFCloseCollection (HCOLLECTION hCollection);
STATUS LNPUBLIC NIFUpdateCollection (HCOLLECTION hCollection);
STATUS LNPUBLIC NIFOpenCollectionWithUserNameList (DBHANDLE hViewDB, DBHANDLE hDataDB,
NOTEID ViewNoteID, WORD OpenFlags,
HANDLE hUnreadList,
HCOLLECTION far *rethCollection,
NOTEHANDLE far *rethViewNote, UNID far *retViewUNID,
HANDLE far *rethCollapsedList,
HANDLE far *rethSelectedList,
HANDLE nameList);
STATUS LNPUBLIC NIFReadEntries (HCOLLECTION hCollection, COLLECTIONPOSITION far *IndexPos,
WORD SkipNavigator, DWORD SkipCount,
WORD ReturnNavigator, DWORD ReturnCount,
DWORD ReturnMask,
HANDLE far *rethBuffer, WORD far *retBufferLength,
DWORD far *retNumEntriesSkipped,
DWORD far *retNumEntriesReturned,
WORD far *retSignalFlags);
STATUS LNPUBLIC NIFSetCollation(HCOLLECTION hCollection, WORD CollationNum);
STATUS LNPUBLIC NIFGetCollation(HCOLLECTION hCollection, WORD *retCollationNum);
STATUS LNPUBLIC NIFLocateNote (HCOLLECTION hCollection, COLLECTIONPOSITION far *IndexPos, NOTEID NoteID);
STATUS LNPUBLIC NIFFindByKey (HCOLLECTION hCollection, void far *KeyBuffer,
WORD FindFlags,
COLLECTIONPOSITION far *retIndexPos,
DWORD far *retNumMatches);
STATUS LNPUBLIC NIFFindByName (HCOLLECTION hCollection, const char far *Name, WORD FindFlags,
COLLECTIONPOSITION far *retIndexPos,
DWORD far *retNumMatches);
STATUS LNPUBLIC NIFFindDesignNote (DBHANDLE hFile, const char far *Name, WORD Class, NOTEID far *retNoteID);
#define NIFFindView(hFile,Name,retNoteID) NIFFindDesignNoteExt(hFile,Name,NOTE_CLASS_VIEW, DFLAGPAT_VIEWS_AND_FOLDERS, retNoteID, 0)
#define NIFFindDesignNoteByName(hFile,Name,retNoteID) NIFFindDesignNote(hFile,Name,NOTE_CLASS_ALL,retNoteID) /* Only for V2 backward compatibility */
STATUS LNPUBLIC NIFFindPrivateDesignNote (DBHANDLE hFile, const char far *Name, WORD Class, NOTEID far *retNoteID);
#define NIFFindPrivateView(hFile,Name,retNoteID) NIFFindPrivateDesignNote(hFile,Name,NOTE_CLASS_VIEW,retNoteID)
STATUS LNPUBLIC NIFGetCollectionData (HCOLLECTION hCollection,
HANDLE far *rethCollData);
#define FIND_DESIGN_NOTE_PARTIAL 1 /* Find design note with a partial match. This means that
when you are looking for "Inbox" it will also
match on "($Inbox)". And when you are looking
for "All Escalated Bugs" it will match
"QA\All Escalated Bugs" */
STATUS LNPUBLIC NIFFindDesignNoteExt (DBHANDLE hFile, const char far *Name, WORD Class, const char *pszFlagsPattern, NOTEID far *retNoteID, DWORD Options);
void LNPUBLIC NIFGetLastModifiedTime (HCOLLECTION hCollection,
TIMEDATE far *retLastModifiedTime);
#ifdef __cplusplus
}
#endif
#endif
#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
#pragma datamodel(pop)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -