2002-08-08 02:36:49 +04:00
|
|
|
#ifndef _DRIVER_SETTINGS_H
|
|
|
|
#define _DRIVER_SETTINGS_H
|
|
|
|
|
2003-06-16 00:46:13 +04:00
|
|
|
|
2002-08-08 02:36:49 +04:00
|
|
|
#include <OS.h>
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct driver_parameter {
|
|
|
|
char *name;
|
|
|
|
int value_count;
|
|
|
|
char **values;
|
|
|
|
int parameter_count;
|
|
|
|
struct driver_parameter *parameters;
|
|
|
|
} driver_parameter;
|
|
|
|
|
|
|
|
typedef struct driver_settings {
|
|
|
|
int parameter_count;
|
|
|
|
struct driver_parameter *parameters;
|
|
|
|
} driver_settings;
|
|
|
|
|
2003-06-16 00:46:13 +04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void *load_driver_settings(const char *driverName);
|
2002-08-08 02:36:49 +04:00
|
|
|
extern status_t unload_driver_settings(void *handle);
|
2003-06-16 00:46:13 +04:00
|
|
|
|
|
|
|
extern void *parse_driver_settings_string(const char *settingsString);
|
|
|
|
extern status_t get_driver_settings_string(void *_handle, char *buffer,
|
|
|
|
size_t *_bufferSize, bool flat);
|
|
|
|
extern status_t delete_driver_settings(void *handle);
|
|
|
|
|
|
|
|
extern const char *get_driver_parameter(void *handle, const char *key,
|
|
|
|
const char *unknownValue, /* key not present */
|
|
|
|
const char *noargValue); /* key has no value */
|
|
|
|
extern bool get_driver_boolean_parameter(void *handle, const char *key,
|
|
|
|
bool unknownValue, bool noargValue);
|
|
|
|
|
|
|
|
extern const driver_settings *get_driver_settings(void *handle);
|
2002-08-08 02:36:49 +04:00
|
|
|
|
|
|
|
/* Pass this in as drivername to access safe mode settings */
|
|
|
|
#define B_SAFEMODE_DRIVER_SETTINGS "/safemode/"
|
|
|
|
|
|
|
|
/* Pass this as the key value to check if safe mode is enabled */
|
|
|
|
#define B_SAFEMODE_SAFE_MODE "safemode"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _DRIVER_SETTINGS_H */
|