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 $
34 * last edit-date: [Mon Dec 13 21:52:46 1999]
36 *----------------------------------------------------------------------------*/
51 #include <sys/ioctl.h>
52 #include <sys/soundcard.h>
53 #include <sys/types.h>
55 #include <sys/param.h>
57 #include <i4b/i4b_ioctl.h>
58 #include <i4b/i4b_tel_ioctl.h>
60 /* device file prefixes */
62 #define I4BTELDEVICE "/dev/i4btel"
63 #define I4BTELDDEVICE "/dev/i4bteld"
64 #define AUDIODEVICE "/dev/audio"
70 /* main window dimensions */
95 /* fullscreen mode menu window */
97 #define WMITEMS 4 /* no of items */
98 #define WMENU_LEN 18 /* window width */
99 #define WMENU_HGT (WMITEMS+4) /* window height */
100 #define WMENU_TITLE "Command"
101 #define WMENU_POSLN 8 /* window position: lines */
102 #define WMENU_POSCO 20 /* window position: columns */
115 #define AUDIORATE 8000
119 WINDOW *main_w; /* curses main window pointer */
122 int curses_ready = 0; /* flag, curses display is initialized */
135 char numberbuffer[TELNO_MAX];
137 int play_fmt = AFMT_MU_LAW;
138 int rec_fmt = AFMT_MU_LAW;
144 extern WINDOW *main_w;
145 extern WINDOW *dbg_w;
147 extern int curses_ready;
150 extern char *states[];
156 extern char numberbuffer[];
166 extern void audio_hdlr ( void );
167 extern void tel_hdlr ( void );
168 extern void init_mainw ( void );
169 extern int init_audio ( char * );
170 extern void do_menu ( void );
171 extern int main ( int argc, char **argv );
172 extern void do_quit ( int exitval );
173 extern void fatal ( char *fmt, ... );
174 extern void message ( char *fmt, ... );
175 extern void do_dial ( char *number );
176 extern void do_hangup ( void );
178 extern void audiowrite ( int, unsigned char * );
179 extern void telwrite ( int, unsigned char * );
181 extern void newstate ( int newstate );
183 int init_dial(char *device);
184 void dial_hdlr(void);
185 int init_tel(char *device);
187 extern void debug ( char *fmt, ... );