2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
20 #define COMM_BUF_EMPTY -1
22 #define COMM_STATUS_BREAK 1
23 #define COMM_STATUS_FRAME 2
24 #define COMM_STATUS_OVERRUN 4
25 #define COMM_STATUS_RXPARITY 8
28 #define COMM_DEVICE_MODEM1 1 // OBSOLETE!! use XTAPI
29 #define COMM_DEVICE_MODEM0 0 // OBSOLETE!! use XTAPI
31 #define COMM_DEVICE_COM1 -1
32 #define COMM_DEVICE_COM2 -2
33 #define COMM_DEVICE_COM3 -3
34 #define COMM_DEVICE_COM4 -4
36 typedef struct COMM_OBJ {
44 char name[32]; // OBSOLETE!! use XTAPI
48 char cmd[8][32]; // OBSOLETE!! use XTAPI
52 int comm_open_connection(COMM_OBJ *obj);
53 int comm_close_connection(COMM_OBJ *obj);
54 int comm_read_char(COMM_OBJ *obj);
55 int comm_read_char_timed(COMM_OBJ *obj, int msecs);
56 int comm_write_char(COMM_OBJ *obj, int ch);
58 int comm_get_cd(COMM_OBJ *obj);
59 int comm_get_line_status(COMM_OBJ *obj);
61 void comm_set_dtr(COMM_OBJ *obj, int flag);
62 void comm_set_rtscts(COMM_OBJ *obj, int flag);
63 void comm_clear_line_status(COMM_OBJ *obj);
65 void comm_set_delay(COMM_OBJ *obj, int msecs);
66 int comm_wait(COMM_OBJ *obj, int msecs);
69 /* OBSOLETE. Use XTAPI calls to do the same job much better */
71 #define COMM_PREFIX_CMD 0
72 #define COMM_RESET_CMD 1
73 #define COMM_DIALPREF_CMD 2
74 #define COMM_ANSWER_CMD 3
75 #define COMM_HANGUP_CMD 4
78 int comm_get_modem_info(int modem, COMM_OBJ *obj);
79 int comm_modem_input_line(COMM_OBJ *obj, int msecs, char *buffer, int chars);
80 int comm_modem_send_string(COMM_OBJ *obj, char *str);
81 int comm_modem_send_string_nowait(COMM_OBJ *obj, char *str, int term);
82 int comm_modem_reset(COMM_OBJ *obj);
83 int comm_modem_dial(COMM_OBJ *obj, char *phonenum);
84 int comm_modem_answer(COMM_OBJ *obj);
88 void comm_dump_info(COMM_OBJ *obj);