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

	Copyright (c) GeoWorks 1990 -- All Rights Reserved

PROJECT:	PC GEOS
MODULE:		Include -- PCCom Library Definitions
FILE:		pccom.def

AUTHOR:		Cassie Hartzog, Nov 15, 1993

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	Cassie	11/15/93	Initial revision


DESCRIPTION:
	Definitions for users of the pccom library.
		
	$Id: pccom.def,v 1.1 97/04/04 14:25:00 newdeal Exp $

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

SetDef	__PCCOM

StartLibrary	pccom

;------------------------------------------------------------------------------
;			 COMPILER DIRECTIVES
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
;			 CONSTANTS
;------------------------------------------------------------------------------

PCComInitFlags 	record
    PCCIF_NOTIFY_OUTPUT:1			; notify caller of output
    PCCIF_NOTIFY_EXIT:1				; notify caller of remote exit
    :13
    PCCIF_IR_STREAM:1				; use ircomm instead
						; of serial
PCComInitFlags 	end

PCComReturnType etype byte
    PCCRT_NO_ERROR	    	    	    enum PCComReturnType
    PCCRT_CANNOT_LOAD_SERIAL_DRIVER  	    enum PCComReturnType
    PCCRT_CANNOT_CREATE_THREAD	    	    enum PCComReturnType
    PCCRT_CANNOT_ALLOC_STREAM   	    enum PCComReturnType
    PCCRT_ALREADY_INITIALIZED   	    enum PCComReturnType
	;
	; A connection has already been established.

    PCCRT_IN_USE		   	    enum PCComReturnType
	;
	; A different application has already initialized a connection,
	; and no other connections may be made until it exits PCCom.

    PCCRT_BUSY				    enum PCComReturnType
    PCCRT_NOT_INITIALIZED		    enum PCComReturnType
    PCCRT_MEMORY_ALLOC_ERROR		    enum PCComReturnType
    PCCRT_BAD_DEST_PATH			    enum PCComReturnType

	;
	; returned from PCComStatus to indicate the status of an
	; active file transfer
	;
    PCCRT_FILE_STARTING			    enum PCComReturnType
    PCCRT_TRANSFER_CONTINUES		    enum PCComReturnType
    PCCRT_FILE_COMPLETE			    enum PCComReturnType
    PCCRT_TRANSFER_COMPLETE		    enum PCComReturnType
    PCCRT_COMMAND_ABORTED		    enum PCComReturnType

    PCCRT_TOO_MUCH_OUTPUT                   enum PCComReturnType
	;
	; We received more stuff than we could fit in a 64K block
	; sorry..
	;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; When a file transfer is aborted, this code will give a more
; detailed reason.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PCComAbortType	etype byte
PCCAT_DEFAULT_ABORT			enum	PCComAbortType, 0
	; Default value.  People shouldn't be using these abort
	; types unless they received a PCCRT_COMMAND_ABORTED return
	; type.
	;
PCCAT_CONNECTION_LOST			enum	PCComAbortType
	; We've lost connection after many time-outs and retries.
	;
PCCAT_FILE_NOT_FOUND			enum	PCComAbortType, 2
	; Reasons: mispelling or the file just doesn't exist.
	;
PCCAT_PATH_NOT_FOUND			enum	PCComAbortType, 3
	; Reasons: mispelling or the path just doesn't exist.
	;
PCCAT_INVALID_PATH_NAME			enum	PCComAbortType,	4
	; Reasons: pathname doesn't conform to given standard.
	;
PCCAT_ACCESS_DENIED			enum	PCComAbortType, 5
	; Reasons: couldn't access the volume/file, but the specific
	; reason has not been identified.
	;
PCCAT_INVALID_FILE_NAME			enum	PCComAbortType,	6
	; Reasons: filename doesn't conform to given standard.
	;
PCCAT_FILE_IN_USE			enum	PCComAbortType, 7
	; Reasons: file is currently opened by another application.
	;
PCCAT_VOLUME_OUT_OF_SPACE		enum	PCComAbortType, 8
	; Reasons: no more space available on the volume.
	;
PCCAT_VOLUME_UNAVAILABLE		enum	PCComAbortType, 9
	; Reasons: couldn't locate the target volume/disk has been
	; temporarily disabled; eg. the disk was removed from the disk
	; drive.
	;
PCCAT_FILE_READ_ONLY			enum	PCComAbortType, 10
	; Reasons: file has read-only status, and an attempt has been
	; made to write to it.
	;
