;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Copyright (c) 2001-2002 TIMEX Corporation.
; 
; This document is the property of, and contains information proprietary to
; TIMEX Corporation.  It is to be returned upon request.  Reproduction by any
; means, disclosure, or use of its contents for other than the expressed
; purpose for which it is loaned, without the written consent of TIMEX
; Corporation, is strictly prohibited.
;
; File Name:    appt.h
;
; Purpose:      APPOINTMENT Header File
;
; File Change History:
;
;               05/16/2000 NLS - Created appt.h for m841
;
; M851 Development:
;
;               11/27/2001 JDS - Modified for M851.
;               01/29/2002 JDS - Created from alm.h
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; state definitions
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CAUTION!: ALM and APPT MUST have this same def in order to use the SNOOZE 10 MIN 
;           and DELETE TIME OUT states.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The UTL state defs below can be found in utldef.h.
;APPTMODEBANNERSTATE        equ     COREBANNERSTATE ; Def not needed but this defs the sequence
;UTLDEFAULTSTATE            equ     COREDEFAULTSTATE
;APPTSETBANNERSTATE         equ     CORESETBANNERSTATE ; Def not needed but this defs the sequence
APPTSETSTATE               equ     CORESETSTATE
APPTPOPUPSTATE             equ     COREPOPUPSTATE
APPTPASSWORDDEFAULTSTATE   equ     COREPASSWORDDEFAULTSTATE
APPTPASSWORDSETBANNERSTATE equ     COREPASSWORDSETBANNERSTATE
APPTPASSWORDSETSTATE       equ     COREPASSWORDSETSTATE
;; The state defs below can be found in utldef.h.
;;UTLDELETETIMEOUTSTATE    equ     COREMISCSTATE3
;;UTLYOUROCKSETSTATE       equ     COREMISCSTATE4

;; Use these (uncomment those defs in utldef.h) 
;; if we use the set snooze feature then remove YOUROCK
;;UTLPOPUPSETBANNERSTATE   equ     COREMISCSTATE4
;;UTLPOPUPSETSTATE         equ     COREMISCSTATE5
;;UTLSNOOZE10MINSTATE      equ     COREMISCSTATE6

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; APPT APPLICATION DATABASE
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; APPT MAX ASD SIZE - APPT ASD is a little larger
; than the ALM ASD. As long as the fields
; are the same thru UTLASDSEARCHRECORDPTROFFSET
; then there will not be a problem using the common utilities.
; NOTE: Make the ALARM ASD the SAME SIZE as APPT.
; This is so the common routines will work.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; APPTASDSYSTEMDATASIZE            equ     30 See UTLASDSYSTEMDATASIZE in Utldef.h

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; SWITCH EVENT REDEFINITIONS
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

APPTEVENT_MODEDEPRESS            EQU COREEVENT_SWITCH1DEPRESS
APPTEVENT_STOPRESETDEPRESS       EQU COREEVENT_SWITCH2DEPRESS
APPTEVENT_STARTSPLITDEPRESS      EQU COREEVENT_SWITCH3DEPRESS

APPTEVENT_MODERELEASE            EQU COREEVENT_SWITCH1RELEASE
APPTEVENT_STOPRESETRELEASE       EQU COREEVENT_SWITCH2RELEASE

APPTEVENT_POPUP_CANCEL           EQU COREEVENT_MELODYPOPUPCANCEL

APPTEVENT_CROWN_EL_RELEASE       EQU COREEVENT_CROWN_EL_RELEASE
APPTEVENT_CROWN_HOME             EQU COREEVENT_CROWN_HOME
APPTEVENT_CROWN_SET              EQU COREEVENT_CROWN_SET1 

APPTEVENT_CW_EDGE_TRAILING       EQU COREEVENT_CW_EDGE_TRAILING
APPTEVENT_CCW_EDGE_TRAILING      EQU COREEVENT_CCW_EDGE_TRAILING

APPTEVENT_CW_PULSES              EQU COREEVENT_CW_PULSES
APPTEVENT_CCW_PULSES             EQU COREEVENT_CCW_PULSES

APPTEVENT_TIMEOUTDONE_LORES      EQU COREEVENT_TIMEOUTDONE_LOWRES
APPTEVENT_TIMEOUTDONE_HIGHRES    EQU COREEVENT_TIMEOUTDONE_HIGHRES
APPTEVENT_STICKY_TIMEOUTDONE     EQU COREEVENT_STICKY_TIMEOUTDONE

APPTEVENT_STATEENTRY             EQU COREEVENT_STATEENTRY
APPTEVENT_MELODY_DONE            EQU COREEVENT_MELODY_DONE
APPTEVENT_MELODYPOPUPCANCEL      EQU COREEVENT_MELODYPOPUPCANCEL
APPTEVENT_END_OF_SCROLL          EQU COREEVENT_END_OF_SCROLLING_MESS
APPTEVENT_ANYSWITCHDEPRESS       EQU COREEVENT_ANYSWITCHDEPRESS
APPTEVENT_PRIMARY_TIME_CHANGE    EQU COREEVENT_PRIMARY_TIME_CHANGE

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Background handler event definitions
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

APPTEVENT_PORINIT                EQU COREEVENT_PORINIT
APPTEVENT_INIT                   EQU COREEVENT_INIT
APPTEVENT_UPDATEDATABASEHEADER   EQU COREEVENT_UPDATEDATABASEHEADER
APPTEVENT_REFRESH_START          EQU COREEVENT_REFRESH_START
APPTEVENT_REFRESH_CONTINUE       EQU COREEVENT_REFRESH_CONTINUE
APPTEVENT_PEEK_SEARCH_START      EQU COREEVENT_PEEK_SEARCH_START
APPTEVENT_PEEK_SEARCH_CONTINUE   EQU COREEVENT_PEEK_SEARCH_CONTINUE
APPTEVENT_TASKEXIT               EQU COREEVENT_TASKEXIT
APPTEVENT_PEEK                   EQU COREEVENT_PEEK
APPTEVENT_DAY_UPDATE             EQU COREEVENT_DAY_UPDATE
APPTEVENT_HOUR_UPDATE            EQU COREEVENT_HOUR_UPDATE
APPTEVENT_TZC_EXPIRED_NOPOPUP    EQU COREEVENT_TZC_EXPIRED_NOPOPUP
APPTEVENT_TZC_EXPIRED_POPUP      EQU COREEVENT_TZC_EXPIRED_POPUP

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; SWITCH MASK REDEFINITIONS
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

APPTSWITCHMASK_MODE              EQU     bCORESwitch1
APPTSWITCHMASK_STOPRESET         EQU     bCORESwitch2
APPTSWITCHMASK_STARTSPLIT        EQU     bCORESwitch3
APPTSWITCHMASK_CW                EQU     bCORECWSwitch
APPTSWITCHMASK_CCW               EQU     bCORECCWSwitch
APPTSWITCHMASK_EL                EQU     bCOREELSwitch


APPTSWITCHMASK_SETSTATE_NOKEYS   EQU     0


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; APPT SET - SET POSITIONS
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

APPTSETPOSITIONTIME          EQU     00H  ; The time the appointment will expire
APPTSETPOSITIONFREQ          EQU     01H  ; The Frequency UTLDAILY, UTLWKDAYS, UTLWKENDS, UTLWEEKLY...
APPTSETPOSITIONACCDATE       EQU     02H  ; The Activation date
APPTSETPOSITIONPRENOT        EQU     03H  ; The repnotification index.
APPTSETPOSITIONDMMESSAGE     EQU     04H  ; Any character position in the LCDScrollMessage.

