all repos — mgba @ e6ea94d2296eae963a48a18d009217a38d92bf9b

mGBA Game Boy Advance Emulator

src/util/configuration.h (view raw)

 1#ifndef CONFIGURATION_H
 2#define CONFIGURATION_H
 3
 4#include "util/table.h"
 5
 6struct VFile;
 7
 8struct Configuration {
 9	struct Table sections;
10	struct Table root;
11};
12
13void ConfigurationInit(struct Configuration*);
14void ConfigurationDeinit(struct Configuration*);
15
16void ConfigurationSetValue(struct Configuration*, const char* section, const char* key, const char* value);
17void ConfigurationSetIntValue(struct Configuration*, const char* section, const char* key, int value);
18void ConfigurationSetUIntValue(struct Configuration*, const char* section, const char* key, unsigned value);
19void ConfigurationSetFloatValue(struct Configuration*, const char* section, const char* key, float value);
20
21const char* ConfigurationGetValue(const struct Configuration*, const char* section, const char* key);
22
23bool ConfigurationRead(struct Configuration*, const char* path);
24bool ConfigurationWrite(const struct Configuration*, const char* path);
25bool ConfigurationWriteSection(const struct Configuration*, const char* path, const char* section);
26
27#endif