PCCAT_SHORT_READ_WRITE			enum	PCComAbortType, 11
	; Reasons: a FileRead or FileWrite has failed to read/write
	; the given number of bytes.
	;
PCCAT_INVALID_DRIVE			enum	PCComAbortType, 15
	; Reasons: target drive letter doesn't match with any
	; available active drives.
	;
PCCAT_VOLUME_WRITE_PROTECTED		enum	PCComAbortType, 19
	; Reasons: the volume medium has been write-protected, and an
	; attempt to write to the medium failed.
	;
PCCAT_EXTERNAL_ABORT			enum	PCComAbortType, 20
	; An abort was initiated due to external causes, eg. user
	; intervention.  It's not an internal abort as might be the
	; case of file system errors.
	;
PCCAT_INTERNAL_RESERVED_ABORT_TYPE	enum	PCComAbortType, 21
	; The reserved abort is because we don't want to have to quote
	; abort type data (and 95h is the quote char).  This is a
	; placeholder to maintain symmetry.
	;
PCCAT_FILE_IS_VOLUME			enum	PCComAbortType,	22
	; The filename is actually the label of the volume.
	; 
PCCAT_FILE_IS_DIRECTORY			enum	PCComAbortType,	23
	; The filename is actually the name of a directory.
	; 
PCCAT_DIRECTORY_NAME_EXISTS		enum	PCComAbortType, 24
	; An attempt to create a directory failed because the given
	; name is currently used: another file or directory with the
	; same name exists. 
	;
PCCAT_TOO_MANY_DIRECTORIES		enum	PCComAbortType, 25
	; An attemp to create a directory failed because there are
	; currently more directories in the root directory then DOS
	; can handle.
	;
PCCAT_DATA_BUFFER_FULL			enum	PCComAbortType, 26
	; We received a PCComData block, but don't have space to
	; accept it - either nobody's listening or they are busy and
	; the buffer filled
	;
PCCAT_MEMORY_ALLOC_FAILURE		enum	PCComAbortType, 27
	; We needed to allocate a block of memory and couldn't
	;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The following abort code are returned by the remote system.  They
; are analogous to the above code.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PCCAT_REMOTE_ABORT		enum	PCComAbortType, 80h
	; We couldn't get a more informative abort code from the
	; remote.
	;
PCCAT_REMOTE_CONNECTION_LOST	enum	PCComAbortType
	; Yes, you're right.  We wouldn't actually receive this code,
	; but we want to be symmetric to simplify implementation -
	; just mark the MSB for abort code coming from the remote.
	;
PCCAT_REMOTE_FILE_NOT_FOUND		enum	PCComAbortType, 82h
PCCAT_REMOTE_PATH_NOT_FOUND		enum	PCComAbortType, 83h
PCCAT_REMOTE_INVALID_PATH_NAME		enum	PCComAbortType,	84h
PCCAT_REMOTE_ACCESS_DENIED		enum	PCComAbortType, 85h
PCCAT_REMOTE_INVALID_FILE_NAME		enum	PCComAbortType,	86h
PCCAT_REMOTE_FILE_IN_USE		enum	PCComAbortType, 87h
PCCAT_REMOTE_VOLUME_OUT_OF_SPACE	enum	PCComAbortType, 88h
PCCAT_REMOTE_VOLUME_UNAVAILABLE		enum	PCComAbortType, 89h
PCCAT_REMOTE_FILE_READ_ONLY		enum	PCComAbortType, 8ah
PCCAT_REMOTE_SHORT_READ_WRITE		enum	PCComAbortType, 8bh
PCCAT_REMOTE_INVALID_DRIVE		enum	PCComAbortType, 8fh
PCCAT_REMOTE_VOLUME_WRITE_PROTECTED	enum	PCComAbortType, 93h
PCCAT_REMOTE_EXTERNAL_ABORT		enum	PCComAbortType, 94h

PCCAT_REMOTE_RESERVED_ABORT_TYPE	enum	PCComAbortType, 95h
	; The reserved abort is because we don't want to have to quote
	; abort type data (and 95h is the quote char)
PCCAT_REMOTE_FILE_IS_VOLUME		enum	PCComAbortType,	96h
PCCAT_REMOTE_FILE_IS_DIRECTORY		enum	PCComAbortType,	97h
PCCAT_REMOTE_DIRECTORY_NAME_EXISTS	enum	PCComAbortType, 98h
PCCAT_REMOTE_TOO_MANY_DIRECTORIES	enum	PCComAbortType, 99h
PCCAT_REMOTE_DATA_BUFFER_FULL		enum	PCComAbortType, 9ah
PCCAT_REMOTE_MEMORY_ALLOC_FAILURE	enum	PCComAbortType, 9bh

