summaryrefslogtreecommitdiff
path: root/src/nm-config.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-06-16 15:13:26 +0200
committerThomas Haller <thaller@redhat.com>2015-07-02 15:50:04 +0200
commitd3e21937834d94fa844a06b1158cf5f0411636b8 (patch)
treef27c1a8acfd331383bd29ad2505a55d66bdf30b6 /src/nm-config.h
parent076ffda6f395b37b497929de0838688db8eba84a (diff)
downloadNetworkManager-d3e21937834d94fa844a06b1158cf5f0411636b8.tar.gz
config: add NMConfigGetValueFlags argument to nm_config_data_get_value()
In some cases we want the returned value to be stripped. In some cases, we want to read the raw value instead of the string parsed by GKeyFile. Add an flags argument to nm_config_data_get_value(). It is up to the caller to determine the exact meaning (and whether to strip). By adding the flags argument, the caller can get the desired behavior easier without having to workaround it afterwards. But more importantly, it becomes apparent that there are different ways to retrieve the value and the caller should decide on the details.
Diffstat (limited to 'src/nm-config.h')
-rw-r--r--src/nm-config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nm-config.h b/src/nm-config.h
index 448e2f4e2d..20dbab388f 100644
--- a/src/nm-config.h
+++ b/src/nm-config.h
@@ -116,6 +116,10 @@ gint nm_config_keyfile_get_boolean (GKeyFile *keyfile,
const char *section,
const char *key,
gint default_value);
+char *nm_config_keyfile_get_value (GKeyFile *keyfile,
+ const char *section,
+ const char *key,
+ NMConfigGetValueFlags flags);
void nm_config_keyfile_set_string_list (GKeyFile *keyfile,
const char *group,
const char *key,