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

	Copyright (c) GeoWorks 1992 -- All Rights Reserved

PROJECT:	PC GEOS
MODULE:		
FILE:		pagerwatcher.def

AUTHOR:		Jennifer Wu, May 14, 1993

	
REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	jwu	5/14/93		Initial revision


DESCRIPTION:
	Class definitions for PagerWatcherProcess class.
		
	$Id: pagerwatcher.def,v 1.1 97/04/04 14:25:36 newdeal Exp $

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

;--------------------------------------------------------------
;		PagerWatcherProcessClass
;---------------------------------------------------------------

PagerWatcherProcessClass	class	GenProcessClass

;-------------------
;	Messages
;-------------------

MSG_PAGER_WATCHER_DEVICE_ADDED		message
	; Load the driver for the specified device.  Set up the stream
	; for the device and initialize the driver for it.
	; Called by: 	Preference module for device
	; Pass:		cx	= the position of the device in list of 
	;			  installed devices
	; Return:	nothing

MSG_PAGER_WATCHER_DEVICE_REMOVED		message
	; Tell the driver the specified device is no longer installed.
	; Destroy the stream for the device.
	; Called by: 	Preference module for device
	; Pass:		dx 	= position of device in list of installed
	;			  devices before it was removed
	; Return:	nothing

MSG_PAGER_WATCHER_UPDATE_NOTIFICATION		message
	; Update the way notification will be sent out when messages
	; are finished being processed.  If the polling interval has
	; changed, stop the current timer and start a new one.
	; Called by:	Preference module for device
	; Pass:		nothing
	; Return:	nothing

MSG_PAGER_WATCHER_POLL_FOR_MESSAGES			message
	; Poll the drivers for messages if the drivers are not busy.
	; Pass:		nothing
	; Return:	nothing

MSG_PAGER_WATCHER_PROCESS_MSG			message
	; Read notification sent by watcher/driver streams.
	; Pass:		cx	= # of bytes of data in the stream
	; 		dx	= stream token
	; Return:	nothing

MSG_PAGER_WATCHER_DESTROY_STREAM		message
	; Checks to see if stream is empty before destroying it.
	; If not empty, tries again later after disabling further	
	; writes to the stream.
	; Pass:		dx	= stream token
	; Return: 	nothing

MSG_PAGER_WATCHER_ERROR				message
	; Error notification sent by watcher/driver streams.
	; Deletes the current file if any.  The reason for this 
	; is usually because the driver encountered an error 
	; downloading the message from the device.
	; Pass:		dx	= stream token
	;		cx	= error code
	; Return:	

MSG_PAGER_WATCHER_FREE_FILENAME_BLOCK		message
	; Free the block that held the name of the message file.
	; Called by the IACP via the completion message.
	; Pass:		cx	= handle of block 
	; Return:	nothing

PagerWatcherProcessClass	endc

;-------------------------------------------------------------------------
;	Message for notifying the destination applications when
; 	a complete message has been processed.  This must be handled
; 	in the application's process class since that is how 
; 	IACPSimpleConnectAndSend works.
;-------------------------------------------------------------------------

MSG_META_PAGER_MSG_READY		method	MetaApplicationMessages
;	DESCRIPTION:	Sent out by watcher when a message has been 
;			completely processed and placed into a file 
;			in the privdata\pager directory.
;	PASS:		cx	= handle of block containing name
;				  of the file (null-terminated)
;			dl	= to beep or not to beep (if the 
;				  application supports audio notification)
;	RETURN:		nothing
;
;	NOTE:		When the handler for this message returns, 
;			the watcher will be sent a completion message
;			by IACP and the block containing the file name
;			will be freed.  Any other attempts to use it
;			will be detrimental to the health of your program.
;			Also, when this handler returns, if the application
;			was started up using MSG_GEN_PROCESS_OPEN_ENGINE,
;			MSG_META_QUIT will be sent to the application 
;			by IACP.  In other words, do everything that needs
;			to be done before the application shuts down in
;			this handler.  Placing messages in the queue
;			for the application may result in the messages being
;			placed in the queue after the shutdown message,
;			causing total chaos.  This is a Bad Thing.
;

