First step towards the v0.5 API. New configfile routines in use.

Configfile adapted. For drivers: configfile routines are available.
This commit is contained in:
robijn
2001-10-24 14:26:15 +00:00
parent 15325e8e3b
commit dc0f01850b
9 changed files with 1288 additions and 500 deletions
+1 -2
View File
@@ -257,7 +257,7 @@ lcd_list_drivers (void) {
// This function initializes a few basics as well as the
// "base" array. To initialize a specific driver, use the
// lcd_add_driver() function.
//
//
// This was eliminated; everything
// done here is to be replaced by the use of lcd_add_driver()...
int
@@ -379,7 +379,6 @@ lcd_drv_patch_init (struct lcd_logical_driver *driver)
*
*/
static
void *
lcd_find_init (char *driver) {
int i;
+20
View File
@@ -71,6 +71,26 @@ typedef struct lcd_logical_driver {
void (*heartbeat) (int type);
// more?
// Config file functions, filled by server
char (*config_get_bool) (char * sectionname, char * keyname,
int skip, char default_value);
int (*config_get_int) (char * sectionname, char * keyname,
int skip, int default_value);
double (*config_get_float) (char * sectionname, char * keyname,
int skip, double default_value);
char *(*config_get_string) (char * sectionname, char * keyname,
int skip, char * default_value);
// Returns a string in server memory space.
// Copy this string.
int (*config_has_section) (char *sectionname);
int (*config_has_key) (char *sectionname, char *keyname);
// Driver private data
int (*store_private_ptr) (struct lcd_logical_driver * driver, void * private_data);
void * private_data; // Filled by server by calling store_private_ptr()
// Driver should cast this to it's own
// private structure pointer
} lcd_logical_driver;
typedef struct lcd_physical_driver {