home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / User / h / alarm next >
Encoding:
Text File  |  1995-06-29  |  1.7 KB  |  71 lines

  1. #ifndef alarm_H
  2. #define alarm_H
  3.  
  4. /* C header file for Alarm
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 29 15:11:38 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. /************************************
  18.  * Structure and union declarations *
  19.  ************************************/
  20. typedef struct alarm_date_and_time              alarm_date_and_time;
  21. typedef struct alarm_message_set                alarm_message_set;
  22. typedef struct alarm_message_cancel             alarm_message_cancel;
  23. typedef struct alarm_message_gone_off           alarm_message_gone_off;
  24.  
  25. /********************
  26.  * Type definitions *
  27.  ********************/
  28. typedef int alarm_reason;
  29.  
  30. struct alarm_date_and_time
  31.    {  short year;
  32.       byte month;
  33.       byte date;
  34.       byte hour;
  35.       byte minute;
  36.    };
  37.  
  38. struct alarm_message_set
  39.    {  alarm_reason set_reason;
  40.       union
  41.       {  os_date_and_time utc;
  42.          alarm_date_and_time local;
  43.       }
  44.       time;
  45.       char sender [40];
  46.       char alarm_name [40];
  47.    };
  48.  
  49. struct alarm_message_cancel
  50.    {  alarm_reason cancel;
  51.       char sender [40];
  52.       char alarm_name [40];
  53.    };
  54.  
  55. struct alarm_message_gone_off
  56.    {  char sender [40];
  57.       char alarm_name [40];
  58.    };
  59.  
  60. /************************
  61.  * Constant definitions *
  62.  ************************/
  63. #define alarm_NAME_LIMIT                        40
  64. #define message_ALARM_SET                       0x500u
  65. #define message_ALARM_GONE_OFF                  0x501u
  66. #define alarm_REASON_SET_LOCAL                  ((alarm_reason) 0x0u)
  67. #define alarm_REASON_SET_UTC                    ((alarm_reason) 0x1u)
  68. #define alarm_REASON_CANCEL                     ((alarm_reason) 0x2u)
  69.  
  70. #endif
  71.