static gboolean has_always_ask (NMSetting *setting) { gboolean always_ask = FALSE; nm_setting_enumerate_values (setting, check_always_ask_cb, &always_ask); return always_ask; }
static NMSetting * read_setting (GKeyFile *file, const char *name) { NMSetting *setting; setting = nm_connection_create_setting (name); if (setting) nm_setting_enumerate_values (setting, read_one_setting_value, (gpointer) file); else g_warning ("Invalid setting name '%s'", name); return setting; }
static NMSetting * read_setting (GKeyFile *file, const char *keyfile_path, const char *setting_name) { NMSetting *setting; ReadInfo info = { file, keyfile_path }; setting = nm_connection_create_setting (setting_name); if (setting) nm_setting_enumerate_values (setting, read_one_setting_value, &info); else g_warning ("Invalid setting name '%s'", setting_name); return setting; }
static NMSetting * read_setting (GKeyFile *file, const char *keyfile_path, const char *group) { NMSetting *setting; ReadInfo info = { file, keyfile_path }; const char *alias; alias = nm_keyfile_plugin_get_setting_name_for_alias (group); setting = nm_connection_create_setting (alias ? alias : group); if (setting) nm_setting_enumerate_values (setting, read_one_setting_value, &info); else g_warning ("Invalid setting name '%s'", group); return setting; }