Lines Matching refs:section
9 // - Key/value pairs that are not within a section are assumed to be under
10 // the |CONFIG_DEFAULT_SECTION| section.
12 // a single section.
16 // - Duplicate keys in a section will overwrite previous values.
21 // The default section name to use if a key/value pair is not defined within
22 // a section.
54 // Returns true if the config file contains a section named |section|. If
55 // the section has no key/value pairs in it, this function will return false.
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,
64 // Returns the integral value for a given |key| in |section|. If |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,
71 // Returns the boolean value for a given |key| in |section|. If |section|
73 // function returns |def_value|. |config|, |section|, and |key| must not be
75 bool config_get_bool(const config_t* config, const char* section,
78 // Returns the string value for a given |key| in |section|. If |section| or
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,
85 // Sets an integral value for the |key| in |section|. If |key| or |section| do
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,
91 // Sets a boolean value for the |key| in |section|. If |key| or |section| do
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,
97 // Sets a string value for the |key| in |section|. If |key| or |section| do
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
105 // section).
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
113 // if the section and key were found and the key was removed, false otherwise.
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
125 // Returns an iterator to one past the last section in the config file. It does
126 // not represent a valid section, but can be used to determine if all sections
132 // Moves |iter| to the next section. If there are no more sections, |iter| will
138 // Returns the name of the section referred to by |iter|. The returned pointer