• Home
  • Raw
  • Download

Lines Matching refs:config

72 static void btif_config_remove_unpaired(config_t* config);
73 static void btif_config_remove_restricted(config_t* config);
118 static std::unique_ptr<config_t> config; variable
130 config = btif_config_open(CONFIG_FILE_PATH); in init()
132 if (!config) { in init()
135 config = btif_config_open(CONFIG_BACKUP_PATH); in init()
139 if (!config) { in init()
143 config = btif_config_transcode(CONFIG_LEGACY_FILE_PATH); in init()
147 if (!config) { in init()
151 config = config_new_empty(); in init()
157 config_set_string(config.get(), INFO_SECTION, FILE_SOURCE, file_source); in init()
159 btif_config_remove_unpaired(config.get()); in init()
162 if (!is_restricted_mode()) btif_config_remove_restricted(config.get()); in init()
166 time_str = config_get_string(*config, INFO_SECTION, FILE_TIMESTAMP, NULL); in init()
174 config_set_string(config.get(), INFO_SECTION, FILE_TIMESTAMP, in init()
193 config.reset(); in init()
200 std::unique_ptr<config_t> config = config_new(filename); in btif_config_open() local
201 if (!config) return nullptr; in btif_config_open()
203 if (!config_has_section(*config, "Adapter")) { in btif_config_open()
208 return config; in btif_config_open()
223 config.reset(); in clean_up()
234 CHECK(config != NULL); in btif_config_has_section()
238 return config_has_section(*config, section); in btif_config_has_section()
242 CHECK(config != NULL); in btif_config_exist()
245 return config_has_key(*config, section, key); in btif_config_exist()
250 CHECK(config != NULL); in btif_config_get_int()
254 bool ret = config_has_key(*config, section, key); in btif_config_get_int()
255 if (ret) *value = config_get_int(*config, section, key, *value); in btif_config_get_int()
262 CHECK(config != NULL); in btif_config_set_int()
265 config_set_int(config.get(), section, key, value); in btif_config_set_int()
272 CHECK(config != NULL); in btif_config_get_uint64()
276 bool ret = config_has_key(*config, section, key); in btif_config_get_uint64()
277 if (ret) *value = config_get_uint64(*config, section, key, *value); in btif_config_get_uint64()
284 CHECK(config != NULL); in btif_config_set_uint64()
287 config_set_uint64(config.get(), section, key, value); in btif_config_set_uint64()
294 CHECK(config != NULL); in btif_config_get_str()
301 config_get_string(*config, section, key, NULL); in btif_config_get_str()
312 CHECK(config != NULL); in btif_config_set_str()
315 config_set_string(config.get(), section, key, value); in btif_config_set_str()
321 CHECK(config != NULL); in btif_config_get_bin()
326 const std::string* value_str = config_get_string(*config, section, key, NULL); in btif_config_get_bin()
345 CHECK(config != NULL); in btif_config_get_bin_length()
348 const std::string* value_str = config_get_string(*config, section, key, NULL); in btif_config_get_bin_length()
359 CHECK(config != NULL); in btif_config_set_bin()
372 config_set_string(config.get(), section, key, str); in btif_config_set_bin()
379 std::list<section_t>& btif_config_sections() { return config->sections; } in btif_config_sections()
382 CHECK(config != NULL); in btif_config_remove()
385 return config_remove_key(config.get(), section, key); in btif_config_remove()
389 CHECK(config != NULL); in btif_config_save()
396 CHECK(config != NULL); in btif_config_flush()
404 CHECK(config != NULL); in btif_config_clear()
411 config = config_new_empty(); in btif_config_clear()
413 bool ret = config_save(*config, CONFIG_FILE_PATH); in btif_config_clear()
427 CHECK(config != NULL); in btif_config_write()
432 std::unique_ptr<config_t> config_paired = config_new_clone(*config); in btif_config_write()
497 config_get_string(*config, INFO_SECTION, FILE_SOURCE, &original) in btif_debug_config_dump()
501 static void btif_config_remove_restricted(config_t* config) { in btif_config_remove_restricted() argument
502 CHECK(config != NULL); in btif_config_remove_restricted()
504 for (auto it = config->sections.begin(); it != config->sections.end();) { in btif_config_remove_restricted()
507 config_has_key(*config, section, "Restricted")) { in btif_config_remove_restricted()
510 it = config->sections.erase(it); in btif_config_remove_restricted()