webradio/config.h File Reference


Detailed Description

Configuration items.

 *
 * $Log$
 *
 * 

Definition in file config.h.

Go to the source code of this file.

Data Structures

struct  HTTP_PROXY
 Proxy configuration structure. More...

Defines

#define VERSION   "1.2.0"
#define USE_LARGE_RAM   1
#define MAX_WAIT_MP3BUF_FILLED   10
#define USE_HTTPSERVER
#define HTTPD_TCP_TIMEOUT   500
#define USE_DYNAMIC_THREADS
#define MAX_TCPSEG_SIZE   536
#define MAX_TCPBUF_SIZE   (60 * MAX_TCPSEG_SIZE)
#define MP3_BUFSIZ   1048576
#define MAX_WAITSTREAM   20
#define MAX_TCPRCV_WAIT   5000

Functions

int ConfigInit (void)
void ConfigResetFactory (void)
 Reset configuration to factory defaults.
size_t ConfigSize (void)
 Calculate total size of configuration data.
int ConfigLoad (void)
int ConfigSave (void)
 Save configuration in non volatile memory.
void ConfigFlush (void)
void ConfigSaveString (char *str)
size_t ConfigLoadString (char *str, size_t size)
void ConfigSaveBinary (void *data, size_t len)
void ConfigLoadBinary (void *data, size_t len)
void ConfigRewind (u_long pgn)

Variables

HTTP_PROXY proxy
 HTTP proxy configuration.


Define Documentation

#define VERSION   "1.2.0"

Definition at line 51 of file config.h.

Referenced by CgiVars(), main(), and UserIfShowStatus().

#define USE_LARGE_RAM   1

Definition at line 56 of file config.h.

#define MAX_WAIT_MP3BUF_FILLED   10

Definition at line 94 of file config.h.

Referenced by ShoutCastThread().

#define USE_HTTPSERVER

Definition at line 105 of file config.h.

#define HTTPD_TCP_TIMEOUT   500

Definition at line 107 of file config.h.

Referenced by Service().

#define USE_DYNAMIC_THREADS

Definition at line 112 of file config.h.

#define MAX_TCPSEG_SIZE   536

Definition at line 120 of file config.h.

Referenced by StationConnect().

#define MAX_TCPBUF_SIZE   (60 * MAX_TCPSEG_SIZE)

Definition at line 128 of file config.h.

Referenced by StationConnect().

#define MP3_BUFSIZ   1048576

Definition at line 136 of file config.h.

#define MAX_WAITSTREAM   20

Definition at line 143 of file config.h.

#define MAX_TCPRCV_WAIT   5000

Definition at line 150 of file config.h.

Referenced by OpenTcpStream(), ShoutCastGetPlayList(), and StationConnect().


Function Documentation

int ConfigInit ( void   ) 

Definition at line 480 of file config.c.

References at45db, InitElektorHardware(), and page_size.

Here is the call graph for this function:

InitElektorHardware

void ConfigResetFactory ( void   ) 

Reset configuration to factory defaults.

Definition at line 470 of file config.c.

References LOG_CONFIG, LogMsg(), webradio, WEBRADIO::wr_gain, WEBRADIO::wr_pridns, and WEBRADIO::wr_secdns.

Here is the call graph for this function:

LogMsg

size_t ConfigSize ( void   ) 

Calculate total size of configuration data.

Should be used to avoid configuration data overflow. Untested.

Returns:
Number of bytes used by configuration data.

Definition at line 223 of file config.c.

References favlist, MAX_FAVORITES, RADIOSTATION::rs_name, RADIOSTATION::rs_streams, and RADIOSTATION::rs_uri.

int ConfigLoad ( void   ) 

Definition at line 438 of file config.c.

References CONFIG_MAGIC, CONFIG_SECTOR, ConfigLoadBinary(), ConfigLoadString(), ConfigRewind(), LOG_CONFIG, LogMsg(), HTTP_PROXY::proxy_host, HTTP_PROXY::proxy_port, webradio, WEBRADIO::wr_gain, WEBRADIO::wr_pridns, and WEBRADIO::wr_secdns.

Here is the call graph for this function:

ConfigLoadBinaryConfigLoadStringConfigRewindLogMsg

int ConfigSave ( void   ) 

Save configuration in non volatile memory.

Definition at line 416 of file config.c.

References CONFIG_MAGIC, CONFIG_SECTOR, ConfigFlush(), ConfigRewind(), ConfigSaveBinary(), ConfigSaveString(), LOG_CONFIG, LogMsg(), HTTP_PROXY::proxy_host, HTTP_PROXY::proxy_port, webradio, WEBRADIO::wr_gain, WEBRADIO::wr_pridns, and WEBRADIO::wr_secdns.

Here is the call graph for this function:

ConfigFlushConfigRewindConfigSaveBinaryConfigSaveStringLogMsg

void ConfigFlush ( void   ) 

Definition at line 248 of file config.c.

References at45db, page_size, pgbuf, pgnum, and pgpos.

void ConfigSaveString ( char *  str  ) 

Definition at line 280 of file config.c.

References ConfigPut().

Here is the call graph for this function:

ConfigPutConfigFlush

size_t ConfigLoadString ( char *  str,
size_t  size 
)

Definition at line 288 of file config.c.

References ConfigGet().

Here is the call graph for this function:

ConfigGet

void ConfigSaveBinary ( void *  data,
size_t  len 
)

Definition at line 302 of file config.c.

References ConfigPut().

Here is the call graph for this function:

ConfigPutConfigFlush

void ConfigLoadBinary ( void *  data,
size_t  len 
)

Definition at line 312 of file config.c.

References ConfigGet().

Here is the call graph for this function:

ConfigGet

void ConfigRewind ( u_long  pgn  ) 

Definition at line 321 of file config.c.

References pgnum, and pgpos.


Variable Documentation

HTTP_PROXY proxy

HTTP proxy configuration.

Definition at line 72 of file config.c.


© 2008 by egnite GmbH - visit www.ethernut.de