home *** CD-ROM | disk | FTP | other *** search
- #ifndef alarm_H
- #define alarm_H
-
- /* C header file for Alarm
- * written by DefMod (Jun 20 1995) on Thu Jun 29 15:11:38 1995
- * Jonathan Coxhead, Acorn Computers Ltd
- */
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef os_H
- #include "os.h"
- #endif
-
- /************************************
- * Structure and union declarations *
- ************************************/
- typedef struct alarm_date_and_time alarm_date_and_time;
- typedef struct alarm_message_set alarm_message_set;
- typedef struct alarm_message_cancel alarm_message_cancel;
- typedef struct alarm_message_gone_off alarm_message_gone_off;
-
- /********************
- * Type definitions *
- ********************/
- typedef int alarm_reason;
-
- struct alarm_date_and_time
- { short year;
- byte month;
- byte date;
- byte hour;
- byte minute;
- };
-
- struct alarm_message_set
- { alarm_reason set_reason;
- union
- { os_date_and_time utc;
- alarm_date_and_time local;
- }
- time;
- char sender [40];
- char alarm_name [40];
- };
-
- struct alarm_message_cancel
- { alarm_reason cancel;
- char sender [40];
- char alarm_name [40];
- };
-
- struct alarm_message_gone_off
- { char sender [40];
- char alarm_name [40];
- };
-
- /************************
- * Constant definitions *
- ************************/
- #define alarm_NAME_LIMIT 40
- #define message_ALARM_SET 0x500u
- #define message_ALARM_GONE_OFF 0x501u
- #define alarm_REASON_SET_LOCAL ((alarm_reason) 0x0u)
- #define alarm_REASON_SET_UTC ((alarm_reason) 0x1u)
- #define alarm_REASON_CANCEL ((alarm_reason) 0x2u)
-
- #endif
-