core: port IP/DHCP config to gdbus

This commit is contained in:
Dan Winship
2015-04-15 14:53:30 -04:00
parent 7f6e39ec6e
commit 6c8f860820
7 changed files with 263 additions and 304 deletions

View File

@@ -2991,3 +2991,24 @@ nm_utils_g_value_set_object_path_array (GValue *value, GSList *objects)
}
g_value_take_boxed (value, paths);
}
/**
* nm_utils_g_value_set_strv:
* @value: a #GValue, initialized to store a #G_TYPE_STRV
* @strings: a #GPtrArray of strings
*
* Converts @strings to a #GStrv and stores it in @value.
*/
void
nm_utils_g_value_set_strv (GValue *value, GPtrArray *strings)
{
char **strv;
int i;
strv = g_new (char *, strings->len + 1);
for (i = 0; i < strings->len; i++)
strv[i] = g_strdup (strings->pdata[i]);
strv[i] = NULL;
g_value_take_boxed (value, strv);
}