summary refs log tree commit diff
path: root/src/nm-dhcp4-config.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-05-27 19:57:25 +0200
committerMichael Biebl <biebl@debian.org>2011-05-27 19:57:25 +0200
commitd465e5fac63f36bcf4069e36827f4b62c494556d (patch)
tree65f4ba9567e091233cdf3279f7ba3c9479e74a1c /src/nm-dhcp4-config.c
parent9f806e97a24bba61417ae312fcc0da40914266fb (diff)
Imported Upstream version 0.8.9997 upstream/0.8.9997
Diffstat (limited to 'src/nm-dhcp4-config.c')
-rw-r--r--src/nm-dhcp4-config.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nm-dhcp4-config.c b/src/nm-dhcp4-config.c
index 5acf053f..567ba687 100644
--- a/src/nm-dhcp4-config.c
+++ b/src/nm-dhcp4-config.c
@@ -101,6 +101,23 @@ nm_dhcp4_config_get_option (NMDHCP4Config *self, const char *key)
 	return value ? g_value_get_string (value) : NULL;
 }
 
+/* Caller owns the list, but not the values in the list */
+GSList *
+nm_dhcp4_config_list_options (NMDHCP4Config *self)
+{
+	GHashTableIter iter;
+	const char *option = NULL;
+	GSList *list = NULL;
+
+	g_return_val_if_fail (NM_IS_DHCP4_CONFIG (self), NULL);
+
+	g_hash_table_iter_init (&iter, NM_DHCP4_CONFIG_GET_PRIVATE (self)->options);
+	while (g_hash_table_iter_next (&iter, (gpointer) &option, NULL))
+		list = g_slist_prepend (list, (gpointer) option);
+
+	return list;
+}
+
 const char *
 nm_dhcp4_config_get_dbus_path (NMDHCP4Config *self)
 {