home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / alarm < prev    next >
Encoding:
Text File  |  1994-06-22  |  2.0 KB  |  75 lines

  1. #ifndef alarm_H
  2. #define alarm_H
  3.  
  4. /* C header file for Alarm
  5.  * written by DefMod (Jun 22 1994) on Wed Jun 22 18:25:15 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. /************************************
  24.  * Structure and union declarations *
  25.  ************************************/
  26. typedef struct alarm_date_and_time              alarm_date_and_time;
  27. typedef struct alarm_message_set                alarm_message_set;
  28. typedef struct alarm_message_cancel             alarm_message_cancel;
  29. typedef struct alarm_message_gone_off           alarm_message_gone_off;
  30.  
  31. /********************
  32.  * Type definitions *
  33.  ********************/
  34. struct alarm_date_and_time
  35.    {  short year;
  36.       byte month;
  37.       byte date;
  38.       byte hour;
  39.       byte minute;
  40.    };
  41.  
  42. struct alarm_message_set
  43.    {  int reason;
  44.       union
  45.       {  os_date_and_time utc;
  46.          alarm_date_and_time local;
  47.       }
  48.       time;
  49.       char sender [40];
  50.       char alarm_name [40];
  51.    };
  52.  
  53. struct alarm_message_cancel
  54.    {  int reason;
  55.       char sender [40];
  56.       char alarm_name [40];
  57.    };
  58.  
  59. struct alarm_message_gone_off
  60.    {  char sender [40];
  61.       char alarm_name [40];
  62.    };
  63.  
  64. /************************
  65.  * Constant definitions *
  66.  ************************/
  67. #define alarm_NAME_LIMIT                        40
  68. #define message_ALARM_SET                       0x500u
  69. #define message_ALARM_GONE_OFF                  0x501u
  70. #define alarm_REASON_SET_LOCAL                  0
  71. #define alarm_REASON_SET_UTC                    1
  72. #define alarm_REASON_CANCEL                     2
  73.  
  74. #endif
  75.