home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / ISC365 / MODEM.H < prev    next >
C/C++ Source or Header  |  1993-01-20  |  2KB  |  68 lines

  1. ///////////////////////////////////////////////////////////////////////////
  2. //                                                                       //
  3. //            File: modem.h                                              //
  4. //                  (project version).                                   //
  5. //            started on: 23/2/92                                        //
  6. //                                                                       //
  7. ///////////////////////////////////////////////////////////////////////////
  8. //                                                                       //
  9. //                                                                       //                                                                     //
  10. ///////////////////////////////////////////////////////////////////////////
  11.  
  12. #ifndef __MODEM_H
  13. #define __MODEM_H
  14.  
  15. #include "serial.h" ; // SERIAL_PORT
  16.  
  17. class MODEM: public SERIAL_PORT {
  18.  
  19.  
  20. protected:
  21.  
  22.        // overloads the msr_int from serial_port.
  23.        //
  24.        virtual void msr_int(const BYTE msr);
  25.  
  26.        // overloads the extended init (called by activate!).
  27.        //
  28.        virtual void extended_init();
  29.  
  30.        // overloads the flow control function.
  31.        //
  32.        virtual inline void flow_check();
  33.  
  34.        // called by msr_int when a ring is indicated.
  35.        //
  36.        virtual void ring_int(BYTE msr);
  37.  
  38.        // called by msr_int when a modem status is indicated (DSR, CTS).
  39.        //
  40.        virtual void modem_status_change(BYTE msr);
  41.  
  42.        // called by msr_int when DCD changes (up or down).
  43.        //
  44.        virtual void dcd_status_change(BYTE msr);
  45.  
  46. public:
  47.        MODEM(): SERIAL_PORT() {};
  48.        ~MODEM();
  49.  
  50.        // called to enquire as to the state of the modem.
  51.        //
  52.        BYTE get_MSR();
  53.  
  54.        // this function is called to disconnect from the modem.
  55.        //
  56.        virtual void disconnect( BOOLEAN boot_enable= TRUE,
  57.                                 const char *escape_sequence= "",
  58.                                 const char *disconnect_string= "",
  59.                                 const char *disconnect_reply_string= "",
  60.                                 const unsigned timeout= 0);
  61.  
  62.        // wait until DCD is down/ timout expired.
  63.        virtual void wait(unsigned miliseconds);
  64.  
  65. };
  66.  
  67. #endif
  68.