![]() |
libgpac
Documentation of the core library of GPAC
|
Configuration File object. More...
Functions | |
GF_Config * | gf_cfg_new (const char *filePath, const char *fileName) |
configuration file constructor More... | |
GF_Config * | gf_cfg_force_new (const char *filePath, const char *fileName) |
alternative configuration file constructor More... | |
void | gf_cfg_del (GF_Config *cfgFile) |
configuration file destructor More... | |
void | gf_cfg_remove (GF_Config *cfgFile) |
configuration file destructor More... | |
GF_Err | gf_cfg_save (GF_Config *cfgFile) |
configuration saving More... | |
const char * | gf_cfg_get_key (GF_Config *cfgFile, const char *secName, const char *keyName) |
key value query More... | |
GF_Err | gf_cfg_set_key (GF_Config *cfgFile, const char *secName, const char *keyName, const char *keyValue) |
key value update More... | |
u32 | gf_cfg_get_section_count (GF_Config *cfgFile) |
section count query More... | |
const char * | gf_cfg_get_section_name (GF_Config *cfgFile, u32 secIndex) |
section name query More... | |
u32 | gf_cfg_get_key_count (GF_Config *cfgFile, const char *secName) |
key count query More... | |
const char * | gf_cfg_get_key_name (GF_Config *cfgFile, const char *secName, u32 keyIndex) |
key count query More... | |
void | gf_cfg_del_section (GF_Config *cfgFile, const char *secName) |
section destrouction More... | |
const char * | gf_cfg_get_filename (GF_Config *iniFile) |
GF_Err | gf_cfg_discard_changes (GF_Config *iniFile) |
Configuration File object.
This section documents the configuration file objects of the GPAC framework. A specific global configuration file is used for libgpac, see Library configuration. Such objects may be used by third-party applications to store data, and are used by the player scripting API to store various GUI data. A configuration file is formatted as the INI file mode of WIN32 in sections and keys.
GF_Config* gf_cfg_new | ( | const char * | filePath, |
const char * | fileName | ||
) |
configuration file constructor
Constructs a configuration file.
filePath | directory the file is located in |
fileName | name of the configuration file |
GF_Config* gf_cfg_force_new | ( | const char * | filePath, |
const char * | fileName | ||
) |
alternative configuration file constructor
Constructs a configuration file. If file does not exist, configuration will be still created
filePath | directory the file is located in |
fileName | name of the configuration file |
void gf_cfg_del | ( | GF_Config * | cfgFile | ) |
configuration file destructor
Destroys the configuration file and saves it if needed.
cfgFile | the target configuration file |
void gf_cfg_remove | ( | GF_Config * | cfgFile | ) |
configuration file destructor
Destroys the configuration file and removes the file from disk.
cfgFile | the target configuration file |
GF_Err gf_cfg_save | ( | GF_Config * | cfgFile | ) |
configuration saving
Saves the configuration file if modified.
cfgFile | the target configuration file |
const char* gf_cfg_get_key | ( | GF_Config * | cfgFile, |
const char * | secName, | ||
const char * | keyName | ||
) |
key value query
Gets a key value from its section and name.
cfgFile | the target configuration file |
secName | the desired key parent section name |
keyName | the desired key name |
GF_Err gf_cfg_set_key | ( | GF_Config * | cfgFile, |
const char * | secName, | ||
const char * | keyName, | ||
const char * | keyValue | ||
) |
key value update
Sets a key value from its section and name.
cfgFile | the target configuration file |
secName | the desired key parent section name |
keyName | the desired key name |
keyValue | the desired key value |
u32 gf_cfg_get_section_count | ( | GF_Config * | cfgFile | ) |
section count query
Gets the number of sections in the configuration file
cfgFile | the target configuration file |
const char* gf_cfg_get_section_name | ( | GF_Config * | cfgFile, |
u32 | secIndex | ||
) |
section name query
Gets a section name based on its index
cfgFile | the target configuration file |
secIndex | 0-based index of the section to query |
u32 gf_cfg_get_key_count | ( | GF_Config * | cfgFile, |
const char * | secName | ||
) |
key count query
Gets the number of keys in a section of the configuration file
cfgFile | the target configuration file |
secName | the target section |
const char* gf_cfg_get_key_name | ( | GF_Config * | cfgFile, |
const char * | secName, | ||
u32 | keyIndex | ||
) |
key count query
Gets the number of keys in a section of the configuration file
cfgFile | the target configuration file |
secName | the target section |
keyIndex | 0-based index of the key in the section |
void gf_cfg_del_section | ( | GF_Config * | cfgFile, |
const char * | secName | ||
) |
section destrouction
Removes all entries in the given section
cfgFile | the target configuration file |
secName | the target section |
const char* gf_cfg_get_filename | ( | GF_Config * | iniFile | ) |
Get the full filename associated with this config file
iniFile | The Configuration |
GF_Err gf_cfg_discard_changes | ( | GF_Config * | iniFile | ) |
Do not save results to file
iniFile | The Configuration |