Fix FreeBSD build.
[haiku.git] / headers / os / drivers / driver_settings.h
blob219d18fee99d8eac6c7db2817af14ab8af399d46
1 #ifndef _DRIVER_SETTINGS_H
2 #define _DRIVER_SETTINGS_H
5 #include <OS.h>
8 typedef struct driver_parameter {
9 char *name;
10 int value_count;
11 char **values;
12 int parameter_count;
13 struct driver_parameter *parameters;
14 } driver_parameter;
16 typedef struct driver_settings {
17 int parameter_count;
18 struct driver_parameter *parameters;
19 } driver_settings;
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 extern void *load_driver_settings(const char *driverName);
27 extern void *load_driver_settings_file(int fd);
28 extern status_t unload_driver_settings(void *handle);
30 extern void *parse_driver_settings_string(const char *settingsString);
31 extern status_t get_driver_settings_string(void *_handle, char *buffer,
32 size_t *_bufferSize, bool flat);
33 extern status_t delete_driver_settings(void *handle);
35 extern const char *get_driver_parameter(void *handle, const char *key,
36 const char *unknownValue, /* key not present */
37 const char *noargValue); /* key has no value */
38 extern bool get_driver_boolean_parameter(void *handle, const char *key,
39 bool unknownValue, bool noargValue);
41 extern const driver_settings *get_driver_settings(void *handle);
43 /* Pass this in as drivername to access safe mode settings */
44 #define B_SAFEMODE_DRIVER_SETTINGS "/safemode/"
46 /* Pass this as the key value to check if safe mode is enabled */
47 #define B_SAFEMODE_SAFE_MODE "safemode"
49 #ifdef __cplusplus
51 #endif
53 #endif /* _DRIVER_SETTINGS_H */