;	SCCSID = @(#)inbuf.inc	6.3 92/02/20
BREAK	<inbuf structure>
;**** file: inbuf.inc
;
;  This file contains various structure used by api calls.
;  So far two structures are defined:
;	inbuf -- the FileInfoBuf structure for DosQueryFileInfo/DosSetFileInfo
;					       DosQueryPathInfo/DosSetPathInfo
;	fsibuf -- the FSInfoBuf structure for DosQFSInfo
;
;**	FileInfoBuf structure
;
;	This structure is used with the QueryInfo calls
;	infolevels 1 and 2. The inbuf_cblist field is not used
;	for infolevel 1.
;
;  Change activity:
;  ----------------
;  75591 11/18/93 Skip Nizinski  Increase size of fsibuf2 structure to
;                                contain other time, date. and size fields
;                                from the dirent. This is needed to be
;                                compatible with native dos (int 21-4e
;                                findfirst, and int 21-4f findnext).
;

inbuf	STRUC
    inbuf_cdate		dw	?	; file date of creation
    inbuf_ctime		dw	?	; file date of creation
    inbuf_ladate	dw	?	; file date of last access
    inbuf_latime	dw	?	; file date of last access
    inbuf_lwdate	dw	?	; file date of last write
    inbuf_lwtime	dw	?	; file date of last write
    inbuf_size		dd	?	; file end of data
    inbuf_alloc		dd	?	; file allocation
    inbuf_attr		dw	?	; file attribute
    inbuf_cblist	dd	?	; Size of FEAlist for object
inbuf	ENDS

;
; The SetInfo calls use a buffer of size (inbuf_cblist - inbuf_cdate)
;
SETINFOBUFSIZE		EQU	(inbuf_cblist - inbuf_cdate)
SETDATEBUFSIZE		EQU	(inbuf_size - inbuf_cdate)


;
; Return data structure for DosQFsInfo level 1
;
fsibuf	STRUC
    fsibuf_fsID		dd	?	; file system ID
    fsibuf_csClust	dd	?	; sectors per cluster
    fsibuf_ctAlloc	dd	?	; number of total allocation units
    fsibuf_caAlloc	dd	?	; number of available allocation units
    fsibuf_cbSector	dw	?	; bytes per sector
fsibuf	ENDS

MAXLABLEN	equ	11		; maximum length of volume label

;
; return structure of w_QFsInfo level 2 for FAT drive
;
fsibuf2 struc
fsibuf2_ulVSN		dd	?	; volume serial number
fsibuf2_cbVolLabel	db	?	; length of volume label
fsibuf2_szVolLabel	db	MAXLABLEN+1 dup (?) ; volume label
fsibuf2_time            dw      ?       ; 75591
fsibuf2_date            dw      ?       ; 75591
fsibuf2_size_l          dw      ?       ; 75591
fsibuf2_size_h          dw      ?       ; 75591
fsibuf2 ends


; The calls for QFileInfo, QPathInfo have several levels of information that
; can be returned to the user. We use the following equates to distinguish
; between them.
; The first three infolevels are also used by FindFirst/FindNext.
; Infolevels 5 and 6 are only used by QPathInfo.
;
QINFOLEV_DATE_TIME	EQU	1	; date/time/size/attr info for object
QINFOLEV_EASIZ		EQU	2	; date/time/size/attr + FEA size for object
QINFOLEV_SUB_FEAL	EQU	3	; Subset of FEAlist (based on GEAlist)
FILEINFOLEV_SUB_FEAL	EQU	4	;   "      "    "  (Used by FindFirst)
                                        ; Return error if no EAs exist
QINFOLEV_FULL_FEAL	EQU	4	; Full FEA list for object
QINFOLEV_FULL_FEAL5	EQU	5	; Full FEA list for object if EAs exist
QINFOLEV_TRANSPATH	EQU	5	; Transform the path and canonicalize ir
QINFOLEV_PATHSYNTAX	EQU	6	; Verify the syntax of the path is valid for the file system
QINFOLEV_CSPRSRVNG	EQU	7	; Return case-perserving path if there is one(HPFS)
QINFOLEV_FULL_FEAL8	EQU	8	; Full FEA list for object if EAs exist
QFILEINFOLEV_MAX	EQU	QINFOLEV_FULL_FEAL5  ; Max value for QFILE infolevel
QPATHINFOLEV_MAX	EQU	QINFOLEV_FULL_FEAL8  ; Max value for QPATH infolevel


; The calls for SetFileInfo, SetPathInfo have several levels of information
; that can be returned to the user. We use the following equates to distinguish
; between them.
;
SINFOLEV_DATE_TIME	EQU	1	; Set date/time/DosAttr
SINFOLEV_FEAL		EQU	2	; Set FEA list
SINFOLEV_MAX		EQU	SINFOLEV_FEAL	; Max value for "set" infolevel

;
; Infolevels for DosQFsInfo and DosSetFsInfo
;
FSINFOLEV_ALLOC		EQU	1	; get disk allocation info (not valid
					; for DosSetFsInfo)
FSINFOLEV_LABEL		EQU	2	; get volume label and VSN
FSINFOLEV_MAX		EQU	2	; Max. infolevel for FSInfo

;
;
; Infolevels for DosEnumAttribute
;
ENUMEA_LEVEL_NO_VALUE	EQU	1	; FEA without value

;
; Reference types for DosEnumAttribute
;
ENUMEA_REFTYPE_FHANDLE	       EQU     0       ; file handle
ENUMEA_REFTYPE_PATH	       EQU     1       ; path name
ENUMEA_REFTYPE_MAX	       EQU     ENUMEA_REFTYPE_PATH

;
; Infolevels for DosFSCtl
;
FSCTL_ERRORINFO	       EQU     1       ; return new error code information
FSCTL_MAXEASIZE	       EQU     2       ; return maximum EA size supported
FSCTL_MAXLEVEL	       EQU     FSCTL_MAXEASIZE
