2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2003 Net Integration Technologies, Inc.
5 * Intelligent serial port scanner: try to find a port (or ports)
6 * with a working modem, guess a basic startup init string, and find
7 * the maximum baud rate.
9 #ifndef __WVMODEMSCAN_H
10 #define __WVMODEMSCAN_H
12 #include "wvlinklist.h"
21 enum Stage
{ Startup
=0, AT
, ATZ
, ATS0
,
22 Carrier
, DTR
, FCLASS
, GetIdent
,
23 BaudStep
, Reinit
, Done
, NUM_STAGES
};
27 enum Status
{ Fail
= -1, Unknown
= 0, Worked
= 1, Test
};
28 Status status
[NUM_STAGES
];
37 bool doresult(WvStringParm s
, int msec
);
38 size_t coagulate(char *buf
, size_t size
, int msec
);
41 WvModemScan(WvStringParm devname
, bool is_modem_link
);
49 { return stage
== Done
; }
52 // is this an isdn modem? Returns modem identifier if so.
53 const char *is_isdn() const;
55 bool use_default_asyncmap() const;
57 // continue the probe where we left off
60 // after a probe finishes (isdone()==true) these functions return
61 // the final status info for the device.
62 WvStringParm
filename() const
66 WvString
initstr() const;
70 // Declare a WvModemScanList, which searches for all available modems.
71 // After an instance of the class has been created, run execute()
72 // again and again until isdone()==true; then the contents of the list
73 // is a set of all available modems, in the form of WvModemScan objects.
74 DeclareWvList2(WvModemScanListBase
, WvModemScan
);
76 class WvModemScanList
: public WvModemScanListBase
82 WvModemScanList(WvStringParm _exception
= WvString::null
);
89 #endif // __WVMODEMSCAN_H