Lines Matching refs:config
28 // Creates a new config object with no entries (i.e. not backed by a file).
29 // This function returns a config object or NULL on error. Clients must call
33 // Loads the specified file and returns a handle to the config file. If there
41 // Returns a new config which is a copy and separated from the original;
42 // changes to the new config are not reflected in any way in the original.
49 // Frees resources associated with the config file. No further operations may
50 // be performed on the |config| object after calling this function. |config|
52 void config_free(config_t* config);
54 // Returns true if the config file contains a section named |section|. If
56 // |config| and |section| must not be NULL.
57 bool config_has_section(const config_t* config, const char* section);
59 // Returns true if the config file has a key named |key| under |section|.
60 // Returns false otherwise. |config|, |section|, and |key| must not be NULL.
61 bool config_has_key(const config_t* config, const char* section,
66 // this function returns |def_value|. |config|, |section|, and |key| must not
68 int config_get_int(const config_t* config, const char* section, const char* key,
73 // function returns |def_value|. |config|, |section|, and |key| must not be
75 bool config_get_bool(const config_t* config, const char* section,
80 // is owned by the config module and must not be freed. |config|, |section|,
82 const char* config_get_string(const config_t* config, const char* section,
86 // not already exist, this function creates them. |config|, |section|, and |key|
88 void config_set_int(config_t* config, const char* section, const char* key,
92 // not already exist, this function creates them. |config|, |section|, and |key|
94 void config_set_bool(config_t* config, const char* section, const char* key,
98 // not already exist, this function creates them. |config|, |section|, |key|,
101 void config_set_string(config_t* config, const char* section, const char* key,
104 // Removes |section| from the |config| (and, as a result, all keys in the
106 // Returns true if |section| was found and removed from |config|, false
108 // Neither |config| nor |section| may be NULL.
109 bool config_remove_section(config_t* config, const char* section);
111 // Removes one specific |key| residing in |section| of the |config|. Returns
114 // None of |config|, |section|, or |key| may be NULL.
115 bool config_remove_key(config_t* config, const char* section, const char* key);
117 // Returns an iterator to the first section in the config file. If there are no
121 // The iterator is invalidated on any config mutating operation. |config| may
123 const config_section_node_t* config_section_begin(const config_t* config);
125 // Returns an iterator to one past the last section in the config file. It does
129 // |config_section_next| on it). |config| may not be NULL.
130 const config_section_node_t* config_section_end(const config_t* config);
139 // is owned by the config module and must not be freed by the caller. The
144 // Saves |config| to a file given by |filename|. Note that this could be a
146 // The config module does not preserve comments or formatting so if a config
149 // be lost. Neither |config| nor |filename| may be NULL.
150 bool config_save(const config_t* config, const char* filename);