PCComFullReturnType struct
	;
    PCCFRT_returnType	PCComReturnType
	; Return values after an issued PCCom command.
	;
    PCCFRT_abortType	PCComAbortType
	; If PCCRS_returnType = PCCRT_ABORT_COMMAND, then this field
	; will contain the reason for the abortion.  Else, it's
	; default value should be PCCAT_NO_ERROR.
	;
PCComFullReturnType ends


PCComDirDetailLevel	etype word
    PCCDDL_LOW_DETAIL			    enum PCComDirDetailLevel, 'S'
    PCCDDL_MID_DETAIL			    enum PCComDirDetailLevel, 'M'
    PCCDDL_FULL_DETAIL			    enum PCComDirDetailLevel, 'L'
	;
	; passed to PCComDir to indicate what detail level to request
	;

StatusReply	struct
    SR_fileSize		dword
    SR_bytesXfrd	dword
StatusReply	ends
	;
	; Filled in by PCComStatus


PCComFileSelectorClass	class	GenFileSelectorClass
    PCFSI_currentRemotePath	PathName
    PCFSI_driveListing		hptr
    PCFSI_currentVolume		FileLongName
PCComFileSelectorClass	endc


;------------------------------------------------------------------------------
;			 INTERFACE DEFINITION
;------------------------------------------------------------------------------

global	PCCOMINIT:far

; IF PCCOM IS SERIAL_DRIVER_BASED:
;
;	Desc:	Initialize the serial port for communication with remote site.
;	Pass:	on stack:
;		SerialPortNum - port  (-1 to use default, Com2)
;		SerialBaud - baud rate  (-1 to use default, 9600)
;		amount of time to wait for port to become ready
;		callback to send notifications to if so desired
;		PCComInitFlags - which notifications to send.
;
;	Return:	PCComReturnType
;
; IF PCCOM IS SOCKET_BASED:
;
;	Desc:	Create a socket to be used on the server side.  Wait for
;		connection.
;	Pass:	ax:cx	= call back optr
;		bp	= PCCom init flags
;	Return:	PCComReturnType
;

global	PCCOMEXIT:far
;	Desc:	Close the stream and restore serial port to its previous state
;	Pass:	nothing
;	Return:	PCComReturnType
;

global	PCCOMABORT:far
;	Desc:	Abort the current operation.
;	Pass:	nothing
;	Return:	nothing
;

global	PCCOMGET:far
;	Desc:	Start getting a file from the remote.
;	Pass:	on stack
;		hptr - data block.  Contains null terminated geos-char dos
;			filename (may contain wildcard chars) to get.  This
;			must contain a filename.  It may also contain
;			a path.  If the path is absolute, it must
;			start with a drive letter.  If the path is
;			relative it is relative to the server's current
;			working directory.  This directory may be
;			changed via the PCComCD routine.  Examples:
;			"*.*" - get everything from the server's cwd.
;			"a:\temp\foo" - get the file foo from a:\temp
;			"..\enstrunk\bar*" - get all files satisfing
;				"bar*" from the cwd's parent's
;				enstrunk directory.
;			"\command.com" - this is treated as a relative
;				pathname since it doesn't start with a
;				drive name, so it will attempt to get
;				a file called "command.com" from the
;				server's cwd.
;
;			After the transfer is complete, this block
;			will contain a null terminated list of
;			geos-char DOS filenames received.
;		word - number of bytes between reports or 0 for no reports
;		optr - object to notify of completion/status 
;		word - Message to send on completion/status
;			method will receive:
;				cl - PCComReturnType
;				ch - PCComAbortType
;				dxbp - bytes of this file transferred
;		fptr - geos-char dest dos path/file name.  This is
;			mainly a path specifier.  The path must end
;			with a slash char '\\'.  If the path is
;			absolute, it must start with a drive letter.
;			If the path is relative it is relative to the
;			cwd path of the newly-spawned pccom thread.
;			This is inherited from whatever thread called
;			PCComInit.  If a filename is included 
;			only the first file in a multi-file transfer
;			will be renamed.  Wildcard characters are not
;			allowed.  Examples:
;			"" - put all files in the cwd with their normal
;				names
;			"a:\temp\" - put all files in a:\temp with
;				their normal names
;			"..\buddy" - put all files in the parent
;				directory of the cwd, and rename the
;				first file to "buddy"
;			If a bad path is specified you will get a
;			PCCRT_NO_ERROR back from this call, but you
;			will get a PCCRT_COMMAND_ABORTED in your first
;			status message.
;
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;

