2 * Copyright (c) 1997, 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 * isdntel - isdn4bsd telephone answering support
28 * ==============================================
30 * $Id: defs.h,v 1.3 2009/04/16 05:56:33 lukem Exp $
34 * last edit-date: [Sat Jan 6 13:03:32 2001]
36 *----------------------------------------------------------------------------*/
49 #if defined(__FreeBSD__) && __FreeBSD__ >= 3
54 #include <sys/param.h>
57 #include <netisdn/i4b_ioctl.h>
63 #define SPOOLDIR "/var/isdn"
64 #define PLAYCMD "cat %s | g711conv -a >/dev/audio"
66 /* reread timeout in seconds */
68 #define REREADTIMEOUT 60
70 /* window dimensions */
72 #define START_O 3 /* main window start */
75 #define TIM_POS (DAT_POS+10)
76 #define DST_POS (TIM_POS+8)
77 #define SRC_POS (DST_POS+17)
78 #define ALI_POS (SRC_POS+17)
79 #define SEC_POS (ALI_POS+21)
80 #define LAST_POS (SEC_POS+5)
82 /* fullscreen mode menu window */
84 #define WMITEMS 5 /* no of items */
85 #define WMENU_LEN 18 /* window width */
86 #define WMENU_HGT (WMITEMS+4) /* window height */
87 #define WMENU_TITLE "Command"
88 #define WMENU_POSLN 8 /* window position: lines */
89 #define WMENU_POSCO 20 /* window position: columns */
98 char *fname
; /* filename */
106 struct onefile
*next
; /* ptr to next entry */
107 struct onefile
*prev
; /* prt to previous entry */
112 int curses_ready
= 0; /* flag, curses display is initialized */
114 struct onefile
*cur_file
= NULL
;/* the CURRENT filename */
115 struct onefile
*first
= NULL
; /* init dir-list head-ptr */
116 struct onefile
*last
= NULL
; /* init dir-list tail-ptr */
118 WINDOW
*main_w
; /* curses main window pointer */
123 const char *spooldir
= SPOOLDIR
;
124 const char *playstring
= PLAYCMD
;
128 extern int curses_ready
;
130 extern struct onefile
*cur_file
;
131 extern struct onefile
*first
;
132 extern struct onefile
*last
;
134 extern WINDOW
*main_w
;
139 extern char *spooldir
;
140 extern char *playstring
;
144 extern void init_alias( const char *filename
);
145 extern void init_files( int inipos
);
146 extern void init_screen ( void );
147 extern void do_menu ( void );
148 extern int fill_list( void );
149 extern char *get_alias( char *number
);
150 extern int main ( int argc
, char **argv
);
151 extern void do_quit ( int exitval
);
152 extern void fatal ( const char *fmt
, ... )
153 __attribute__((__noreturn__
, __format__(__printf__
, 1, 2)));
154 extern void error ( const char *fmt
, ... )
155 __attribute__((__format__(__printf__
, 1, 2)));
156 extern void play ( struct onefile
* );
157 extern void delete ( struct onefile
* );
158 extern void reread( void );