]> icculus.org git repositories - taylor/freespace2.git/blob - include/osregistry.h
finished cfilesystem.
[taylor/freespace2.git] / include / osregistry.h
1 #ifndef _FS2_REGISTRY_HEADER_FILE
2 #define _FS2_REGISTRY_HEADER_FILE
3
4 #include <stdlib.h>
5
6 // ------------------------------------------------------------------------------------------------------------
7 // REGISTRY DEFINES/VARS
8 //
9
10 // exectuable defines
11 extern char *Osreg_company_name;
12 extern char *Osreg_class_name;
13 extern char *Osreg_app_name;
14 extern char *Osreg_title;
15
16
17 // ------------------------------------------------------------------------------------------------------------
18 // REGISTRY FUNCTIONS
19 //
20
21
22 // initialize the registry. setup default keys to use
23 void os_init_registry_stuff(char *company, char *app, char *version);
24
25 // Removes a value from to the INI file.  Passing
26 // name=NULL will delete the section.
27 void os_config_remove( char *section, char *name );
28
29 // Writes a string to the registry
30 void os_config_write_string( char *section, char *name, char *value );
31
32 // same as previous function except we don't use the application name to build up the keyname
33 void os_config_write_string2( char *section, char *name, char *value );
34
35 // Writes an unsigned int to the INI file.  
36 void os_config_write_uint( char *section, char *name, unsigned int value );
37
38 // Reads a string from the INI file.  If default is passed,
39 // and the string isn't found, returns ptr to default otherwise
40 // returns NULL;    Copy the return value somewhere before
41 // calling os_read_string again, because it might reuse the
42 // same buffer.
43 char * os_config_read_string( char *section, char *name, char *default_value=NULL );
44
45 // same as previous function except we don't use the application name to build up the keyname
46 char * os_config_read_string2( char *section, char *name, char *default_value=NULL );
47
48 // Reads a string from the INI file.  Default_value must 
49 // be passed, and if 'name' isn't found, then returns default_value
50 unsigned int  os_config_read_uint( char *section, char *name, unsigned int default_value );
51
52 // uses Ex versions of Windows registry functions
53 char * os_config_read_string_ex( char *keyname, char *name, char *default_value );
54
55 #endif
56