global	PCCOMSEND:far
;	Desc:	Start sending a file to the remote
;	Pass:	on stack
;		fptr - Contains null terminated geos-char dos filename
;			(may contain wildcard chars) to send.  This
;			must contain a filename.  It may also contain
;			a path.  If the path is absolute, it must
;			start with a drive letter.  If the path is
;			relative it is relative to the cdw of
;			the newly-spawned pccom thread.  This is
;			inherited from whatever thread called
;			PCComInit.  Examples:
;			"*.*" - send everything from pccom's cwd.
;			"a:\temp\foo" - send the file foo from a:\temp
;			"..\enstrunk\bar*" - send all files satisfing
;				"bar*" from the cwd's parent's
;				enstrunk directory.
;			"\command.com" - this is treated as a relative
;				pathname since it doesn't start with a
;				drive name, so it will attempt to send
;				a file called "command.com" from
;				pccom's cwd.
;		word - number of bytes between reports or 0 for no reports
;		optr - object to notify of completion/status
;		word - Message to send on completion/statuss
;			method will receive:
;				cl - PCComReturnType
;				ch - PCComAbortType
;				dxbp - bytes of this file transferred
;		fptr - geos-char DOS dest path/file name.  This is
;			primarily a path specifier.  The path must end
;			with a slash char '\\'.  If the path is
;			absolute, it must start with a drive letter.
;			If the path is relative it is relative to the
;			server's cwd.	This directory may be changed
;			by using the PCComCD routine If a filename is
;			included only the first file in a multi-file
;			transfer will be renamed.  Wildcard characters
;			are not allowed.  Examples:
;			"" - put all files in the cwd with their normal
;				names
;			"a:\temp\" - put all files in a:\temp with
;				their normal names
;			"..\buddy" - put all files in the parent
;				directory of the cwd, and rename the
;				first file to "buddy"
;
;	Return	 PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_BAD_DEST_PATH
;

global	PCCOMSTATUS:far
;	Desc:	Get the status of the current transfer.
;	Pass:	on stack
;		fptr - buffer for StatusReply struct
;		fptr - buffer for current transfers pathname
;			(PATH_BUFFER_SIZE long!)
;	Return:	PCComFullReturnType
;			PCCRT_FILE_STARTING
;			PCCRT_TRANSFER_CONTINUES
;			PCCRT_FILE_COMPLETE
;			PCCRT_TRANSFER_COMPLETE
;			PCCRT_COMMAND_ABORTED
;

