4 #define CONFIG_ALL 0xFF
6 #define CONFIG_OPL 0x01
7 #define CONFIG_LAST 0x02
8 #define CONFIG_APPS 0x04
10 #define CONFIG_FILE_NUM 3
12 #define CONFIG_ITEM_NAME "#Name"
13 #define CONFIG_ITEM_LONGNAME "#LongName"
14 #define CONFIG_ITEM_SIZE "#Size"
15 #define CONFIG_ITEM_FORMAT "#Format"
16 #define CONFIG_ITEM_MEDIA "#Media"
17 #define CONFIG_ITEM_STARTUP "#Startup"
18 #define CONFIG_ITEM_ALTSTARTUP "$AltStartup"
19 #define CONFIG_ITEM_VMC "$VMC"
20 #define CONFIG_ITEM_COMPAT "$Compatibility"
21 #define CONFIG_ITEM_DMA "$DMA"
22 #define CONFIG_ITEM_DNAS "$DNAS"
24 struct config_value_t
{
28 struct config_value_t
*next
;
33 struct config_value_t
*head
;
34 struct config_value_t
*tail
;
39 void configInit(char *prefix
);
41 config_set_t
*configAlloc(int type
, config_set_t
*configSet
, char *fileName
);
42 void configFree(config_set_t
*configSet
);
43 config_set_t
*configGetByType(int type
);
44 int configSetStr(config_set_t
* configSet
, const char* key
, const char* value
);
45 int configGetStr(config_set_t
* configSet
, const char* key
, char** value
);
46 void configGetStrCopy(config_set_t
* configSet
, const char* key
, char* value
);
47 int configSetInt(config_set_t
* configSet
, const char* key
, const int value
);
48 int configGetInt(config_set_t
* configSet
, const char* key
, int* value
);
49 int configSetColor(config_set_t
* configSet
, const char* key
, unsigned char* color
);
50 int configGetColor(config_set_t
* configSet
, const char* key
, unsigned char* color
);
51 int configRemoveKey(config_set_t
* configSet
, const char* key
);
55 void configGetDiscIDBinary(config_set_t
* configSet
, void* dst
);
57 int configRead(config_set_t
* configSet
);
58 int configReadMulti(int types
);
59 int configWrite(config_set_t
* configSet
);
60 int configWriteMulti(int types
);
61 void configClear(config_set_t
* configSet
);
64 void configGetVMC(config_set_t
* configSet
, char* vmc
, int slot
);
65 void configSetVMC(config_set_t
* configSet
, const char* vmc
, int slot
);
66 void configRemoveVMC(config_set_t
* configSet
, int slot
);