haiku/headers/os/drivers/driver_settings.h
Axel Dörfler 33aa726c5a Added extra new driver_settings API calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-15 20:46:13 +00:00

53 lines
1.4 KiB
C

#ifndef _DRIVER_SETTINGS_H
#define _DRIVER_SETTINGS_H
#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;
#ifdef __cplusplus
extern "C" {
#endif
extern void *load_driver_settings(const char *driverName);
extern status_t unload_driver_settings(void *handle);
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);
/* 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 */