2 * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 *---------------------------------------------------------------------------
27 * isdnphone - header file
28 * =======================
30 * $Id: defs.h,v 1.6 1999/12/13 21:25:26 hm Exp $
32 * $FreeBSD: src/usr.sbin/i4b/isdnphone/defs.h,v 1.2.2.1 2001/08/01 17:45:06 obrien Exp $
33 * $DragonFly: src/usr.sbin/i4b/isdnphone/defs.h,v 1.3 2003/08/08 04:18:45 dillon Exp $
35 * last edit-date: [Mon Dec 13 21:52:46 1999]
37 *----------------------------------------------------------------------------*/
52 #include <sys/ioctl.h>
53 #include <sys/soundcard.h>
54 #include <sys/types.h>
56 #include <sys/param.h>
58 #include <i4b_machine/i4b_ioctl.h>
59 #include <i4b_machine/i4b_tel_ioctl.h>
61 /* device file prefixes */
63 #define I4BTELDEVICE "/dev/i4btel"
64 #define I4BTELDDEVICE "/dev/i4bteld"
65 #define AUDIODEVICE "/dev/audio"
71 /* main window dimensions */
96 /* fullscreen mode menu window */
98 #define WMITEMS 4 /* no of items */
99 #define WMENU_LEN 18 /* window width */
100 #define WMENU_HGT (WMITEMS+4) /* window height */
101 #define WMENU_TITLE "Command"
102 #define WMENU_POSLN 8 /* window position: lines */
103 #define WMENU_POSCO 20 /* window position: columns */
116 #define AUDIORATE 8000
120 WINDOW *main_w; /* curses main window pointer */
123 int curses_ready = 0; /* flag, curses display is initialized */
136 char numberbuffer[TELNO_MAX];
138 int play_fmt = AFMT_MU_LAW;
139 int rec_fmt = AFMT_MU_LAW;
145 extern WINDOW *main_w;
146 extern WINDOW *dbg_w;
148 extern int curses_ready;
151 extern char *states[];
157 extern char numberbuffer[];
167 extern void audio_hdlr ( void );
168 extern void tel_hdlr ( void );
169 extern void init_mainw ( void );
170 extern int init_audio ( char * );
171 extern void do_menu ( void );
172 extern int main ( int argc, char **argv );
173 extern void do_quit ( int exitval );
174 extern void fatal ( char *fmt, ... );
175 extern void message ( char *fmt, ... );
176 extern void do_dial ( char *number );
177 extern void do_hangup ( void );
179 extern void audiowrite ( int, unsigned char * );
180 extern void telwrite ( int, unsigned char * );
182 extern void newstate ( int newstate );
184 int init_dial(char *device);
185 void dial_hdlr(void);
186 int init_tel(char *device);
188 extern void debug ( char *fmt, ... );