2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * Copyright (C) 1999 Red Hat, Inc.
7 * Definition of the WvModemBase and WvModem classes. Inherit from WvFile,
8 * but do various important details related to modems, like setting baud
9 * rates and dropping DTR and the like.
16 #include "wvlockdev.h"
34 * WvModemBase provides the methods used to control a modem, but
35 * without real implementation for most of them, so that they can
36 * be used in contexts where modem control is undesirable without
37 * reimplementing calling code for such uses.
39 class WvModemBase
: public WvFile
53 virtual ~WvModemBase();
55 /** do-nothing method that is not needed in WvModemBase */
58 /** do-nothing method that is not needed in WvModemBase */
59 virtual bool carrier();
61 /** do-nothing method that is not needed in WvModemBase */
62 virtual int speed(int _baud
);
64 /** this one really is needed */
68 /** may need to hangup for redial reasons */
69 virtual void hangup();
72 const char *wstype() const { return "WvModemBase"; }
77 * WvModem implements a named modem that really needs to be opened,
78 * closed, and manipulated in lots of ways
80 class WvModem
: public WvModemBase
91 * Setup all of the terminal characteristics, and leave the modem in CLOCAL
92 * mode to make sure that we can communicate easily with the modem later.
94 void setup_modem(bool rtscts
);
96 /** Check the status of the modem */
100 WvModem(WvStringParm filename
, int _baud
, bool rtscts
= true,
101 bool _no_reset
= false);
104 /** Close the connection to the modem */
105 virtual void close();
107 /** Is there a carrier present? */
108 virtual bool carrier();
111 * _baud is the desired speed, that you wish the modem to communicate with,
112 * and this method returns the actual speed that the modem managed to achieve.
114 virtual int speed(int _baud
);
117 const char *wstype() const { return "WvModem"; }