global	PCCOMCD:far
;	Desc:	CD into directory on the remote.
;	Pass:	on stack
;		fptr - buffer (PATH_BUFFER_SIZE) for the null
;			terminated geos-char pathname.  (A null string
;			takes you to the server's startup directory.)
;			It can be absolute or relative.  If it is
;			absolute it must begin with a drive
;			specification.  If it is relative it is
;			relative to the server's cwd. Examples:
;			"c:\" - goes to the root dir of the C drive
;			"" - goes to the server's startup directory
;			"a:" - goes to the root dir of the A drive
;
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;			PCCRT_BAD_DEST_PATH
;

global	PCCOMFILEENUM:far
; 	Desc:	Act like a limited FileEnum, but fetch the data over
;		the serial line.
;
; 	Pass:	on stack
;		fptr.FileEnumParams
;		fptr.Handle - repository for created block
;		numNoFit - number of files that couldn't fit in the block.
;
; 	Return:	number of files that *did* fit in the block
;			else
;		-1 if error - use ThreadGetError to retrieve FileError
;


global	PCCOMREMARK:far
;	Desc:	Log a remark on the remote.
;	Pass:	on stack
;		fptr - to a buffer which contains a null terminated
;		       geos-char remark, up to PATH_BUFFER_SIZE long.
;		       Use the '\r' escape code to get a carriage return.
;
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED			
;


global	PCCOMPWD:far
;	Desc:	Retrieves the current path name on the remote
;		machine.
;	Pass:	on stack
;		fptr - 	buffer (PATH_BUFFER_SIZE) for the null
;		terminated upper-cased geos-char pathname.
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;			PCCRT_BAD_DEST_PATH
;


global	PCCOMMKDIR:far
;	Desc:	Make a new directory on the remote.
;	Pass:	on stack
;		fptr - to a buffer which contains a null terminated
;			geos char pathname.  This must contain a
;			dirname.  It may also contain a path.  If the
;			path is absolute, it must start with a drive
;			letter.  If the path is relative it is
;			relative to the server's current working
;			directory.  This directory may be changed via
;			the PCComCD routine.  Examples:
;			"a:\temp\foo" - creates a directory "foo" in
;				a:\temp
;			"..\enstrunk\bar" - creates a directory "bar"
;				in the cwd's parent's enstrunk
;				directory.
;			"\command.com" - this is undefined.  It may be
;				relative, absolute, or it may result
;				in an error.  Don't try it. 
;			If the directory already exists you will get a
;			PCCRT_BAD_DEST_PATH
;
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_BAD_DEST_PATH
;			PCCRT_COMMAND_ABORTED			
;


global	PCCOMGETFILESIZE:far
;	Desc:	Get the size of a specified file.
;	Pass:	on stack
;		fptr - to a dword buffer to hold the requested file
;			size.
;		fptr - to a buffer which contains a null terminated
;			geos-char DOS pathname.  This must contain a
;			filename.  It may also contain a path.  If the
;			path is absolute, it must start with a drive
;			letter.  If the path is relative it is
;			relative to the server's current working
;			directory.  This directory may be changed via
;			the PCComCD routine.  Examples:
;			"a:\temp\foo" - get the size of file foo from
;				a:\temp
;			"..\enstrunk\bar" - get the size of "bar"
;				from the cwd's parent's enstrunk
;				directory.
;			"\command.com" - this is undefined.  It may be
;				relative, absolute, or it may result
;				in an error.  Don't try it. 
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;


global	PCCOMDIR:far
;	Desc:	Get the size of a specified file.
;	Pass:	on stack
;		hptr - handle of block to stuff the dos-char listings
;			into
;		PCComDirDetailLevel - inicates level to request
;		fptr - geos-char DOS filespec
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;			PCCRT_MEMORY_ALLOC_ERROR
;			PCCRT_TOO_MUCH_OUTPUT
;


global	PCCOMLISTDRIVES:far
;	Desc:	Fetch the list of availible drives from the Remote computer.
;	Pass:	on stack
;		hptr - handle of block to stuff the geos-char listings 
;			into
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;			PCCRT_MEMORY_ALLOC_ERROR
;


global	PCCOMGETFREESPACE:far
;	Desc:	Fetch the space free on a given drive (or current drive)
;	Pass:	on stack
;		fptr - to a dword buffer for the size in bytes of the
;			free space on the designated remote drive.
;		word - drive letter of remote drive to query, high
;			byte is ignored.  May also just be null..
;			then we'll check the current remote drive.
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;			PCCRT_BAD_DEST_PATH
;


global	PCCOMDATA:far
;	Desc:	Send general data.
;	Pass:	on stack
;		word - size of the data
;		fptr - pointer to the buffer to send
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;


global	PCCOMSETDATANOTIFICATION:far
;	Desc:	Set up to receive PCComData
;	Pass:	on stack
;		dword - amount of data to buffer before it's processed
;		word  -	msg to send when we've received some data
;		optr  - object to send the notification to
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_IN_USE
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;

;
; Message prototype for Data Notification.  Will have a NULL handle on timeout
;
; @prototype void PCCOM(hptr dataBlock);
;
; Pass:
;	cx	- hptr
;

global	PCCOMWAIT:far
;	Desc:	Set up to receive PCComData
;	Pass:	on stack
;		word  - time to wait for data (in ticks: 60/s)
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_IN_USE
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;


global	PCCOMACKDATA:far
;	Desc:	Acknowledge a PCComData buffer.  Turns off any wait
;			timers
;	Pass:	on stack
;		hptr  - data buffer you wish to acknowledge
;	Return:	PCComFullReturnType
;			PCCRT_NO_ERROR
;			PCCRT_BUSY
;			PCCRT_IN_USE
;			PCCRT_NOT_INITIALIZED
;			PCCRT_COMMAND_ABORTED
;



;------------------------------------------------------------------------------
;			 Methods sent from PCCom
;------------------------------------------------------------------------------
;-----------------------------------------------------------------------------
;	Methods sent if PCCIF_NOTIFY_OUTPUT is passed to PCComInit
;
;	When PCCom starts or completes a file operation, it outputs 
;	textual information about that operation.  If you want your 
;	application to display that information, pass the PCCIF_NOTIFY_OUTPUT 
; 	flag to PCComInit, along with the optr of the object which should
;	receive the notification.
;
; 	If the passed optr is non-zero, PCCom will send the following 
; 	two methods to that object.  The data sent with the messages
;	can be passed directly to a GenText or VisText object.  It
;	consists of ASCII characters plus the carriage return control
;	characters.
;
; 	Note that if the app is receiving output, it *MUST* intercept
; 	MSG_META_NOTIFY_WITH_DATA_BLOCK and free the passed data block,
;	even if it does nothing with the data block.
;-----------------------------------------------------------------------------
;
; MSG_META_NOTIFY
;	PASS:	cx - MANUFACTURER_ID_GEOWORKS
;		dx - GWNT_PCCOM_DISPLAY_CHAR
;		bp.low - character
;
;
; MSG_META_NOTIFY_WITH_DATA_BLOCK
;	PASS:	cx - MANUFACTURER_ID_GEOWORKS
;		dx - GWNT_PCCOM_DISPLAY_STRING
;		bp - handle of block containing NULL-terminated string
;
; 		NOTE: The app must free this block, whether it uses it or not.
;	    	Apps which have requested to receive output must handle this
;	    	message, if only to free the block.
;

;-----------------------------------------------------------------------------
;	Methods sent if PCCIF_NOTIFY_EXIT is passed to PCComInit:
;
;	The serial connection may be closed and PCCom exited by sending
;	a special escape sequence from the remote machine.  If you want
;	to be notified of that event, pass the PCCIF_NOTIFY_EXIT flag
;	to PCComInit.  Then MSG_META_NOTIFY will be sent to object whose
;	optr was passed to PCComInit, with the handle of the thread that
;	is about to be destroyed as data.
;
;	If you loaded the PCCom library dynamically, you must pass the
;	PCCIF_NOTIFY_EXIT_FLAG and intercept the following two messages:
;
;	MSG_META_NOTIFY will be sent when PCCom is about to destroy the
;	thread which was running the serial port.  The handle of that 
;	thread is passed as data.  You cannot free the PCCom library until
;	you know that the thread has been destroyed. When the thread has
;	been destroyed, MSG_PROCESS_NOTIFY_THREAD_EXIT is sent to your
; 	process object. You must intercept this message, and if the thread
; 	handle passed in dx is the same handle as was passed in bp for
;	MSG_META_NOTIFY, you can now be certain that the thread has been
;	destroyed and free the PCCom Library. If the library was not
;	loaded dynamically, you need not intercept MSG_PROCESS_NOTIFY_
;	THREAD_EXIT. 
;
;	It is not necessary to pass MSG_PROCESS_NOTIFY_THREAD_EXIT to the
;	superclass, as it is provided as a notification only, and there is
;	no default handling of it. Note that it may also be sent in other
;	situations, and in those cases the thread handle will not be the
; 	same as the thread handle passed to MSG_META_NOTIFY.
;-----------------------------------------------------------------------------
;
; MSG_META_NOTIFY
;	PASS:	cx - MANUFACTURER_ID_GEOWORKS
;		dx - GWNT_PCCOM_EXIT
;		bp - handle of thread which is about to be destroyed
;
;	RETURN: nothing
;
; MSG_PROCESS_NOTIFY_THREAD_EXIT
;	PASS:	cx - handle of thread that exited
;		dx - exit code
;
;	RETURN: nothing
;


PCComInit equ PCCOMINIT
PCComExit equ PCCOMEXIT
PCComAbort equ PCCOMABORT
PCComGet equ PCCOMGET
PCComSend equ PCCOMSEND
PCComStatus equ PCCOMSTATUS
PCComCD equ PCCOMCD
PCComMkdir equ PCCOMMKDIR
PCComGetFileSize equ PCCOMGETFILESIZE
PCComDir equ PCCOMDIR
PCComListDrives equ PCCOMLISTDRIVES
PCComRemark equ PCCOMREMARK
PCComData equ PCCOMDATA
PCComSetDataNotification equ PCCOMSETDATANOTIFICATION
PCComWait equ PCCOMWAIT
PCComAckData equ PCCOMACKDATA
PCComPWD equ PCCOMPWD
PCComGetFreeSpace equ PCCOMGETFREESPACE

EndLibrary	pccom


