Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

config.h

Go to the documentation of this file.
00001 #ifndef _CONFIG_H_
00002 #define _CONFIG_H_
00003 
00004 /*
00005  * Copyright (C) 2006-2007 by egnite Software GmbH. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00024  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  * For additional information see http://www.ethernut.de/
00034  */
00035 
00047 #include <sys/types.h>
00048 
00049 #ifndef VERSION
00050 #define VERSION "1.0.2"
00051 #endif
00052 
00053 #ifndef MAXNUM_STATIONS
00054 #if defined (AT91SAM9260_EK)
00055 #define MAXNUM_STATIONS     128
00056 #else
00057 #define MAXNUM_STATIONS     8
00058 #endif
00059 #endif
00060 
00061 #ifndef MAX_PLAYERRORS
00062 #define MAX_PLAYERRORS   32
00063 #endif
00064 
00065 #ifndef MAX_WAIT_MP3BUF_FILLED
00066 #define MAX_WAIT_MP3BUF_FILLED  10
00067 #endif
00068 
00069 #ifndef DAC_OUTPUT_RATE
00070 #if defined (AT91SAM9260_EK)
00071 #define DAC_OUTPUT_RATE     44100
00072 #else
00073 #define DAC_OUTPUT_RATE     8000
00074 #endif
00075 #endif
00076 
00077 /*
00078  * Wether we should run a web interface.
00079  */
00080 #if defined(AT91SAM9260_EK)
00081 #define USE_HTTPSERVER
00082 #endif
00083 
00084 /*
00085  * Maximum segment size, choose 536 up to 1460. Note, that segment 
00086  * sizes above 536 may result in fragmented packets. Remember, that 
00087  * Nut/Net doesn't support TCP fragmentation.
00088  */
00089 #ifndef MAX_TCPSEG_SIZE
00090 #define MAX_TCPSEG_SIZE 536
00091 #endif
00092 
00093 /*
00094  * TCP buffer size.
00095  */
00096 #ifndef MAX_TCPBUF_SIZE
00097 #if defined(AT91SAM9260_EK)
00098 #define MAX_TCPBUF_SIZE (60 * MAX_TCPSEG_SIZE)
00099 #else
00100 #define MAX_TCPBUF_SIZE (3 * MAX_TCPSEG_SIZE)
00101 #endif
00102 #endif
00103 
00104 #ifndef MP3_BUFSIZ
00105 #if defined (AT91SAM9260_EK)
00106 #define MP3_BUFSIZ          1048576
00107 #else
00108 #define MP3_BUFSIZ          (4 * MAINBUF_SIZE)
00109 #endif
00110 #endif
00111 
00112 #ifndef MAX_WAITSTREAM
00113 #define MAX_WAITSTREAM      20
00114 #endif
00115 
00116 /*
00117  * Socket receive timeout.
00118  */
00119 #ifndef MAX_TCPRCV_WAIT
00120 #define MAX_TCPRCV_WAIT     5000
00121 #endif
00122 
00123 typedef struct {
00124     u_long proxy_ip;
00125     u_short proxy_port;
00126     u_char *proxy_user;
00127 } HTTP_PROXY;
00128 
00129 extern HTTP_PROXY proxy;
00130 
00131 typedef struct {
00134     char *rs_symbol;
00135 
00140     u_short rs_port;
00141 
00144     u_long rs_ip;
00145 
00150     char *rs_url_path;
00151 } STATIONCONF;
00152 
00153 extern STATIONCONF *station;
00154 
00155 __BEGIN_DECLS
00156 /* Prototypes */
00157 
00158 extern void ConfigResetFactory(void);
00159 extern int ConfigStation(u_char idx, CONST char *symbol, CONST char * url);
00160 
00161 __END_DECLS
00162 /* End of prototypes */
00163 #endif

Generated on Fri Feb 23 17:28:49 2007 for SAM Internet Radio by  doxygen 1.4.4