lib/efreet_ini.h File Reference

Go to the source code of this file.
Data Structures | |
struct | Efreet_Ini |
Contains all the information about an ini file. More... | |
Typedefs | |
typedef struct Efreet_Ini | Efreet_Ini |
Functions | |
EAPI unsigned int | efreet_ini_boolean_get (Efreet_Ini *ini, const char *key) |
Retrieves the boolean value at key key from the ini ini. | |
EAPI void | efreet_ini_boolean_set (Efreet_Ini *ini, const char *key, unsigned int value) |
Sets the value for the given key. | |
EAPI double | efreet_ini_double_get (Efreet_Ini *ini, const char *key) |
Retrieves the value for the given key or -1 if none found. | |
EAPI void | efreet_ini_double_set (Efreet_Ini *ini, const char *key, double value) |
Sets the value for the given key. | |
EAPI void | efreet_ini_free (Efreet_Ini *ini) |
Frees the given Efree_Ini structure. | |
EAPI int | efreet_ini_int_get (Efreet_Ini *ini, const char *key) |
Retrieves the value for the given key or -1 if none found. | |
EAPI void | efreet_ini_int_set (Efreet_Ini *ini, const char *key, int value) |
Sets the value for the given key. | |
EAPI const char * | efreet_ini_localestring_get (Efreet_Ini *ini, const char *key) |
Retrieves the utf8 encoded string associated with key in the current locale or NULL if none found. | |
EAPI void | efreet_ini_localestring_set (Efreet_Ini *ini, const char *key, const char *value) |
Sets the value for the given key. | |
EAPI Efreet_Ini * | efreet_ini_new (const char *file) |
Creates and initializes a new Ini structure with the contents of file, or NULL on failure. | |
EAPI int | efreet_ini_save (Efreet_Ini *ini, const char *path) |
Saves the given Efree_Ini structure. | |
EAPI void | efreet_ini_section_add (Efreet_Ini *ini, const char *section) |
Adds a new working section of the ini file to section. | |
EAPI int | efreet_ini_section_set (Efreet_Ini *ini, const char *section) |
Sets the current working section of the ini file to section. | |
EAPI const char * | efreet_ini_string_get (Efreet_Ini *ini, const char *key) |
Retrieves the value for the given key or NULL if none found. | |
EAPI void | efreet_ini_string_set (Efreet_Ini *ini, const char *key, const char *value) |
Sets the value for the given key. |
Typedef Documentation
typedef struct Efreet_Ini Efreet_Ini |
Function Documentation
EAPI unsigned int efreet_ini_boolean_get | ( | Efreet_Ini * | ini, | |
const char * | key | |||
) |
Retrieves the boolean value at key key from the ini ini.
- Parameters:
-
ini,: The ini struct to work with key,: The key to search for
- Returns:
- Returns 1 if the boolean is true, 0 otherwise
References efreet_ini_string_get(), and Efreet_Ini::section.
EAPI void efreet_ini_boolean_set | ( | Efreet_Ini * | ini, | |
const char * | key, | |||
unsigned int | value | |||
) |
Sets the value for the given key.
- Parameters:
-
ini,: The ini struct to work with key,: The key to use value,: The value to set
- Returns:
- Returns no value
References efreet_ini_string_set(), and Efreet_Ini::section.
EAPI double efreet_ini_double_get | ( | Efreet_Ini * | ini, | |
const char * | key | |||
) |
Retrieves the value for the given key or -1 if none found.
- Parameters:
-
ini,: The Efree_Ini to work with key,: The key to lookup
- Returns:
- Returns the double associated with the given key or -1 if not found.
References efreet_ini_string_get(), and Efreet_Ini::section.
EAPI void efreet_ini_double_set | ( | Efreet_Ini * | ini, | |
const char * | key, | |||
double | value | |||
) |
Sets the value for the given key.
- Parameters:
-
ini,: The Efree_Ini to work with key,: The key to use value,: The value to set
- Returns:
- Returns no value
References efreet_ini_string_set(), and Efreet_Ini::section.
Referenced by efreet_desktop_save().
EAPI void efreet_ini_free | ( | Efreet_Ini * | ini | ) |
Frees the given Efree_Ini structure.
- Parameters:
-
ini,: The Efreet_Ini to work with
- Returns:
- Returns no value
References Efreet_Ini::data, FREE, and IF_FREE_HASH.
Referenced by efreet_desktop_save().
EAPI int efreet_ini_int_get | ( | Efreet_Ini * | ini, | |
const char * | key | |||
) |
Retrieves the value for the given key or -1 if none found.
- Parameters:
-
ini,: The Efree_Ini to work with key,: The key to lookup
- Returns:
- Returns the integer associated with the given key or -1 if not found.
References efreet_ini_string_get(), and Efreet_Ini::section.
EAPI void efreet_ini_int_set | ( | Efreet_Ini * | ini, | |
const char * | key, | |||
int | value | |||
) |
Sets the value for the given key.
- Parameters:
-
ini,: The Efree_Ini to work with key,: The key to use value,: The value to set
- Returns:
- Returns no value
References efreet_ini_string_set(), and Efreet_Ini::section.
EAPI const char* efreet_ini_localestring_get | ( | Efreet_Ini * | ini, | |
const char * | key | |||
) |
Retrieves the utf8 encoded string associated with key in the current locale or NULL if none found.
- Parameters:
-
ini,: The ini struct to work with key,: The key to search for
- Returns:
- Returns the utf8 encoded string associated with key, or NULL if none found
References efreet_ini_string_get(), efreet_lang_country_get(), efreet_lang_get(), efreet_lang_modifier_get(), FREE, and Efreet_Ini::section.
EAPI void efreet_ini_localestring_set | ( | Efreet_Ini * | ini, | |
const char * | key, | |||
const char * | value | |||
) |
Sets the value for the given key.
- Parameters:
-
ini,: The ini struct to work with key,: The key to use value,: The value to set
- Returns:
- Returns no value
References efreet_ini_string_set(), efreet_lang_country_get(), efreet_lang_get(), efreet_lang_modifier_get(), FREE, and Efreet_Ini::section.
EAPI Efreet_Ini* efreet_ini_new | ( | const char * | file | ) |
Creates and initializes a new Ini structure with the contents of file, or NULL on failure.
- Parameters:
-
file,: The file to parse
- Returns:
- Returns a new Efreet_Ini structure initialized with the contents of file, or NULL on memory allocation failure
References Efreet_Ini::data, and NEW.
Referenced by efreet_desktop_save().
EAPI int efreet_ini_save | ( | Efreet_Ini * | ini, | |
const char * | file | |||
) |
Saves the given Efree_Ini structure.
- Parameters:
-
ini,: The Efreet_Ini to work with file,: The file to load
- Returns:
- Returns no value
References Efreet_Ini::data.
Referenced by efreet_desktop_save().
EAPI void efreet_ini_section_add | ( | Efreet_Ini * | ini, | |
const char * | section | |||
) |
Adds a new working section of the ini file to section.
- Parameters:
-
ini,: The Efreet_Ini to work with section,: The section of the ini file we want to add
- Returns:
- Returns no value
References Efreet_Ini::data.
Referenced by efreet_desktop_save().
EAPI int efreet_ini_section_set | ( | Efreet_Ini * | ini, | |
const char * | section | |||
) |
Sets the current working section of the ini file to section.
- Parameters:
-
ini,: The Efreet_Ini to work with section,: The section of the ini file we want to get values from
- Returns:
- Returns 1 if the section exists, otherwise 0
References Efreet_Ini::data, and Efreet_Ini::section.
Referenced by efreet_desktop_save().
EAPI const char* efreet_ini_string_get | ( | Efreet_Ini * | ini, | |
const char * | key | |||
) |
Retrieves the value for the given key or NULL if none found.
- Parameters:
-
ini,: The Efree_Ini to work with key,: The key to lookup
- Returns:
- Returns the string associated with the given key or NULL if not found.
References Efreet_Ini::section.
Referenced by efreet_ini_boolean_get(), efreet_ini_double_get(), efreet_ini_int_get(), and efreet_ini_localestring_get().
EAPI void efreet_ini_string_set | ( | Efreet_Ini * | ini, | |
const char * | key, | |||
const char * | value | |||
) |
Sets the value for the given key.
- Parameters:
-
ini,: The Efree_Ini to work with key,: The key to use value,: The value to set
- Returns:
- Returns no value
References Efreet_Ini::section.
Referenced by efreet_desktop_save(), efreet_ini_boolean_set(), efreet_ini_double_set(), efreet_ini_int_set(), and efreet_ini_localestring_set().