xref: /haiku/headers/private/fs_shell/fssh_driver_settings.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 #ifndef _FSSH_DRIVER_SETTINGS_H
2 #define _FSSH_DRIVER_SETTINGS_H
3 
4 
5 #include "fssh_defs.h"
6 
7 
8 typedef struct fssh_driver_parameter {
9 	char *name;
10 	int	value_count;
11 	char **values;
12 	int parameter_count;
13 	struct fssh_driver_parameter *parameters;
14 } fssh_driver_parameter;
15 
16 typedef struct fssh_driver_settings {
17 	int parameter_count;
18 	struct fssh_driver_parameter *parameters;
19 } fssh_driver_settings;
20 
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
27 extern void*			fssh_load_driver_settings(const char *driverName);
28 extern fssh_status_t	fssh_unload_driver_settings(void *handle);
29 
30 extern void*			fssh_parse_driver_settings_string(
31 							const char *settingsString);
32 extern fssh_status_t	fssh_get_driver_settings_string(void *_handle,
33 							char *buffer, fssh_size_t *_bufferSize, bool flat);
34 extern fssh_status_t	fssh_delete_driver_settings(void *handle);
35 
36 extern const char*		fssh_get_driver_parameter(void *handle, const char *key,
37 							const char *unknownValue,	/* key not present */
38 							const char *noargValue);	/* key has no value */
39 extern bool				fssh_get_driver_boolean_parameter(void *handle,
40 							const char *key, bool unknownValue,
41 							bool noargValue);
42 
43 extern const fssh_driver_settings *fssh_get_driver_settings(void *handle);
44 
45 /* Pass this in as drivername to access safe mode settings */
46 #define FSSH_B_SAFEMODE_DRIVER_SETTINGS	"/safemode/"
47 
48 /* Pass this as the key value to check if safe mode is enabled */
49 #define FSSH_B_SAFEMODE_SAFE_MODE		"safemode"
50 
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif	// _FSSH_DRIVER_SETTINGS_H
57