home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / superpg.zip / PAGE.H < prev    next >
C/C++ Source or Header  |  1995-11-23  |  2KB  |  64 lines

  1. #define PIPENAME    "\\PIPE\\PAGED"
  2. #define SEMNAME        "\\SEM32\\PIPE\\PAGED"
  3.  
  4. #define PH_PAGE_BY_NAME_ID        0
  5. #define PH_PAGE_BY_NAME            1
  6. #define PH_PAGE_BY_ID            2
  7. #define PH_PAGE_LIST_LOG        3
  8. #define PH_PAGE_SHOW_QUEUES        4
  9. #define PH_PAGE_DELETE_AT_PAGE    5
  10.  
  11. #define PH_ACTION_PAGE_NOW        0
  12. #define PH_ACTION_PAGE_AT        1
  13. #define PH_ACTION_PAGE_DELAY    2
  14. #define PH_MODIFIER_RETRY        1
  15. #define PH_ECHO_HELLO            10          // Not used
  16. #define PH_EXIT                    999         // Not used
  17.  
  18. #define PH_ID_SIZE                32
  19. #define PH_MESSAGE_SIZE            4096
  20. #define PH_CLI_NAME_SIZE        32
  21.  
  22. // Page format for V1
  23. struct page_format {
  24.     struct page_header {
  25.         short    MsgVersion ;    // Must be 1 - Version 1
  26.         short    MsgType ;        // PH_PAGE_BY_NAME_ID - Page by name or by id if
  27.                                 //                      name not found
  28.                                 // PH_PAGE_BY_NAME - Page by name only
  29.                                 // PH_PAGE_BY_ID - Page by id only
  30.                                 // PH_PAGE_LIST_LOG - List log file, How much
  31.                                 //                    is stored in Modifier
  32.                                 // PH_PAGE_SHOW_QUEUES - Show pages in queues
  33.                                 //                       Type is stored in Modifier
  34.                                 // PH_PAGE_DELETE_AT_PAGE - Will delete a AT queued page
  35.                                 //                          Use some of or all of date & time &
  36.                                 //                          id to match page to delete.
  37.                                 //                          Set args to 0 to match all.
  38.  
  39.         short    Action ;        // PH_ACTION_PAGE_NOW - Page now
  40.                                 // PH_ACTION_PAGE_AT - Page at time in at struct
  41.                                 // PH_ACTION_PAGE_DELAY - Page in xxx minines
  42.                                 //                        seconds are in pgf.header.at.sec
  43.         short    Modifier ;        // PH_MODIFIER_RETRY - Delay xxx second befor retrying
  44.                                 //                     seconds are in pgf.header.ModArg
  45.         unsigned long ModArg ;    // Argument for Modifier
  46.  
  47.         char    CliName[PH_CLI_NAME_SIZE] ;
  48.         short    DataSize ;        // Size of message in bytes
  49.         // These fields are used if MsgType = PH_PAGE_DELAY
  50.         struct _at {
  51.             unsigned char sec ;        // Only used if Action = PH_ACTION_PAGE_DELAY
  52.             unsigned long min ;        // 0 - 59
  53.             unsigned char hour ;   // 0 - 23
  54.             unsigned char day ;     // 1 - 31
  55.             unsigned char month ;   // 1 - 12
  56.             unsigned short year ;   // 95 - ??
  57.         } at ;
  58.     } header ;
  59.     char id[PH_ID_SIZE] ;            // Put the name of the person here
  60.     char message[PH_MESSAGE_SIZE] ;
  61. } ;
  62. typedef struct page_format pgf ;
  63.  
  64.