COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) GeoWorks 1990 -- All Rights Reserved

PROJECT:	PC GEOS
MODULE:		Kernel Interface Definitions -- Drive module
FILE:		drive.def

AUTHOR:		Adam de Boor, Apr 22, 1990

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	Adam	4/22/90		Initial revision


DESCRIPTION:
	Definitions for users of the Drive family of functions in the kernel.
		
	$Id: drive.def,v 1.1 97/04/04 14:24:04 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

SetDef	__DRIVE

StartKernel

DRIVE_MAX_DRIVES	equ	255	; Maximum number of drives supported
					;  by the Drive module. The largest
					;  drive number that may be passed to
					;  any Drive function is
					;  DRIVE_MAX_DRIVES-1, since drive
					;  numbers are 0-origin.
;DRIVE_NAME_MAX_LENGTH	equ	32	; The longest a drive name can be
;			now defined in file.def to avoid having to include
;			drive.def everywhere

global	DriveGetStatus:appfar
global 	DriveGetExtStatus:far
global	DriveGetDefaultMedia:far
global	DriveTestMediaSupport:far
global	DriveGetName:far

;-

global DRIVEGETSTATUS:far
global DRIVEGETEXTSTATUS:far
global DRIVEGETDEFAULTMEDIA:far
global DRIVETESTMEDIASUPPORT:far
global DRIVEGETNAME:far

;--------------------------------------------------------------------------
;	GEOS Media Descriptors
;--------------------------------------------------------------------------

MediaType		etype	byte, 0
MEDIA_NONEXISTENT	enum	MediaType	; used as error value
MEDIA_160K		enum	MediaType
MEDIA_180K		enum	MediaType
MEDIA_320K		enum	MediaType
MEDIA_360K		enum	MediaType
MEDIA_720K		enum	MediaType
MEDIA_1M2		enum	MediaType
MEDIA_1M44		enum	MediaType
MEDIA_2M88		enum	MediaType
MEDIA_FIXED_DISK	enum	MediaType
MEDIA_CUSTOM		enum	MediaType
MEDIA_SRAM		enum	MediaType
MEDIA_ATA		enum	MediaType
MEDIA_FLASH		enum	MediaType
if PZ_PCGEOS
MEDIA_640K		enum	MediaType
MEDIA_1M232		enum	MediaType
endif

;--------------------------------------------------------------------------
;			Drive status
;--------------------------------------------------------------------------

;values for DS_TYPE
;DO NOT CHANGE ENUM ORDER, code may exist that relies on it

DriveType 		etype byte
    DRIVE_5_25		enum	DriveType
    DRIVE_3_5		enum	DriveType
    DRIVE_FIXED		enum	DriveType
    DRIVE_RAM		enum	DriveType
    DRIVE_CD_ROM	enum	DriveType
    DRIVE_8		enum	DriveType
    DRIVE_PCMCIA	enum	DriveType
    DRIVE_UNKNOWN	enum	DriveType, 0xf

; Status byte returned by DriveGetStatus
DriveStatus record
    DS_PRESENT:1,		; Set if physical drive exists
    DS_MEDIA_REMOVABLE:1,	; Set if disk can be removed from the drive
    DS_NETWORK:1,		; Set if drive is on the network (or accessed
				;  via network protocols), so disk cannot be
				;  formatted or copied.
    :1,
    DS_TYPE DriveType:4	; Type of drive
DriveStatus end

; Status word returned by DriveGetExtStatus
DriveExtendedStatus	record
    DES_LOCAL_ONLY:1		; Set if device cannot be viewed over a network.
    DES_READ_ONLY:1		; Set if *device* is read-only, so no disks
				;  can ever be written in it.
    DES_FORMATTABLE:1		; Set if disks can be formatted in the drive.
				;  If set, implies disks can be copied in
				;  the drive using DiskCopy.
    DES_ALIAS:1			; Set if drive is actually an alias for
				;  a path on another drive (via the "SUBST"
				;  command, usually). (NOT IMPLEMENTED)
    DES_BUSY:1			; Set if drive is busy for an extended period
				;  of time (e.g. when disk is being formatted)
    DES_EXTERNAL DriveStatus:8	; Externally-visible status flags.
DriveExtendedStatus	end

EndKernel
