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

	Copyright (c) Geoworks 1994 -- All Rights Reserved

PROJECT:	PC/GEOS	
FILE:		rtcm.def

AUTHOR:		Todd Stumpf, Jun 28, 1994

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	TS	6/28/94   	Initial revision

DESCRIPTION:
	This is the .def file for the RTCM manager.	
		
	$Id: rtcm.def,v 1.1 97/04/04 14:26:06 newdeal Exp $

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


SetDef	__RTCM

StartLibrary	rtcm

include geode.def
include file.def
include timer.def

;-----------------------------------------------------------------------------
;		Constants & Enumerated Types
;-----------------------------------------------------------------------------

RTCMGeodeLaunchMode			etype	word, 0, 2
	RTCMGLM_APPLICATION	enum	RTCMGeodeLaunchMode
	RTCMGLM_ENGINE		enum	RTCMGeodeLaunchMode
	RTCMGLM_DRIVER		enum	RTCMGeodeLaunchMode
	RTCMGLM_LIBRARY		enum	RTCMGeodeLaunchMode
	RTCMGLM_APPLICATION_IN_BACK	enum	RTCMGeodeLaunchMode

RTCMError				etype	word, 0, 2
	RTCME_OK		enum	RTCMError
	RTCME_EVENT_NOT_FOUND	enum	RTCMError
	RTCME_REGISTER_FAILED	enum	RTCMError
	RTCME_INVALID_EVENT	enum	RTCMError

;
; Using any of the following values in the event's time/date
; makes the event a "floating" event.  It will be scheduled for the
; earliest possible date/time in the future that matches the
; floating date/time by substituting a value for the fields
; given an ANY_XXX value.
;

ANY_YEAR	equ	0
ANY_MONTH	equ	0
ANY_DAY		equ	0

ANY_DATE	equ	TimerCompressedDate <ANY_YEAR, ANY_MONTH, ANY_DAY>

ANY_HOUR	equ	0xfffe
ANY_MINUTE	equ	0xfffe

WHEN_DATE_TIME_CHANGE	equ	TimerCompressedDate <0, 15, 0>
;
; Value to supply in REP_date parameter when a client wants to
; receive notification that the date/time changed.
;

;
; The parameters to the assembly routine will share the same structure
; as those to the C stub, to avoid copying parameters around.
;
; There is code that just copies parameters from the stack into
; the event array, so don't change this structure
; without changing RTCMEvent and RTCMRegisterEvent as well.
;

RegisterEventParams		struct

	REP_date		TimerCompressedDate
		;
		; Date of event (can also be a floating date, or
		; WHEN_DATE_TIME_CHANGE)
		;
	REP_hour		word
		;
		; Hour (0-23) of event.  Can be floating hour
		;
	REP_minute		word
		;
		; Minute (0-59) of event. Can be floating minute
		;
	REP_eventMsg		word
		;
		; If non-zero, a message to send to the receiving
		; application's process object.  Only applicable if
		; passing RTCMGLE_APPLICATION or RTCMGLE_ENGINE in
		; REP_geodeMode.
		;
	REP_geodeMode		RTCMGeodeLaunchMode
		;
		; The type of geode to launch/send message to:
		;
		;	RTCMGLM_APPLICATION
		;		Makes sure the specified application is
		;		running in app mode.
		;
		;	RTCMGLM_ENGINE
		;		Makes sure specified app is running
		;		in engine mode, if not already running
		;		in app mode.
		;
		;	RTCMGLM_DRIVER
		;		Loads a driver geode with GeodeUseDriver
		;
		;	RTCMGLM_LIBRARY
		;		Loads a library geode with GeodeUseLibrary
		;
	REP_geodeToken		GeodeToken
		;
		; The GeodeToken of the geode to launch/send message to
		; Only applies to Applications.
		;
	REP_common		label   TCHAR
				        ; Everything up to here is in common
				        ; with the internal event structure

	REP_geodePathPtr	fptr.PathName
		;
		; A pointer to a pathname in which the geode will be found.
		; This must be supplied for drivers and libraries.
		; Applications may need to supply this in order to
		; distinguish between multiple apps with the same
		; GeodeToken.  Otherwise, pass NULL
		;

RegisterEventParams		ends

;-----------------------------------------------------------------------------
;		Exported Routines
;-----------------------------------------------------------------------------

global  RTCMRegisterEvent:far
global	RTCMUnregisterEvent:far

global	RTCMREGISTEREVENT:far
global	RTCMUNREGISTEREVENT:far

global	RTCMCheckEvent:far
global	RTCMCHECKEVENT:far


EndLibrary	rtcm

