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